Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
29 commits Select commitHold shift + click to select a range
5debfa5 remove version and version_info from sqlite3
rawwarc648144 Merge branch 'python:main' into fix-issue-93370
rawwaree0cec7 📜🤖 Added by blurb_it.
blurb-it[bot]69e7410 used __getattr__ to raise warnings
rawwar6c2a8c8 removed repeated declaration
rawwar459a94c including feedback
rawwar4a55ef3 move declaration to the start of the module
rawwar1a75e5f fixed formatting issues
rawwar8584a03 extra lines removed
rawwarfa80dd6 Update Lib/sqlite3/__init__.py
rawwarf47ddf3 Update Lib/sqlite3/dbapi2.py
rawwarf033aea Update Lib/sqlite3/dbapi2.py
rawwar49ea9e1 updated docs
rawwar451e9ef Update Lib/sqlite3/__init__.py
rawwar591f2b9 Update Lib/sqlite3/dbapi2.py
rawwar3f4e967 Apply suggestions from code review
rawward70b247 update blurb with correct ref
rawwared50588 included my name in ACKS
rawwar8f06e31 Update Doc/library/sqlite3.rst
rawwar836cddf adding tests for version and version_info deprec
rawwar2102bf0 added dbapi2 tests and updated docs
rawwar04dad03 use mod sqlite3 in sqlite3 doc
rawwar81cf7fa Update Doc/library/sqlite3.rst
erlend-aasland964cf86 Update Doc/library/sqlite3.rst
erlend-aaslandf00b352 added assertIn and assertEqual in tests
rawwar1920746 using assertEqual
rawwar46922f6 removed white space
rawwar45478cc Apply suggestions from code review
rawwarbc7b463 Update Lib/test/test_sqlite3/test_dbapi.py
erlend-aaslandFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -55,3 +55,16 @@ | ||
| """ | ||
| fromsqlite3.dbapi2import* | ||
| fromsqlite3.dbapi2import (_deprecated_names, | ||
| _deprecated_version_info, | ||
| _deprecated_version) | ||
| def__getattr__(name): | ||
| ifnamein_deprecated_names: | ||
| fromwarningsimportwarn | ||
| warn(f"{name} is deprecated and will be removed in Python 3.14", | ||
rawwar marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| DeprecationWarning,stacklevel=2) | ||
| returnglobals()[f"_deprecated_{name}"] | ||
| raiseAttributeError(f"module{__name__!r} has no attribute{name!r}") | ||
erlend-aasland marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -25,6 +25,9 @@ | ||
| importcollections.abc | ||
| from_sqlite3import* | ||
| from_sqlite3import_deprecated_version | ||
| _deprecated_names=frozenset({"version","version_info"}) | ||
| paramstyle="qmark" | ||
| @@ -45,7 +48,7 @@ def TimeFromTicks(ticks): | ||
| defTimestampFromTicks(ticks): | ||
| returnTimestamp(*time.localtime(ticks)[:6]) | ||
| _deprecated_version_info=tuple(map(int,_deprecated_version.split("."))) | ||
| sqlite_version_info=tuple([int(x)forxinsqlite_version.split(".")]) | ||
| Binary=memoryview | ||
| @@ -85,3 +88,12 @@ def convert_timestamp(val): | ||
| # Clean up namespace | ||
| del(register_adapters_and_converters) | ||
| def__getattr__(name): | ||
| ifnamein_deprecated_names: | ||
| fromwarningsimportwarn | ||
| warn(f"{name} is deprecated and will be removed in Python 3.14", | ||
rawwar marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| DeprecationWarning,stacklevel=2) | ||
| returnglobals()[f"_deprecated_{name}"] | ||
| raiseAttributeError(f"module{__name__!r} has no attribute{name!r}") | ||
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
1 change: 1 addition & 0 deletionsMisc/ACKS
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1455,6 +1455,7 @@ Edward K. Ream | ||
| Chris Rebert | ||
| Marc Recht | ||
| John Redford | ||
| Kalyan Reddy | ||
| Terry J. Reedy | ||
| Gareth Rees | ||
| John Reese | ||
1 change: 1 addition & 0 deletionsMisc/NEWS.d/next/Library/2022-06-03-22-13-28.gh-issue-93370.tjfu9L.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Deprecate :data:`sqlite3.version` and :data:`sqlite3.version_info`. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.