Skip to content
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

[3.9] bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) #20785

Merged
merged 1 commit into from
Jun 10, 2020
Merged

[3.9] bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) #20785

merged 1 commit into from
Jun 10, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 10, 2020

test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.

  • Move suppress_msvcrt_asserts() from test.libregrtest.setup to
    test.support. Make its verbose parameter optional: verbose=False by
    default.
  • SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
    rather than using ctypes.
  • Remove also an unused variable (deadline) in wait_process().

(cherry picked from commit f6e58ae)

https://bugs.python.org/issue40826

test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.

* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
  test.support. Make its verbose parameter optional: verbose=False by
  default.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
  rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().

(cherry picked from commit f6e58ae)
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@vstinner vstinner deleted the suppress_msvcrt_asserts39 branch June 10, 2020 17:25
@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4a4f660cfde8b683634c53e6214a6baa51de43b1 3.8

@vstinner
Copy link
Member Author

vstinner commented Jun 10, 2020

Note: the 3.9 backport doesn't add msvcrt.GetErrorMode().

@bedevere-bot
Copy link

GH-20787 is a backport of this pull request to the 3.8 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.8 only security fixes label Jun 10, 2020
vstinner added a commit that referenced this pull request Jun 10, 2020
…-20785) (GH-20787)

test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.

* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
  test.support. Make its verbose parameter optional: verbose=False by
  default.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
  rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().

(cherry picked from commit f6e58ae)
(cherry picked from commit 4a4f660)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants