Skip to content

TTVA-228 | Upgrade Django, Python & Node #195

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

Draft
wants to merge 22 commits into
base: tre-varaamo-qa
Choose a base branch
from

Conversation

japauliina
Copy link

@japauliina japauliina commented Feb 21, 2025

Upgrade major tech stack versions:

  • Upgrade Django to 4.2
  • Upgrade Python to 3.10
  • Upgrade Node.js to v20

Refs TTVA-228, TTVA-232, TTVA-233, TTVA-234, TTVA-235

Upgrade Django to 3.0 and update also other dependencies to the latest
possible versions.

Changes:
- Replace deprecated ugettext_lazy with gettext_lazy
- Replace django.utils.six with six

Refs TTVA-232
Replace deprecated functions with the new ones:
- force_text -> force_str
- ugettext -> gettext
- ungettext -> ngettext

Refs TTVA-232
Upgrade Django to 3.1 and update also other dependencies to the latest
possible versions.

Changes:
- New migration for AbstractUser.first_name max_length increased to 150
- Fix FieldDoesNotExist import as it was removed from
django.db.models.fields

Refs TTVA-232
Upgrade Django to 3.2 and update also other dependencies to the latest
possible versions.

Changes:
- Get response headers from HttpResponse.headers as they are now stored
there.
- Add DEFAULT_AUTO_FIELD setting as suggested by Django 3.2.
- Remove usage of QuerySet.distinct() after union() as it is not
supported anymore.

Refs TTVA-232
Change django.contrib.postgres.fields.JSONField to models.JSONField  as
it will be removed in Django 4.0.

Refs TTVA-232
NullBooleanField is deprecated and will be removed in Django 4.0.
Change to suggested BooleanField(null=True).

Refs TTVA-232
Upgrade Django to 4.0 and update also other dependencies to the latest
possible versions.

USE_DEPRECATED_PYTZ is set to True for now. Django is migrating from
pytz to zoneinfo and this setting will be removed in Django 5.0.

Changes:
- Migrations autodetector changes
- Remove providing_args argument from django.dispatch.Signal
- Replace removeddjango.conf.urls.url with django.urls.re_path
- Add now required length argument to get_random_string

Refs TTVA-232
Upgrade Django to 4.1 and update also other dependencies to the latest
possible versions.

Refs TTVA-232
Upgrade Django to 4.2 and update also other dependencies to the latest
possible versions.

Changes:
- TranslationOptions's fields was named to all_fields
- Fix error "Router with basename "resource" is already registered" by
adding ResourceListViewSet directly to the urlpatterns.

Refs TTVA-232
Refs TTVA-233
Django-ckeditor is bundled with CKEditor 4.22.1 which isn't supported
anymore and has unfixed security issues. Remove django-ckeditor and
switch to a TextField for now.

Refs TTVA-235
Refs TTVA-234
Refs TTVA-234
Refs TTVA-234
@japauliina japauliina force-pushed the TTVA-228-upgrade-django-python-node branch 6 times, most recently from 31bb1b5 to 9702524 Compare March 7, 2025 11:43
@japauliina japauliina requested a review from jopesy March 7, 2025 11:51
@japauliina japauliina force-pushed the TTVA-228-upgrade-django-python-node branch from 9702524 to 1651a67 Compare March 12, 2025 07:44
Copy link
Collaborator

@jopesy jopesy left a comment

Choose a reason for hiding this comment

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

Looks very good, and this was nice to review as well thanks to the nicely split commits and commit messages. Also I approve of the fact the number of added lines is an even 10000 which looks nice. Good work Pauliina!

image

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.

2 participants