Skip to content
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

Upgrade to SQLite 3.30; Django 2.2 requires at least SQLite 3.8.3. #106

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

FlipperPA
Copy link
Contributor

@FlipperPA FlipperPA commented Jul 27, 2019

UPDATE: this is unlikely to ever be merged in. Please use the more modern version here: https://github.com/FlipperPA/django-s3-sqlite

This upgrades to the latest/greatest version.

Django 2.2 deploys using SQLite (or the Zappa Django Utils s3sqlite engine) will fail, because the current package is SQLite 3.6.0.

Cheers!

@youcandanch
Copy link

@FlipperPA did you ever get this working? I for the life of me can't.

@FlipperPA
Copy link
Contributor Author

@youcandanch I'm going to give it another whirl next week. I had it working locally, and wanted to test it as part of Lambda packages, but now it doesn't appear to be working from local. I'm wondering if I missed something, or something was cached.

I'll look into it more deeply next week.

@FlipperPA FlipperPA changed the title Upgrade to SQLite 3.29; Django 2.2 requires at least SQLite 3.8.3. HOLD: Still testing: Upgrade to SQLite 3.29; Django 2.2 requires at least SQLite 3.8.3. Aug 24, 2019
@FlipperPA FlipperPA changed the title HOLD: Still testing: Upgrade to SQLite 3.29; Django 2.2 requires at least SQLite 3.8.3. HOLD: Still testing: Upgrade to SQLite 3.30; Django 2.2 requires at least SQLite 3.8.3. Nov 16, 2019
@FlipperPA
Copy link
Contributor Author

I finally got some time to look at this. It turns out we need to build a full build_static version of SQLite3 with Python, rather than linking to the system version, which would still be 3.7.17 on AWS. I followed the instructions here:

https://charlesleifer.com/blog/compiling-sqlite-for-use-with-python-applications/

This created a much, much larger binary (which makes sense), because it should contain all of SQLite. I've successfully pushed out the binary and have it responding from AWS Lambda with version 3.30:

(pyphilly_venv) [tallen@wrds-pub1-dev-h pyphilly]$ zappa invoke --raw dev "import sqlite3; print(sqlite3.sqlite_version)"
Calling invoke for stage dev..
[START] RequestId: 14afc48d-076e-45dd-8218-7b184b876079 Version: $LATEST
[DEBUG] 2019-11-16T22:44:08.936Z 14afc48d-076e-45dd-8218-7b184b876079 Zappa Event: {'raw_command': 'import sqlite3; print(dir(sqlite3)); print(sqlite3.sqlite_version)'}
3.30.1
[END] RequestId: 14afc48d-076e-45dd-8218-7b184b876079
[REPORT] RequestId: 14afc48d-076e-45dd-8218-7b184b876079
Duration: 2.97 ms
Billed Duration: 100 ms
Memory Size: 512 MB
Max Memory Used: 81 MB

Anyone else care to test? @youcandanch?

@FlipperPA FlipperPA changed the title HOLD: Still testing: Upgrade to SQLite 3.30; Django 2.2 requires at least SQLite 3.8.3. Upgrade to SQLite 3.30; Django 2.2 requires at least SQLite 3.8.3. Nov 17, 2019
@FlipperPA
Copy link
Contributor Author

@Miserlou @mcrowson @jneves This is now ready to be merged. I've got it running in dev and production on my site at https://pyphilly.org/ with the latest Django and Wagtail versions. Huzzah!

@FlipperPA
Copy link
Contributor Author

If anyone is waiting for this, in the meantime, feel free to use this: https://github.com/FlipperPA/django-s3-sqlite

@vaivars
Copy link

vaivars commented Jul 6, 2020

Is there any progress in merging this?

@FlipperPA
Copy link
Contributor Author

@vaivars It is unlikely this will every be merged in. You can use https://github.com/FlipperPA/django-s3-sqlite which is now more advanced, with quite a few more checks to help avoid (but not eliminate) race conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants