Skip to content

gh-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIs - #108281

Merged
erlend-aasland merged 10 commits into
python:mainfrom
erlend-aasland:sqlite/cleanup-connection-apis
Aug 28, 2023
Merged

gh-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIs#108281
erlend-aasland merged 10 commits into
python:mainfrom
erlend-aasland:sqlite/cleanup-connection-apis

Conversation

@erlend-aasland

@erlend-aaslanderlend-aasland commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

Deprecate passing name, number of arguments, and the callable as keyword
arguments, for the following sqlite3.Connection APIs:

  • create_function(name, nargs, callable, ...)
  • create_aggregate(name, nargs, callable)

The affected parameters will become positional-only in Python 3.15.


📚 Documentation preview 📚: https://cpython-previews--108281.org.readthedocs.build/

Deprecate passing name, number of arguments, and the callable as keyword
arguments, for the following sqlite3.Connection APIs:
- create_function(name, nargs, callable, ...)
- create_aggregate(name, nargs, callable)
Deprecate passing the callback as a keyword argument, for the following
sqlite3.Connection APIs:
- set_authorizer(callback)
- set_progress_handler(callback, n)
- set_trace_callback(callback)
The affected parameters will become positional-only in Python 3.15.
@erlend-aaslanderlend-aasland changed the title gh-108278: Clean up some sqlite3 connection APIsgh-108278: Clean up sqlite3.Connection APIsAug 22, 2023
@erlend-aasland
erlend-aasland marked this pull request as ready for review August 22, 2023 20:05
@erlend-aaslanderlend-aasland changed the title gh-108278: Clean up sqlite3.Connection APIsgh-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIsAug 23, 2023
@erlend-aasland

Copy link
Copy Markdown
ContributorAuthor

I updated the PR to only affect UDF creation APIs.

Comment threadDoc/whatsnew/3.13.rst Outdated
@erlend-aasland

Copy link
Copy Markdown
ContributorAuthor

I'd like to land this; are you ok with the change, @serhiy-storchaka?

@erlend-aasland

Copy link
Copy Markdown
ContributorAuthor

I'm landing this. It is for main only, so we have until 3.13 feature freeze (~May 2024) to adjust things or even revert.

@serhiy-storchakaserhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but please get an approval of yet one core developer. Has this change been discussed with a wider audience?

Comment threadLib/test/test_sqlite3/test_userfunctions.py Outdated
@erlend-aasland

Copy link
Copy Markdown
ContributorAuthor

LGTM, but please get an approval of yet one core developer. Has this change been discussed with a wider audience?

I posted a topic on Discourse. Brett and Berker left a "heart" reaction; I did not get any discouragements. Since Berker also is a code owner for the sqlite3 code, I count that as fairly strong support.

@serhiy-storchaka

Copy link
Copy Markdown
Member

Well, then go ahead!

@bedevere-bot

Copy link
Copy Markdown

There's a new commit after the PR has been approved.

@serhiy-storchaka: please review the changes made to this pull request.

vstinner pushed a commit to vstinner/cpython that referenced this pull request Aug 28, 2023
…args for sqlite3 UDF creation APIs (python#108281)
Deprecate passing name, number of arguments, and the callable as keyword
arguments, for the following sqlite3.Connection APIs:
- create_function(name, nargs, callable, ...)
- create_aggregate(name, nargs, callable)
The affected parameters will become positional-only in Python 3.15.
@erlend-aasland
erlend-aasland deleted the sqlite/cleanup-connection-apis branch August 28, 2023 19:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

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