New submission from Karthikeyan Singaravelan <tir.kar...@gmail.com>:

There was a test added with 64aa6d2000665efb1a2eccae176df9520bf5f5e6. It  opens 
a stream of '/dev/null' in the test and doesn't close it causing 
ResourceWarning. A fix would be to assign it to a variable and close it as part 
of test's cleanup process. I will raise a PR for this.

./python.exe -m unittest 
test.test_logging.HandlerTest.test_post_fork_child_no_deadlock
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_logging.py:142:
 ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='wt' 
encoding='UTF-8'>
  loggerDict.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.
----------------------------------------------------------------------
Ran 1 test in 0.606s

OK

----------
components: Tests
messages: 342330
nosy: gregory.p.smith, xtreak
priority: normal
severity: normal
status: open
title: ResourceWarning in 
test_logging.HandlerTest.test_post_fork_child_no_deadlock
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to