[nix-shell:~/Documents/Home/VC/Git/Partially mine/cpython/Repo]$ ./python -m test.test_asyncio.test_subprocess
........./bin/sh: line 1: /home/jayman/Documents/Home/VC/Git/Partially: No such file or directory
F................................Unknown child process pid 200364, will report returncode 255
....../bin/sh: line 1: /home/jayman/Documents/Home/VC/Git/Partially: No such file or directory
F................................
======================================================================
FAIL: test_create_subprocess_env_shell (__main__.SubprocessPidfdWatcherTests.test_create_subprocess_env_shell)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jayman/Documents/Home/VC/Git/Partially mine/cpython/Repo/Lib/test/test_asyncio/test_subprocess.py", line 784, in test_create_subprocess_env_shell
self.loop.run_until_complete(self.check_stdout_output(main(), b'bar'))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jayman/Documents/Home/VC/Git/Partially mine/cpython/Repo/Lib/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/home/jayman/Documents/Home/VC/Git/Partially mine/cpython/Repo/Lib/test/test_asyncio/test_subprocess.py", line 765, in check_stdout_output
self.assertEqual(stdout, output)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: b'' != b'bar'
======================================================================
FAIL: test_create_subprocess_env_shell (__main__.SubprocessThreadedWatcherTests.test_create_subprocess_env_shell)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jayman/Documents/Home/VC/Git/Partially mine/cpython/Repo/Lib/test/test_asyncio/test_subprocess.py", line 784, in test_create_subprocess_env_shell
self.loop.run_until_complete(self.check_stdout_output(main(), b'bar'))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jayman/Documents/Home/VC/Git/Partially mine/cpython/Repo/Lib/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/home/jayman/Documents/Home/VC/Git/Partially mine/cpython/Repo/Lib/test/test_asyncio/test_subprocess.py", line 765, in check_stdout_output
self.assertEqual(stdout, output)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: b'' != b'bar'
----------------------------------------------------------------------
Ran 81 tests in 8.205s
FAILED (failures=2)
[nix-shell:~/Documents/Home/VC/Git/Partially mine/cpython/Repo]$
Bug report
Bug description:
If you’re on a UNIX(-like) system and the path to your local clone of the
cpythonrepository contains spaces, then two of the tests fromtest.test_asyncio.test_subprocess(test_create_subprocess_env_shellandtest_create_subprocess_env_shell) will fail.Steps to Reproduce
Make sure that the path to your local clone of the
cpythonrepository contains at least one space.Open a terminal.
(Optional) Make sure that you’re using the same set of dependencies that I did when I built CPython by doing the following:
Make sure that the Nix package manager is installed by running this command:
If that command finishes successfully, then Nix is installed. If that command gives you an error, then you need to install Nix.
Create a file named
shell-for-working-on-cpython.nixthat contains the following Nix expression:Activate that Nix shell by running this command:
Change directory into the root of your local copy of the CPython Git repository by running this command:
(Optional) Switch to a specific revision of CPython that is know to have this issue by running this command:
Configure CPython by running this command:
Build CPython by running this command:
make -j "$(nproc)"Run the tests in
test.test_asyncio.test_subprocessrunning this command:Results
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux