Ned Deily <n...@python.org> added the comment:
Thanks for the report. However, I think you've drawn the wrong conclusion form what you've observed. The reason you are unable to do what you are trying to do is that the _sqlite3 module included with the python.org macOS Pythons is statically linked with its own copy of an sqlite3 library, not dynamically linked. This has been true for a long time (10+ years); I believe the original reason was to avoid linking with the Apple-supplied system copy of the sqlite3 library. You can see this by using otool: - with the python.org 3.9.4: $ /usr/local/bin/python3.9 -c 'import sys;print(sys.version)' 3.9.4 (v3.9.4:1f2e3088f3, Apr 4 2021, 12:19:19) [Clang 12.0.0 (clang-1200.0.32.29)] $ /usr/local/bin/python3.9 -c 'import _sqlite3;print(_sqlite3.__file__)' /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_sqlite3.cpython-39-darwin.so $ otool -L $(/usr/local/bin/python3.9 -c 'import _sqlite3;print(_sqlite3.__file__)') /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_sqlite3.cpython-39-darwin.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1) - with a MacPorts python3.9.4: $ /opt/macports/bin/python3.9 -c 'import _sqlite3;print(_sqlite3.__file__)' /opt/macports/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_sqlite3.cpython-39-darwin.so $ otool -L $(/opt/macports/bin/python3.9 -c 'import _sqlite3;print(_sqlite3.__file__)') /opt/macports/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_sqlite3.cpython-39-darwin.so: /opt/macports/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1) If you want to replace the sqlite3 library, you would need to rebuild the _sqlite3 module. That's not something we would encourage or support. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43773> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com