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

gh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequence#101698

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 commentedFeb 8, 2023
edited by bedevere-bot
Loading

@erlend-aaslanderlend-aasland changed the titleAdd NEWSgh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequenceFeb 8, 2023
@erlend-aasland

This comment was marked as outdated.

@erlend-aaslanderlend-aaslandforce-pushed theno-numeric-placeholder-for-you branch from25365e9 tob693895CompareFebruary 8, 2023 17:49
@erlend-aaslanderlend-aasland marked this pull request as ready for reviewFebruary 8, 2023 18:08
@erlend-aasland
Copy link
ContributorAuthor

Alex, would you mind taking a look at the docs/NEWS/What's New changes? I feel the sentences grew to be a little bit too complex.

AlexWaygood reacted with thumbs up emoji

@erlend-aasland
Copy link
ContributorAuthor

Also, the text in the deprecation warning is perhaps a little bit too long 😶

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

I can't think of a case where a warning would be better than an exception, but so be it.

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

erlend-aasland reacted with hooray emoji
@erlend-aasland
Copy link
ContributorAuthor

Thanks for your review, Serhiy; highly appreciated.

@AlexWaygood, do you still want to take a look?

Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

A few more minor points

and there is no open transaction,
a transaction is implicitly opened before executing *sql*.

..versionchanged::3.12
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
..versionchanged::3.12
..deprecated-removed::3.12 3.14

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Are you sure about that? The API itself is not deprecated, we're just changing it. I'm not sure what's the recommended practice here.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I know what you mean. I feel like ideally this notice would be phrased along the lines of "X behaviour/practice is now deprecated" rather than "a DeprecationWarning is now emitted". That would be more to-the-point, and it would also work more naturally with this directive (X behaviour/practice is deprecated in 3.12, and will be removed entirely in 3.14).

But I was struggling to come to with a concrete suggestion for how to reword these notices :/

Copy link
Member

Choose a reason for hiding this comment

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

(The whatsnew and NEWS entries look great btw, it's just the notices in the API docs that feelslightly clunky to me)

erlend-aasland reacted with hooray emoji
Copy link
ContributorAuthor

@erlend-aaslanderlend-aaslandFeb 14, 2023
edited
Loading

Choose a reason for hiding this comment

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

I feel like ideally this notice would be phrased along the lines of "X behaviour/practice is now deprecated" rather than "a DeprecationWarning is now emitted". That would be more to-the-point, and it would also work more naturally with this directive (X behaviour/practice is deprecated in 3.12, and will be removed entirely in 3.14).

Yes, but documented as deprecated and emitting aDeprecationWarning are similar, but not equal, things 🙂 With the former, we don't need to emit a warning in the code.

Copy link
Member

Choose a reason for hiding this comment

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

To your original question, btw: I think it's pretty standard to use.. deprecated or.. deprecated-removed, even if it's just a particular usage of an API, rather than the API itself. See e.g.https://docs.python.org/3.12/library/asyncio-policy.html#asyncio.DefaultEventLoopPolicy, where the directive is used even though the class itself hasn't been deprecated at all; or#19867, which deprecated just a specific parameter; or lots of other examples in our docs 🙂

erlend-aasland reacted with heart emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Aight! I'll try to reword it.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I've updated it to usedeprecated-removed, and I put in an extra line regarding what happens in 3.14. I'm too tired to reword the text 🙂

AlexWaygood reacted with thumbs up emoji
Copy link
Member

@AlexWaygoodAlexWaygood left a comment
edited
Loading

Choose a reason for hiding this comment

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

The docs LGTM!

@erlend-aaslanderlend-aasland merged commit8a2b7ee intopython:mainFeb 15, 2023
@erlend-aaslanderlend-aasland deleted the no-numeric-placeholder-for-you branchFebruary 15, 2023 05:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@erlend-aasland@serhiy-storchaka@AlexWaygood@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp