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

Upgrade to Django v4.2 #880

Closed
17 of 18 tasks
mikkonie opened this issue Dec 29, 2021 · 2 comments
Closed
17 of 18 tasks

Upgrade to Django v4.2 #880

mikkonie opened this issue Dec 29, 2021 · 2 comments
Assignees
Labels
breaking Breaking change, to be implemented and documented with care environment Issues of dependencies, CI, deployment etc.
Milestone

Comments

@mikkonie
Copy link
Collaborator

mikkonie commented Dec 29, 2021

Django v4.0 is out since December 2021. SODAR Core v1.0 would be the prime candidate for this dependency bump.

Need to see if there are any issues in SODAR, Varfish, Kiosc et al. potentially preventing this upgrade. Feedback is welcome from @holtgrewe, @stolpeo etc.

Update 2024-01: Django 5.0 is out since December 2023. However, 4.2 is a stable LTS release and I firmly believe we should go with that instead at this point in time.

Requires #1074 (see notes).

Dependency Issues

Internal Issues

  • Replace django.utils.translation.ugettext_lazy imports with gettext_lazy
  • Replace django.conf.urls.url imports with django.urls.re_path
  • Fix BaseForm.__init__() issues in TestRoleAssignmentDeleteView (6)
  • Fix RemoteSiteDeleteView post handling
  • Fix primary key issue in Project.save() (7)
  • Fix primary key issue in projectroles.forms line 700 (8)

Cleanup

Notes

  1. Django v4.x drops support for Python <3.8, which means we should too. Already done!
  2. The release contains breaking changes as well as deprecated and removed features. See release notes here.
  3. Support for Postgres v11 has been dropped in Django v4.2. This means we'll have to upgrade the minimum version used.
    • I had some problems when I attempted an upgrade in sodar-docker-compose. I need to ensure the upgrade can be done without problems. This might just be fixed by deleting existing cache, but we'll see..
  4. SAML support can be removed, see Remove SAML support #1368.
  5. UPDATE: Now actively maintained and a new version has been tagged! Woop!
  6. It seems Django <4 didn't care about extra form kwargs and would just ignore them if not explicitly set in the form init. I had redundantly included CurrentUserFormMixin to this view and before it simply affected nothing.
  7. This raises the error 'Project' instance needs to have a primary key value before this relationship can be used. in Django 4.1. Will probably have to do super().save(commit=False) first.
  8. Seems to be the same problem as in (7).
  9. Automated PyPI release process not working.
  10. Pending review of PR and PyPI release.
@mikkonie mikkonie self-assigned this Jun 16, 2022
@mikkonie mikkonie modified the milestones: v1.0.0, v0.14.0 Mar 7, 2023
@mikkonie mikkonie removed the tbd Comments wanted, spec/schedule/prioritization to be decided, etc. label Sep 14, 2023
@mikkonie mikkonie changed the title Upgrade to Django v4.x Upgrade to Django v4.2 Jan 3, 2024
mikkonie added a commit that referenced this issue Jan 8, 2024
mikkonie added a commit that referenced this issue Jan 9, 2024
@mikkonie
Copy link
Collaborator Author

mikkonie commented Jan 10, 2024

FYI: At the time of writing, I'm holding off from merging this into dev. This is because I realized that in order to get the SODAR dev env working for Postgres v12+, I need to do bihealth/irods-docker#16, bihealth/irods-docker#17 and bihealth/irods-docker#18.

Why? because I'm lazy and don't want to maintain separate docker compose dev envs for SODAR and SODAR Core :P

If I get more resources working on SODAR Core v1.0 tickets before finishing the aforementioned tasks, I'll bite the bullet, merge this and set up separate dev environments for myself..

@mikkonie
Copy link
Collaborator Author

mikkonie commented Mar 1, 2024

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change, to be implemented and documented with care environment Issues of dependencies, CI, deployment etc.
Projects
None yet
Development

No branches or pull requests

1 participant