Skip to content

gh-91954: Use shell=True in test_subprocess.test_encoding_warning #92090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2022

Conversation

sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented Apr 30, 2022

This fixes failing AMD64 Windows buildbots, which were failing because on Windows, echo is a command, not a program.

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting core review labels Apr 30, 2022
@sweeneyde sweeneyde changed the title test_subprocess.test_encoding_warning: Use stderr as the assertion message gh-91954: test_subprocess.test_encoding_warning: Use stderr as the assertion message Apr 30, 2022
@sweeneyde sweeneyde added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 30, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @sweeneyde for commit 4b18e6e 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 30, 2022
@sweeneyde
Copy link
Member Author

Result:

AssertionError: 13 != 2 : [b"<string>:3: EncodingWarning: 'encoding' argument not specified.", b'Traceback (most recent call last):', b'  File "<string>", line 3, in <module>', b'  File "C:\\Workspace\\buildarea\\pull_request.linaro-win-arm64.nondebug\\build\\Lib\\subprocess.py", line 533, in run', b'    with Popen(*popenargs, **kwargs) as process:', b'         ^^^^^^^^^^^^^^^^^^^^^^^^^^^', b'  File "C:\\Workspace\\buildarea\\pull_request.linaro-win-arm64.nondebug\\build\\Lib\\subprocess.py", line 998, in __init__', b'    self._execute_child(args, executable, preexec_fn, close_fds,', b'    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^', b'  File "C:\\Workspace\\buildarea\\pull_request.linaro-win-arm64.nondebug\\build\\Lib\\subprocess.py", line 1467, in _execute_child', b'    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,', b'                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^', b'FileNotFoundError: [WinError 2] The system cannot find the file specified']

On multiple lines:

<string>:3: EncodingWarning: 'encoding' argument not specified.
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "C:\Workspace\buildarea\pull_request.linaro-win-arm64.nondebug\build\Lib\subprocess.py", line 533, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Workspace\buildarea\pull_request.linaro-win-arm64.nondebug\build\Lib\subprocess.py", line 998, in __init__       
    self._execute_child(args, executable, preexec_fn, close_fds,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Workspace\buildarea\pull_request.linaro-win-arm64.nondebug\build\Lib\subprocess.py", line 1467, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

@methane

@sweeneyde sweeneyde marked this pull request as ready for review April 30, 2022 22:10
@sweeneyde sweeneyde requested a review from gpshead as a code owner April 30, 2022 22:10
@sweeneyde sweeneyde changed the title gh-91954: test_subprocess.test_encoding_warning: Use stderr as the assertion message gh-91954: Use shell=True in test_subprocess.test_encoding_warning Apr 30, 2022
@sweeneyde sweeneyde added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 30, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @sweeneyde for commit 3453616 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 30, 2022
@sweeneyde sweeneyde requested a review from methane April 30, 2022 22:17
@sweeneyde
Copy link
Member Author

Nice, ARM64 Windows Non-Debug PR is passing again.

Copy link
Member

@methane methane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@sweeneyde
Copy link
Member Author

The failing "buildbot/AMD64 RHEL8 Refleaks PR" should be fixed by #92039

@sweeneyde sweeneyde merged commit b963618 into python:main May 1, 2022
@sweeneyde sweeneyde deleted the encoding_warnings branch May 1, 2022 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants