Upgrade to SQLite 3.30; Django 2.2 requires at least SQLite 3.8.3.
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!
@FlipperPA did you ever get this working? I for the life of me can't.
@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.
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?
@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!
If anyone is waiting for this, in the meantime, feel free to use this: https://github.com/FlipperPA/django-s3-sqlite
Is there any progress in merging this?
@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.
I’m not sure how to test this, but I see tests added.
npm test -- prettier from the root!
Did you mean to remove the social banner in this branch?
Did you mean to remove the social banner in this branch?
No, those commits were on main but got overwritten. Rebase seems to have fixed it appearing on this branch.
I was playing around with this locally, and there seem to be some edge cases with interpolations where running Prettier breaks the syntax.
Oh no! Good catch. I'm really hoping we don's have to implement much custom printing logic, but it may be the only way around stuff like this.
I'll have to check how the official JSX formatting handles expressions!