[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

Serhiy Storchaka report at bugs.python.org
Sun Oct 10 16:30:20 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

With tracemalloc enabled:

$ ./python -X tracemalloc -m test -v test_logging -m test_should_not_rollover
...
test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ... /home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='utf-8'>
  if method() is not None:
Object allocated at (most recent call last):
  File "/home/serhiy/py/cpython/Lib/logging/__init__.py", lineno 1205
    return open_func(self.baseFilename, self.mode,
ok

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________


More information about the Python-bugs-list mailing list