New submission from Serhiy Storchaka <[email protected]>:
test_subprocess is failing on Windows.
C:\py\cpython3.7>./python -m test -uall -v -m test_nonexisting_with_pipes
test_subprocess
Running Debug|Win32 interpreter...
== CPython 3.7.0b1+ (heads/3.7:1a0239e, Feb 4 2018, 16:19:37) [MSC v.1911 32
bit (Intel)]
== Windows-10-10.0.16299-SP0 little-endian
== cwd: C:\py\cpython3.7\build\test_python_11092
== CPU count: 2
== encodings: locale=cp1251, FS=utf-8
Run tests sequentially
0:00:00 [1/1] test_subprocess
test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCase) ... FAIL
test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCaseNoPoll) ...
skipped 'Test needs selectors.PollSelector'
======================================================================
FAIL: test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\py\cpython3.7\lib\test\test_subprocess.py", line 1194, in
test_nonexisting_with_pipes
self.assertEqual(stderr, "")
AssertionError: 'Traceback (most recent call last):\n Fil[923 chars]le\n' != ''
Diff is 965 characters long. Set self.maxDiff to None to see it.
----------------------------------------------------------------------
Ran 2 tests in 0.171s
FAILED (failures=1, skipped=1)
test test_subprocess failed
test_subprocess failed
1 test failed:
test_subprocess
Total duration: 391 ms
Tests result: FAILURE
Here stderr is:
Traceback (most recent call last):
File "C:\py\cpython3.7\lib\subprocess.py", line 1101, in _execute_child
args = os.fsdecode(args) # os.PathLike -> str
File "C:\py\cpython3.7\\lib\os.py", line 821, in fsdecode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "C:\py\cpython3.7\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\py\cpython3.7\lib\subprocess.py", line 1104, in _execute_child
args[0] = os.fsdecode(args[0]) # os.PathLike -> str
File "C:\py\cpython3.7\\lib\os.py", line 821, in fsdecode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not tuple
In _execute_child args is passed to os.fsdecode() unless it is a string. In
this case args is a list. os.fsdecode() doesn't accept a list.
The regression was introduced in issue31961.
----------
components: Library (Lib), Windows
messages: 311603
nosy: Phaqui, gregory.p.smith, paul.moore, serhiy.storchaka, steve.dower,
tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Popen doesn't work on Windows when args is a list
type: behavior
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32764>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com