Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101640: Make argparse working inpythonw by dropping stderr writes there#101802

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@arhadthedev
Copy link
Member

@arhadthedevarhadthedev commentedFeb 10, 2023
edited
Loading

A note on freshly added tests:

  • StdStreamTest.test_skip_invalid_stderr() is confirmed to be failing before the patch
  • StdStreamTest.test_skip_invalid_stdout() is added for symmetry; its tested behavior already worked correctly

@arhadthedevarhadthedev added stdlibStandard Library Python modules in the Lib/ directory topic-IO labelsFeb 10, 2023
@arhadthedev
Copy link
MemberAuthor

Ping?

@arhadthedevarhadthedev changed the titlegh-101640: Argparse without stdiogh-101640: Make argparse working inpythonw by dropping stderr writes thereApr 9, 2023
@arhadthedev
Copy link
MemberAuthor

ping

@arhadthedevarhadthedev added the needs backport to 3.11only security fixes labelApr 23, 2023
Copy link
Member

@terryjreedyterryjreedy left a comment

Choose a reason for hiding this comment

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

I am not sure who you are pinging, but... tests look OK to me. I just suggest catching any write error.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@arhadthedev
Copy link
MemberAuthor

Retriggering the build to restart the faileddocs/readthedocs.org:cpython-previews:

Running Sphinx v4.5.0loading translations [en]... doneTraceback (most recent call last):  File "/home/docs/checkouts/readthedocs.org/user_builds/cpython-previews/envs/101802/lib/python3.7/site-packages/sphinx/registry.py", line 425, in load_extension    mod = import_module(extname)  File "/home/docs/checkouts/readthedocs.org/user_builds/cpython-previews/envs/101802/lib/python3.7/importlib/__init__.py", line 127, in import_module    return _bootstrap._gcd_import(name[level:], package, level)  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import  File "<frozen importlib._bootstrap>", line 983, in _find_and_load  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked  File "<frozen importlib._bootstrap_external>", line 728, in exec_module  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed  File "/home/docs/checkouts/readthedocs.org/user_builds/cpython-previews/envs/101802/lib/python3.7/site-packages/sphinx/builders/linkcheck.py", line 20, in <module>    from requests import Response  File "/home/docs/checkouts/readthedocs.org/user_builds/cpython-previews/envs/101802/lib/python3.7/site-packages/requests/__init__.py", line 43, in <module>    import urllib3  File "/home/docs/checkouts/readthedocs.org/user_builds/cpython-previews/envs/101802/lib/python3.7/site-packages/urllib3/__init__.py", line 39, in <module>    "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently "ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2n  7 Dec 2017. See: https://github.com/urllib3/urllib3/issues/2168

@arhadthedev
Copy link
MemberAuthor

The docs deploy continues to fail. However, this PR doesn't change documentation so I believe it can be ignored for now.

For Bedevere: I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

@miss-islington
Copy link
Contributor

Thanks@arhadthedev for the PR, and@terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-104250 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelMay 6, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 6, 2023
…ythonGH-101802)* In particular, don't exit when trying to print to stderr = None.* Add tests(cherry picked from commit42f54d1)Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
terryjreedy added a commit that referenced this pull requestMay 6, 2023
…H-101802) (#104250)gh-101640: Make argparse _print_message catch any write error (GH-101802)* In particular, don't exit when trying to print to stderr = None.* Add tests(cherry picked from commit42f54d1)Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@arhadthedevarhadthedev deleted the argparse-without-stdio branchMay 7, 2023 06:13
jbower-fb pushed a commit to jbower-fb/cpython that referenced this pull requestMay 8, 2023
…ython#101802)* In particular, don't exit when trying to print to stderr = None.* Add testsCo-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@terryjreedyterryjreedyterryjreedy approved these changes

Assignees

No one assigned

Labels

stdlibStandard Library Python modules in the Lib/ directorytopic-IO

Projects

Status: Doc issues

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@arhadthedev@bedevere-bot@miss-islington@terryjreedy

[8]ページ先頭

©2009-2025 Movatter.jp