Closed Evert-R closed 1 week ago
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: