Skip to content

Docs: optparse not removed in Python 3.12 #8708

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
May 21, 2023

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented May 21, 2023

Type of Changes

Type
βœ“ πŸ“œ Docs

Description

The optparse module is deprecated, and it's better to use argparse, but there's no current plans to remove it.

https://docs.python.org/3.12/library/optparse.html shows it's still present in 3.12 and says:

Deprecated since version 3.2: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.

@codecov
Copy link

codecov bot commented May 21, 2023

Codecov Report

Merging #8708 (25f0acb) into main (cf1404a) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8708   +/-   ##
=======================================
  Coverage   95.82%   95.82%           
=======================================
  Files         173      173           
  Lines       18375    18375           
=======================================
  Hits        17607    17607           
  Misses        768      768           

@Pierre-Sassoulas Pierre-Sassoulas added Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry labels May 21, 2023
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

I wonder where I saw that it was going to be removed. Thank you for the correction.

@Pierre-Sassoulas Pierre-Sassoulas merged commit d7e9fd6 into pylint-dev:main May 21, 2023
@hugovk hugovk deleted the patch-1 branch May 21, 2023 13:44
@hugovk
Copy link
Contributor Author

hugovk commented May 21, 2023

Maybe in the PEP 594 ("Removing dead batteries from the standard library") discussions, but they decided to keep it:

@DanielNoord
Copy link
Collaborator

They just announced the intent to keep it after we had moved all of our own code to argparse πŸ˜…

@Pierre-Sassoulas
Copy link
Member

I don't regret the move though, argparse is better and the intertwining of PyLinter and OptParser was pretty nasty πŸ˜„

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants