Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/_sqlite/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ PyDoc_STRVAR(module_complete_doc,
\n\
Checks if a string contains a complete SQL statement. Non-standard.");

#ifdef HAVE_SHARED_CACHE
#if defined(HAVE_SHARED_CACHE) && !defined(__APPLE__)

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.

This test is not sufficient because it will prevent _sqlite from being built with a local copy of SQLite rather than the Apple-supplied system version and that is something that many distributors of Python on macOS do, including the python.org macOS installers. So, to avoid the deprecation warning, you want to be able to know you are linking with the system version. That might be a little tricky to do reliably; it might have to be done in either configure.ac or setup.py and would need to take into account SDKs. And in most cases it is probably better to avoid using the macOS system SQLite anyway. So i'm not sure this is worth trying to fix.

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.

To be more precise, it would not prevent _sqlite from being built; it would disallow use of enable_shared_cache. Which, BTW, doesn't seem to be documented in the sqlite3 module doc page?

static PyObject* module_enable_shared_cache(PyObject* self, PyObject* args, PyObject*
kwargs)
{
Expand Down