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

Feat: update Caluma to Django 4.2 #2130

Merged
merged 14 commits into from
Jan 30, 2024

Conversation

winged
Copy link
Contributor

@winged winged commented Jan 23, 2024

Thanks for the initial work, @StephanH90

@winged winged requested review from open-dynaMIX and anehx January 23, 2024 14:30
@winged
Copy link
Contributor Author

winged commented Jan 23, 2024

Note: Review can be done commit-by-commit, all changes are documented

@winged winged force-pushed the feat_update_to_django_42 branch 8 times, most recently from 3c5daae to d57fe83 Compare January 25, 2024 12:47
Copy link

@rhizoome rhizoome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

winged and others added 13 commits January 25, 2024 14:40
Notable change: replacing `psycopg2` with `psycopg`, version 3

BREAKING CHANGE: This drops support for PostgreSQL versions 9, 10 and 11,
as well as Python 3.8.

Co-Authored-By: Stephan Hug <[email protected]>
Psycopg3 is imported as `psycopg`, and has a few differences that we fix here
The `USE_L10N` setting is deprecated in Django 5 and causes deprecation
warnings when kept. And it's Django's default behaviour since ages, so
no ill effects here

Co-Authored-By: Stephan Hug <[email protected]>
The `nulls_first` / `nulls_last` params now want `True` or `None`
instead of `True`/`False`, so that's what we do ¯\_(ツ)_/¯
The exception types and messages changed a bit with Django 4.2
This command will never be run again, so I'm `xfail`in the test
and marking it as "no cover". There are no old Caluma installations
that haven't been migrated, so we don't even care that the command
doesn't seem to work properly in Django 4.2+ any more
This is basically a no-op, just Django cleaing up some old stuff.
Previously, the `related_name` was set to some value that's invalid/unused now,
but hasn't been detected in a long time.
Django 4.2 does not support PostgreSQL versions older than 12.
Also, Python 3.8 will be EOL'd soon, so we're dropping that one
as well.
The django-localized-fields app enables the hstore extension in the
DB, and therefore must run first. This was probably only "accidentally
correct" before, but now it's explicit. Fixes DB migration issues on
fresh,clean databases.

Co-authored-by: Jean-Louis Fuchs <[email protected]>
Co-authored-by: Jean-Louis Fuchs <[email protected]>
We can't do anything about it right now, as it seems to be in graphene,
not our code. Also it's a while until python 3.14, so we can wait a bit
until Graphene is updated
The analytics table here doesn't do ordering in SQL, so we should
not assume sorted output.
@winged winged force-pushed the feat_update_to_django_42 branch from d57fe83 to 136f1ae Compare January 25, 2024 13:41
@winged winged requested a review from czosel January 25, 2024 13:41
@winged
Copy link
Contributor Author

winged commented Jan 25, 2024

Note: With this, we're dropping support for PostgreSQL versions older than 12, and Python 3.8 is also no longer supported. See message of commit caf6a12

@derrabauke derrabauke merged commit 1578fbf into projectcaluma:main Jan 30, 2024
24 checks passed
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