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-93370 : Deprecate sqlite3.version and sqlite3.version_info #93482
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 |
Thanks! This is starting to look pretty good. However, it's still missing:
- Tests
- Updates to the documentation
Could you add those, please?
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 <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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
@AlexWaygood , I reused comments of @erlend-aasland in #93370
In order to avoid future frustration, I suggest to deprecate sqlite3.version and sqlite3.version_info in 3.12, and remove them in 3.14. |
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_info
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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 <9087854+AA-Turner@users.noreply.github.com>
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