Skip to content

Commit 1c64a7a

Browse files
committed
Adjust the error message shown for missing SQLite headers
Since `pysqlite3` 0.6.0 was just released, that now ships with precompiled wheels, which means: 1. Our test for the error handling now started failing, since the package now works out of the box rather than erroring. 2. Our advice for which package to use has now changed, since users now only need to update to a newer version of `pysqlite3` rather than switch to the `pysqlite3-binary` package. GUS-W-20804528.
1 parent 2833d03 commit 1c64a7a

File tree

4 files changed

+10
-21
lines changed

4 files changed

+10
-21
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Adjusted the error message shown if SQLite headers aren't found during package installation. ([#2006](https://github.com/heroku/heroku-buildpack-python/pull/2006))
56

67
## [v326] - 2026-01-05
78

bin/warnings

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,9 @@ show-warnings() {
2929
2. Replace any `pysqlite3` imports in your app with `sqlite3`.
3030
3131
Alternatively, if you can't use the `sqlite3` stdlib module,
32-
switch from the `pysqlite3` package to `pysqlite3-binary`,
33-
which is pre-compiled and doesn't need the SQLite headers to
34-
be installed.
35-
36-
If instead you need the SQLite headers for another reason
37-
(or wish to continue to compile the `pysqlite3` package from
38-
source), then install the `libsqlite3-dev` and `libsqlite3-0`
39-
packages using the APT buildpack (make sure the APT buildpack
40-
runs before the Python buildpack, not after):
41-
https://github.com/heroku/heroku-buildpack-apt
32+
update your `pysqlite3` package to 0.6.0 or newer, since the
33+
newer versions are published with pre-compiled wheels and so
34+
don't need the SQLite headers to be installed.
4235
EOF
4336
build_data::set_string "failure_detail" "sqlite3.h: No such file or directory"
4437
elif grep -qi 'Please use pip<24.1 if you need to use this version' "${install_log}"; then
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
pysqlite3
1+
# We have to use an older version to test the custom SQLite headers error message,
2+
# since pysqlite3 0.6.0+ ships with precompiled wheels and so doesn't error.
3+
pysqlite3==0.5.4

spec/hatchet/pip_spec.rb

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -449,16 +449,9 @@
449449
remote: ! 2. Replace any `pysqlite3` imports in your app with `sqlite3`.
450450
remote: !
451451
remote: ! Alternatively, if you can't use the `sqlite3` stdlib module,
452-
remote: ! switch from the `pysqlite3` package to `pysqlite3-binary`,
453-
remote: ! which is pre-compiled and doesn't need the SQLite headers to
454-
remote: ! be installed.
455-
remote: !
456-
remote: ! If instead you need the SQLite headers for another reason
457-
remote: ! (or wish to continue to compile the `pysqlite3` package from
458-
remote: ! source), then install the `libsqlite3-dev` and `libsqlite3-0`
459-
remote: ! packages using the APT buildpack (make sure the APT buildpack
460-
remote: ! runs before the Python buildpack, not after):
461-
remote: ! https://github.com/heroku/heroku-buildpack-apt
452+
remote: ! update your `pysqlite3` package to 0.6.0 or newer, since the
453+
remote: ! newer versions are published with pre-compiled wheels and so
454+
remote: ! don't need the SQLite headers to be installed.
462455
remote:
463456
remote:
464457
remote: ! Error: Unable to install dependencies using pip.

0 commit comments

Comments
 (0)