-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-93370 : Deprecate sqlite3.version and sqlite3.version_info #93482
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
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
|
closes #93370 |
|
I think what I did is wrong. I should be deprecating instead of removing in current version. But, after thinking about how to deprecate |
Take a look at https://peps.python.org/pep-0562/ Example usage for a Line 60 in 9b12b1b
|
|
@AlexWaygood , can you please check my usage of |
|
@AlexWaygood , Thank you so much for your feedback. I've incorporated your feedback |
AlexWaygood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is starting to look pretty good. However, it's still missing:
- Tests
- Updates to the documentation
Could you add those, please? 🙂 Take a look at #23064 as an example of a previous PR deprecating features — it should make clear the kinds of changes that you need to make to the test files and the docs.
Since this is your first contribution to CPython, you're also very welcome to add your name to https://github.com/python/cpython/blob/main/Misc/ACKS if you want to, though that isn't compulsory!
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments. As Alex said, you still need tests and to update the documentation.
A
Misc/NEWS.d/next/Library/2022-06-03-22-13-28.gh-issue-93370.tjfu9L.rst
Outdated
Show resolved
Hide resolved
AA-Turner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work @rawwar!
A
AlexWaygood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some documentation nits :)
Also, if you wanted to be super-thorough, you could also test that these also cause DeprecationWarning to be emitted:
from sqlite import version
from sqlite import version_info
from sqlite.dbapi2 import version
from sqlite.dbapi2 import version_infoCo-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
AA-Turner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line length of the tests is over 100 -- my suggestion doesn't bring it under 80, but makes it less egregious.
A
Co-authored-by: Adam Turner <[email protected]>
AlexWaygood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
erlend-aasland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
We haven't added warnings to sqlite3.dbapi2 before, only sqlite3 attributes, but it is ok; it will only stay for two versions :)
Also, I would probably have used subTest instead of spelling each test out.
|
Thanks for reviewing everyone, and thanks for the PR, Kalyan! I'm going to merge this as soon as the CI is green. |
removed sqlite3.version and sqlite3.version_info