Skip to content

[3.10] bpo-14156: Make argparse.FileType work correctly for binary file modes when argument is '-' (GH-13165) #31706

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 6, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Mar 6, 2022

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 shadowranger+github@gmail.com

https://bugs.python.org/issue14156

…s 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 <shadowranger+github@gmail.com>
@miss-islington
Copy link
Contributor Author

@MojoVampire and @serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@MojoVampire and @serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit ee18df4 into python:3.10 Mar 6, 2022
@miss-islington miss-islington deleted the backport-eafec26-3.10 branch March 6, 2022 12:12
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.

5 participants