-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update django to 4.2.0, update python to 3.11 #1158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the tests succeed and (ideally) don't take 15 minutes to complete, I'd say this is good to go. Perhaps you could deploy it to the test environment just in case before merging its to see if it works "in real life".
Yes, I'll do that tomorrow ! Nice to have this done for my holiday |
This PR updates python and django.
When
CSRF_TRUSTED_ORIGINS
is present, all backend tests are now succesfull, but I suggest we test this update thoroughly.I ran all the experiments on my machine and everything seems to be working fine.
Updated:
This needs to be added to the environment variables:
See: Django documentation
Deprecated functions
This is used by Django inline actions which hasn't been updated since 2021.
Fixed by: putting
django.utils.translation.ugettext_lazy = gettext_lazy
inbase_settings.py
Behaviour changes
When creating a new playlist and selecting a csv file, the csv was always processed even though
process_csv
was not selectedFixed by: Only reading the csv file to the
Playlist.csv
field whenprocess_csv
is selected.Syntax changes
random.sample
Changed in python 3.11: The population must be a sequence. Automatic conversion of sets to lists is no longer supported.Fixed by converting the output to a list.
old_songs = random.sample(list(old_new_song_set), k=n_old)
Flake8 config file doesn't allow inline comments anymore.
A lot of Admin tests were failing
Fixed by replacing:
with:
In python 3.11 this caused the following error: