[issue42229] Fix SQLite warnings on macOS

Samuel Marks report at bugs.python.org
Sun Nov 1 05:49:32 EST 2020


New submission from Samuel Marks <samuelmarks at gmail.com>:

Planned to fix all the compiler warnings on macOS. Ended up just fixing this SQLite one:
```
Python-3.9.0/Modules/_sqlite/connection.c:1066:9: warning: 'sqlite3_trace' is deprecated: first deprecated in macOS 10.12
      [-Wdeprecated-declarations]
        sqlite3_trace(self->db, 0, (void*)0);
        ^~~~~~~~~~~~~
        sqlite3_trace_v2
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h:3022:36: note: 'sqlite3_trace' has
      been explicitly marked deprecated here
SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(
                                   ^
Python-3.9.0/Modules/_sqlite/connection.c:1069:9: warning: 'sqlite3_trace' is deprecated: first deprecated in macOS 10.12
      [-Wdeprecated-declarations]
        sqlite3_trace(self->db, _trace_callback, trace_callback);
        ^~~~~~~~~~~~~
        sqlite3_trace_v2
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h:3022:36: note: 'sqlite3_trace' has
      been explicitly marked deprecated here
SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(
                                   ^
```

Note that: `sqlite3_enable_shared_cache` should be removed from `Modules/_sqlite/module.c` also, as warning and guide says: https://www.sqlite.org/c3ref/enable_shared_cache.html
```
Python-3.9.0/Modules/_sqlite/module.c:147:10: warning: 'sqlite3_enable_shared_cache' is deprecated: first deprecated in macOS
      10.7 - Not supported [-Wdeprecated-declarations]
```

But I think that would require a major version change, so let's keep that warning fix to one side.

Same with the tk issues, as per https://bugs.python.org/issue41016 ; although I suspect there's a way to quiet the warnings here…

----------
components: Build
messages: 380126
nosy: samuelmarks
priority: normal
pull_requests: 21992
severity: normal
status: open
title: Fix SQLite warnings on macOS
type: compile error
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42229>
_______________________________________


More information about the Python-bugs-list mailing list