GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sqlite3: remove features deprecated in 3.10 · Issue #92547 · python/cpython

sqlite3: remove features deprecated in 3.10 #92547

New issue
Copy link
New issue
Copy link
Closed
#92548
Closed
sqlite3: remove features deprecated in 3.10#92547
#92548
Copy link
Labels
easyextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3

Description

@erlend-aasland
erlend-aasland
opened on May 9, 2022
Issue body actions

The following sqlite3 features were deprecated in Python 3.10, and are scheduled for removal in Python 3.12:

  • sqlite3.OptimizedUnicode: bpo-42264: Deprecate sqlite3.OptimizedUnicode #23163
  • sqlite3.enable_shared_cache: bpo-24464: Deprecate sqlite3.enable_shared_cache #24008

3.12 development was just opened, so these features can now be removed.

Linked PRs

  • gh-92547: Purge sqlite3_enable_shared_cache() detection from configure #101873

Activity

  1. erlend-aasland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    easy
    on May 9, 2022
  2. erlend-aasland
    added a commit that references this issue on May 9, 2022

    pythongh-92547: Remove deprecated sqlite3 features

    8312697
  3. JelleZijlstra commented on May 9, 2022

    @JelleZijlstra
    JelleZijlstra
    on May 9, 2022
    Member
    More actions

    Could you check whether any major open-source repos use these (using @vstinner's scripts)? If so, it's going to be better to fix the third-party dependencies first.

  4. erlend-aasland commented on May 9, 2022

    @erlend-aasland
    erlend-aasland
    on May 9, 2022
    ContributorAuthor
    More actions

    Certainly!

  5. vstinner commented on May 9, 2022

    @vstinner
    vstinner
    on May 9, 2022
    Member
    More actions

    Results of ./search_pypi_top.py PYPI-2022-01-26-TOP-5000 'OptimizedUnicode|enable_shared_cache' -o sqlite -q if I ignore all .pyi files (type annotation):

    nltk-3.6.7.zip: nltk-3.6.7/nltk/sem/relextract.py: connection.text_factory = sqlite3.OptimizedUnicode
    
    pylint-2.12.2.tar.gz: pylint-2.12.2/pylint/checkers/stdlib.py: "sqlite3.OptimizedUnicode",
    pylint-2.12.2.tar.gz: pylint-2.12.2/pylint/checkers/stdlib.py: "_sqlite3.enable_shared_cache",
    
    peewee-3.14.8.tar.gz: peewee-3.14.8/playhouse/_pysqlite/connection.h: * - OptimizedUnicode:      Like before, but for ASCII data, only PyStrings are created.
    peewee-3.14.8.tar.gz: peewee-3.14.8/playhouse/_pysqlite/module.h: extern PyObject* pysqlite_OptimizedUnicode;
    
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: static PyObject* module_enable_shared_cache(PyObject* self, PyObject* args, PyObject*
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: rc = sqlite3_enable_shared_cache(do_enable);
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: PyDoc_STRVAR(module_enable_shared_cache_doc,
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: "enable_shared_cache(do_enable)\n\
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: {"enable_shared_cache",  (PyCFunction)(void(*)(void))module_enable_shared_cache,
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: METH_VARARGS | METH_KEYWORDS, module_enable_shared_cache_doc},
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: OptimizedUnicode caused Unicode objects to be returned for
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: Now OptimizedUnicode is an alias for str, so it has no
    pysqlite3-0.4.6.tar.gz: pysqlite3-0.4.6/src/module.c: PyDict_SetItemString(dict, "OptimizedUnicode", (PyObject*)&PyUnicode_Type);
    

    nltk seems to be impacted by the removal of sqlite3.OptimizedUnicode:
    https://github.com/nltk/nltk/blob/de46911d9ca248c2c6ce95518cd25e3c277208d7/nltk/sem/relextract.py#L322

    Reacted by Jelle Zijlstra and Erlend E. Aasland
  6. vstinner commented on May 9, 2022

    @vstinner
    vstinner
    on May 9, 2022
    Member
    More actions

    pylint-2.12.2/pylint/checkers/stdlib.py is a list of the deprecated functions:
    https://github.com/PyCQA/pylint/blob/afa6853b57c8c14970e460ca2651d4157751ad1d/pylint/checkers/stdlib.py#L164

  7. JelleZijlstra
    added a commit that references this issue on May 10, 2022

    Remove unnecessary sqlite code

    a53a113
  8. erlend-aasland
    closed this as completedin #92548on May 16, 2022
  9. erlend-aasland
    added a commit that references this issue on May 16, 2022

    gh-92547: Remove deprecated sqlite3 features (#92548)

    00f22e8
  10. erlend-aasland
    added
    topic-sqlite3
    on May 16, 2022
  11. erlend-aasland commented on May 16, 2022

    @erlend-aasland
    erlend-aasland
    on May 16, 2022
    ContributorAuthor
    More actions

    Resolved by #92548

  12. erlend-aasland
    added 2 commits that reference this issue on Jun 15, 2022

    pythongh-92547: Amend What's New

    45037ea

    gh-92547: Amend What's New (#93872)

    d5be9a5
  13. serhiy-storchaka
    added a commit that references this issue on Jun 26, 2022

    Revert 30935 defer bpo45162 to 312 (#94285)

    1ffde3e
  14. hugovk commented on Feb 12, 2023

    @hugovk
    hugovk
    on Feb 12, 2023
    Member
    More actions

    @erlend-aasland There's some enable_shared_cache things in configure and configure.ac:

    $ rg enable_shared_cache configure*
    configure.ac
    3870:      PY_CHECK_SQLITE_FUNC([sqlite3_enable_shared_cache])
    
    configure
    13692:  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_enable_shared_cache in -lsqlite3" >&5
    13693:$as_echo_n "checking for sqlite3_enable_shared_cache in -lsqlite3... " >&6; }
    13694:if ${ac_cv_lib_sqlite3_sqlite3_enable_shared_cache+:} false; then :
    13708:char sqlite3_enable_shared_cache ();
    13712:return sqlite3_enable_shared_cache ();
    13718:  ac_cv_lib_sqlite3_sqlite3_enable_shared_cache=yes
    13720:  ac_cv_lib_sqlite3_sqlite3_enable_shared_cache=no
    13726:{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_enable_shared_cache" >&5
    13727:$as_echo "$ac_cv_lib_sqlite3_sqlite3_enable_shared_cache" >&6; }
    13728:if test "x$ac_cv_lib_sqlite3_sqlite3_enable_shared_cache" = xyes; then :

    Should they be cleaned up as well?

  15. erlend-aasland commented on Feb 12, 2023

    @erlend-aasland
    erlend-aasland
    on Feb 12, 2023
    ContributorAuthor
    More actions

    Oh, good call @hugovk. Yes, definitely. Are you up for a PR? If not, I'll do it.

  16. erlend-aasland
    reopened this on Feb 12, 2023
  17. hugovk commented on Feb 13, 2023

    @hugovk
    hugovk
    on Feb 13, 2023
    Member
    More actions

    Please go ahead, thanks!

    Reacted by Erlend E. Aasland
  18. erlend-aasland
    added a commit that references this issue on Feb 13, 2023

    pythongh-92547: Purge sqlite3_enable_shared_cache() detection from co…

    26a1308
  19. erlend-aasland
    closed this as completedon Feb 13, 2023
  20. erlend-aasland
    added a commit that references this issue on Feb 13, 2023

    gh-92547: Purge sqlite3_enable_shared_cache() detection from configure (

    2db2c4b
  21. carljm
    added a commit that references this issue on Feb 13, 2023

    Merge branch 'main' into inlinecomp2

    ae0bd02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    easyextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.