-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support Django 4 #2801
Support Django 4 #2801
Conversation
e34f744
to
4359835
Compare
64a1827
to
44257e0
Compare
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.
The code looks good, however there seems to be a few errors with authentication still in
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.
Haven't looked through the change notes to check if anything is missing. But just from looking at the changes here everything looks good!
missing-migrations
runs fine locally, so not quite sure why it fails in CI though 🤔
@erlingfn. The auth problems are fixed in webkom/lego-webapp#2924 |
From this related Stack Overflow question I'm suspecting that I recommend running Drone locally for a better traceback of the error: EDIT: Issue is resolved |
6f07760
to
f0353b5
Compare
Codecov Report
@@ Coverage Diff @@
## master #2801 +/- ##
=======================================
Coverage 78.93% 78.93%
=======================================
Files 319 319
Lines 10709 10711 +2
=======================================
+ Hits 8453 8455 +2
Misses 2256 2256
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
`drf-jwt` requires Bearer, instead of `djangorestframework-jwt`'s JWT scheme. This is related to webkom/lego#2801
I've done some extensive testing with this in staging, and everything seems to work as intended ™️. Would appreciate if others had a go with is as well ❤️ |
The Python standard library’s zoneinfo is now the default timezone implementation in Django: https://docs.djangoproject.com/en/4.0/releases/4.0/#zoneinfo-default-timezone-implementation
drf-jwt is an "updated" fork of djangorestframework-jwt, and give support for Django 4. Recommended by the author of djangorestframework-jwt: jpadilla/django-rest-framework-jwt#484
url() was deprecated in Django 3, and removed in Django 4.
As well as django-push-notifications to v3.0.0, in order to support Django 4.
E.g. 'coverage' and 'debug-toolbar' was missing when running `missing-migrations` through tox.
Required by Django
These were causing `missing_migrations` to fail.
The future is now
I've migrated what seems to be necessary in order to support Django 4. But, the new version brings a bunch of new interesting features that I would like to have a closer look at (potentially in a new PR). Nevertheless, this should be "ready" to review.
djangorestframework-jwt
is replaced withdrf-jwt
, which is simply an "updated" fork. However, I thinkdjangorestframework-simplejwt
has some cool features (and the author ofdjangorestframework-jwt
agrees), so I naturally begun to migrate to it but realized in the midst that it was kinda out of scope of what I'm trying to achieve with this PR, sodrf-jwt
will have to do for now - but will be replaced soon! Also, it's nice to diversify breaking changes into multiple PRs to minimize risk 😅