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
enable sqlite math functions on macos #91045
Comments
Similar to these PRs: https://github.com/python/cpython/pull/24053/files and https://github.com/python/cpython/pull/25892/files which enable the built-in sqlite3 math functions for Windows, I want to have support for them on macos. As per the sqlite3 documentation: https://sqlite.org/releaselog/3_35_0.html this requires compilation with -DSQLITE_ENABLE_MATH_FUNCTIONS . On master, the flag is missing for macos : https://github.com/python/cpython/blob/main/Mac/BuildScript/build-installer.py#L364 |
This is not needed. Quoting https://sqlite.org/compile.html#enable_math_functions:
|
Suggesting to close as "not a bug". |
Duplicate of bpo-42686. |
FTR, here's 3.10 and 3.11 on my Mac, using the official Python.org installers: $ python3.10
Python 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> cx = sqlite3.connect(":memory:")
>>> cx.execute("select sin('1')").fetchone()
(0.8414709848078965,)
$ python3.11
Python 3.11.0a5 (v3.11.0a5:c4e4b91557, Feb 3 2022, 14:54:01) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> cx = sqlite3.connect(":memory:")
>>> cx.execute("select sin('1')").fetchone()
(0.8414709848078965,) |
Thanks for the suggested PR. And thanks for noticing, Erlend! I should have checked with you first! To reiterate what I noted on the PR, this (reduntant) change would only have affected the Pythons provided by the python.org macOS installers; this behavior doesn't necessarily apply to all macOS Pythons. In particular, it appears that the Apple-provided system libsqlite3 does not have this option enabled so if you are building Python on macOS you'd need to supply another version of libsqlite3, like from a third-party distributor (say MacPorts or Homebrew) or build it yourself. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: