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

It seems that some of the pipe objects were not closed properly causing 
resource warnings. Regarding "subprocess still running warning" I guess we need 
to call kill() on the subprocess before exiting test_send_signal_race2. I will 
raise a PR for this.

➜  cpython git:(master) ./python -X dev -Wall -m test test_subprocess           
            
0:00:00 load avg: 0.06 Run tests sequentially
0:00:00 load avg: 0.06 [1/1] test_subprocess
/root/cpython/Lib/subprocess.py:1066: ResourceWarning: subprocess 22107 is 
still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=5>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=7>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=5>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=7>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=5>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=7>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=5>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/root/cpython/Lib/unittest/case.py:549: ResourceWarning: unclosed file 
<_io.BufferedReader name=7>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback

== Tests result: SUCCESS ==

1 test OK.

Total duration: 28.9 sec
Tests result: SUCCESS

----------
components: Tests
messages: 390924
nosy: giampaolo.rodola, gregory.p.smith, xtreak
priority: normal
severity: normal
status: open
title: Resource warnings in test_subprocess
type: behavior
versions: Python 3.10

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

Reply via email to