Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.9] bpo-14156: Make argparse.FileType work correctly for binary fil… #31979

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 1 commit into from
Mar 18, 2022

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Mar 18, 2022

…e modes when argument is '-' (GH-13165)

Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-'
(so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb')..
(cherry picked from commit eafec26)

Co-authored-by: MojoVampire [email protected]

https://bugs.python.org/issue14156

…e modes when argument is '-' (pythonGH-13165)

Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-'
(so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb')..
(cherry picked from commit eafec26)

Co-authored-by: MojoVampire <[email protected]>
@serhiy-storchaka serhiy-storchaka merged commit 4d2099f into python:3.9 Mar 18, 2022
@serhiy-storchaka serhiy-storchaka deleted the backport-eafec26-3.9 branch March 18, 2022 18:54
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…e modes when argument is '-' (pythonGH-13165) (pythonGH-31979)

Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-'
(so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb').
(cherry picked from commit eafec26)

Co-authored-by: MojoVampire <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants