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 Python 3.9 and Django 4.0 #1952

Merged
merged 10 commits into from
Apr 16, 2022
Merged

Upgrade to Python 3.9 and Django 4.0 #1952

merged 10 commits into from
Apr 16, 2022

Conversation

czlee
Copy link
Member

@czlee czlee commented Jan 3, 2022

This doesn't work yet.

Two sticking points:

  1. The django-jet library is incompatible in several places with Django 4.0. I've had a crack to see if the fixes are trivial in czlee/django-jet, and might submit a PR to RamsesMartinez/django-jet if they work out. But otherwise we might need to find another solution again—see Upgrade Python to 3.8.2 and Django to 3.0.7 #1507 for the last time we discussed this.

  2. channels requires asgiref<3.4, but Django 4.0 requires asgiref>=3.4.1. This is a known issue, see [RuntimeError: no running event loop] with runworker in channels 2.3.1 with latest asgiref (3.4.0) django/channels#1713.

    We can't stay on channels==2.4.0, because it's also not compatible with Django 4.0 (because LANGUAGE_SESSION_KEY was removed; this has been fixed in channels). So we're currently blocked by django/channels 1713.

This includes:

(The tests pass, but npm run serve does not.)

@czlee
Copy link
Member Author

czlee commented Apr 16, 2022

Okay, I think we're there!

  1. assem-ch/django-jet-reboot seems to do the trick for django-jet.
  2. [RuntimeError: no running event loop] with runworker in channels 2.3.1 with latest asgiref (3.4.0) django/channels#1713 has been resolved in asgiref 3.5.0. We could just remove that line from requirements.txt, but I've opted to lock the version in case this happens again.

@czlee czlee marked this pull request as ready for review April 16, 2022 03:18
@czlee czlee merged commit 9024b2a into develop Apr 16, 2022
@czlee czlee deleted the dependency/django-4.0 branch April 16, 2022 03:22
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.

1 participant