Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-44079: Strip superfluous statement cache from sqlite3.Connection#25998

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

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedMay 8, 2021
edited by bedevere-bot
Loading

@erlend-aasland
Copy link
ContributorAuthor

@corona10 I'm considering addingskip news label here, as this only affects the internal machinery of thesqlite3 module.

@corona10
Copy link
Member

corona10 commentedMay 9, 2021
edited
Loading

as this only affects the internal machinery of the sqlite3 module

@erlend-aasland
I don't think so

Statement instances are no longer weakly referencable

IMHO, At least the statement instance is changed, we can add the news.d about changed caching mechanism.

@erlend-aasland
Copy link
ContributorAuthor

as this only affects the internal machinery of the sqlite3 module

I don't think so

Right, because of8c888dc, I presume.

Statement instances are no longer weakly referencable

IMHO, At least the statement instance is changed, we can add the news.d about changed caching mechanism.

Even if sqlite3.Statement is not accessible for the user?

$ python3.10>>> import sqlite3>>> sqlite3.StatementTraceback (most recent call last):  File "<stdin>", line 1, in <module>  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/sqlite3/__init__.py", line 37, in __getattr__    raise AttributeError(f"module 'sqlite3' has no attribute '{name}'")AttributeError: module 'sqlite3' has no attribute 'Statement'

@corona10
Copy link
Member

@erlend-aasland
Hmm okay, I changed my mind, let's addskip news label :)

erlend-aasland reacted with laugh emoji

@erlend-aasland
Copy link
ContributorAuthor

Hmm okay, I changed my mind, let's addskip news label :)

:) But notice that itis possible to extract the Statement type using some undocumented tricks:

python3.10Python 3.10.0a7 (v3.10.0a7:53e55290cf, Apr  5 2021, 15:00:06) [Clang 12.0.0 (clang-1200.0.32.29)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import sqlite3>>> cx = sqlite3.connect(":memory:")>>> stmt = cx("select 1")>>> type(stmt)<class 'sqlite3.Statement'>

@berkerpeksag
Copy link
Member

True, this is an implementation detail and we don't need to add a NEWS entry.

erlend-aasland reacted with thumbs up emoji

@erlend-aaslanderlend-aasland marked this pull request as draftMay 25, 2021 22:27
@erlend-aaslanderlend-aasland changed the titlebpo-44079: Strip superfluous statement cache from sqlite3.Connection[WIP] bpo-44079: Strip superfluous statement cache from sqlite3.ConnectionJun 20, 2021
@erlend-aaslanderlend-aasland marked this pull request as ready for reviewJune 24, 2021 21:12
@erlend-aaslanderlend-aasland changed the title[WIP] bpo-44079: Strip superfluous statement cache from sqlite3.Connectionbpo-44079: Strip superfluous statement cache from sqlite3.ConnectionJun 24, 2021
@pablogsalpablogsal merged commit243b6c3 intopython:mainAug 18, 2021
@erlend-aaslanderlend-aasland deleted the sqlite-remove-superfluous-stmt-cache branchAugust 19, 2021 06:11
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull requestAug 19, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pablogsalpablogsalpablogsal approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

@serhiy-storchakaserhiy-storchakaAwaiting requested review from serhiy-storchaka

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@erlend-aasland@corona10@berkerpeksag@pablogsal@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2026 Movatter.jp