FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-58032: Deprecate the argparse.FileType type converter by serhiy-storchaka · Pull Request #124664 · python/cpython · GitHub

/ cpython Public

gh-58032: Deprecate the argparse.FileType type converter - #124664

Merged
serhiy-storchaka merged 9 commits into
python:mainfrom
serhiy-storchaka:argparse-filetype-deprecate
Oct 23, 2024
Merged

gh-58032: Deprecate the argparse.FileType type converter#124664
serhiy-storchaka merged 9 commits into
python:mainfrom
serhiy-storchaka:argparse-filetype-deprecate

Conversation

serhiy-storchaka commented Sep 27, 2024
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Comment thread Lib/argparse.py Outdated
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>

Copy link
Copy Markdown
Member

Should we add this to the pending-removal-in-future.rst?

Comment thread Lib/test/test_argparse.py Outdated
savannahostrowski linked an issue Oct 18, 2024 that may be closed by this pull request

Copy link
Copy Markdown
Member Author

@Mariatta, could you please look again at this PR?

serhiy-storchaka merged commit 834ba5a into python:main Oct 23, 2024
serhiy-storchaka deleted the argparse-filetype-deprecate branch October 23, 2024 07:50

hugovk commented Oct 23, 2024

Copy link
Copy Markdown
Member

Please see #125871 as a small docs update.

adamchainz added a commit to adamchainz/heroicons that referenced this pull request Aug 5, 2025
adamchainz added a commit to adamchainz/heroicons that referenced this pull request Aug 5, 2025

Copy link
Copy Markdown
Member

I'm a little late to the party, but I don't understand why PendingDeprecationWarning was used here. The docs, and warning message contradict the exception saying it is deprecated? Can it be updated to DeprecationWarning if it is deprecated, otherwise I think we should remove the .. deprecated:: and rephrase the warning messages.

Copy link
Copy Markdown
Member Author

We use the deprecated directive even if there is no warning at runtime (they can be added latter). This differs from soft-deprecated where we do not plan runtime warning or deletion.

Copy link
Copy Markdown
Member

Yes, but I still don't understand why we're using PendingDeprecationWarning instead of DeprecationWarning here if it is deprecated?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

argparse.FileType opens a file and never closes it

5 participants


Back | FazBrowse Home | New Git URL