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

gh-58032: Do not use argparse.FileType in module CLIs and scripts #113649

Merged
merged 1 commit into from Jan 10, 2024

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 2, 2024

Open and close files manually. It prevents from leaking files, preliminary creation of output files, and accidental closing of stdin and stdout.

See also #113618 which does this for pickle and pickletools CLIs.

Open and close files manually. It prevents from leaking files,
preliminary creation of output files, and accidental closing of stdin
and stdout.
@serhiy-storchaka serhiy-storchaka merged commit b3d2427 into python:main Jan 10, 2024
37 checks passed
@serhiy-storchaka serhiy-storchaka deleted the no-FileType branch January 10, 2024 13:07
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.

None yet

2 participants