File tree Expand file tree Collapse file tree 4 files changed +8
-1
lines changed
Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 552.3.0 (????-??-??)
66------------------
77* Python 3.6+ only, support for Python 3.5 has been dropped
8+ * Fix a file descriptor leak on subprocess execution
89
9102.2.0 (2020-09-07)
1011------------------
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ def _thread_write_stream_to_buffer():
132132 else :
133133 if self ._closing :
134134 break
135+ self ._stream .close ()
135136 self ._terminated = True
136137 la .flush ()
137138 if self ._debug :
@@ -151,6 +152,7 @@ def _thread_write_stream_to_buffer_windows():
151152 print (linedecode )
152153 if callback :
153154 callback (linedecode )
155+ self ._stream .close ()
154156 self ._terminated = True
155157 if self ._debug :
156158 logger .debug ("Stream reader terminated" )
Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ def test_running_wget(tmp_path):
5656def test_path_object_resolution (tmp_path ):
5757 sentinel_value = b"sentinel"
5858 tmp_path .joinpath ("tempfile" ).write_bytes (sentinel_value )
59- tmp_path .joinpath ("reader.py" ).write_text ("print(open('tempfile').read())" )
59+ tmp_path .joinpath ("reader.py" ).write_text (
60+ "with open('tempfile') as fh:\n print(fh.read())"
61+ )
6062 assert "LEAK_DETECTOR" not in os .environ
6163 result = procrunner .run (
6264 [sys .executable , tmp_path / "reader.py" ],
Original file line number Diff line number Diff line change 1414 pytest-azurepipelines
1515 pytest-cov
1616 -r{toxinidir}/requirements_dev.txt
17+ setenv =
18+ PYTHONDEVMODE = 1
1719commands =
1820 pytest -ra --basetemp ={envtmpdir} --cov =procrunner --cov-report =html --cov-report =xml --cov-branch
1921
You can’t perform that action at this time.
0 commit comments