Repository navigation
Build SQLite with SQLITE_ENABLE_PERCENTILE for Windows and CPython-3.15+ #152023
Copy link
Copy link
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3type-featureA feature request or enhancementA feature request or enhancement
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Jun 23, 2026 Our requirement is currently SQLite 3.15.2, as noted in the documentation. The file you're linking to is just what we use to pull our stored dependencies when we build Windows releases. Other redistributors (e.g., Astral's products, Homebrew, or Debian) need not use the same version.
@StanFromIreland I missed that. Sorry for the noise.
- addedextension-modulesC modules in the Modules dirC modules in the Modules dir
on Jun 23, 2026 It doesn’t mean we can't expose them when available (if they are actually useful to users), we already do so for other APIs. But this isn't my area, so I'll leave this up to @erlend-aasland :-)
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3type-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsDone
Feature or enhancement
Proposal:
For Windows, CPython-3.15 requires SQLite-3.53.2. Since 3.51.0, the aggregate functions median and percentile are part of SQLite's amalgamation. I believe that this means that they are found to be mature. To have them available at run-time, SQLite needs to be built with
SQLITE_ENABLE_PERCENTILE. Python's PCBuild activates a few built-in extensions of SQLite, but not this one yet.Inserting
SQLITE_ENABLE_PERCENTILEhere might be everything needed.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
I have not found previous discussions on this topic.
This discussion is about the ability to load SQLite extension modules at run-time, which is somehow related, as it can be used as an (inconvenient) fallback.
Another fallback is to implement these statistical functions in Python and bind them to a data base connection. This works, but is slower than having them built into SQLite (76s vs. 68s in my non-repesentative query).
Linked PRs