Skip to content
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-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIs #108281

Merged

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Aug 22, 2023

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-aasland erlend-aasland changed the title gh-108278: Clean up some sqlite3 connection APIs gh-108278: Clean up sqlite3.Connection APIs Aug 22, 2023
@erlend-aasland erlend-aasland marked this pull request as ready for review August 22, 2023 20:05
@erlend-aasland erlend-aasland changed the title gh-108278: Clean up sqlite3.Connection APIs gh-108278: Deprecate passing the three first params as keyword args for sqlite3 UDF creation APIs Aug 23, 2023
@erlend-aasland
Copy link
Contributor Author

I updated the PR to only affect UDF creation APIs.

Doc/whatsnew/3.13.rst Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

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

@erlend-aasland
Copy link
Contributor Author

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.

Copy link
Member

@serhiy-storchaka serhiy-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, but please get an approval of yet one core developer. Has this change been discussed with a wider audience?

Lib/test/test_sqlite3/test_userfunctions.py Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

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
Member

Well, then go ahead!

@erlend-aasland erlend-aasland enabled auto-merge (squash) August 28, 2023 13:08
@erlend-aasland erlend-aasland merged commit 4116592 into python:main Aug 28, 2023
22 checks passed
@bedevere-bot
Copy link

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 free to 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.

None yet

3 participants