-
Notifications
You must be signed in to change notification settings - Fork 45
Switch to Django 3.2 and get rid of warnings #2318
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
Conversation
The following warning is raised by dependencies: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working The dependencies in question are: IPy, napalm, networkx. |
The following warning should probably not be handled before we are running on Django 3.2: (fields.W904) The replacement, |
9d3a513
to
a5308d9
Compare
Gets rid of the following warnings: RemovedInDjango40Warning: The {% ifequal %} template tag is deprecated in favor of {% if %}. RemovedInDjango40Warning: The {% ifnotequal %} template tag is deprecated in favor of {% if %}.
Gets rid of warning: RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
Gets rid of warning: models.TimePeriod: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the NavModelsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
Get rid of warning: RemovedInDjango40Warning: The providing_args argument is deprecated. As it is purely documentational, it has no replacement. If you rely on this argument as documentation, you can move the text to a code comment or docstring.
Gets rid of warning: RemovedInDjango41Warning: 'blapp' defines default_app_config = 'blapp.apps.BlappConfig'. Django now detects this configuration automatically. You can remove default_app_config.
Gets rid of warning: RemovedInDjango40Warning: Passing None for the middleware get_response argument is deprecated.
Gets rid of warning: RemovedInDjango40Warning: django.utils.translation.ugettext() is deprecated in favor of django.utils.translation.gettext().
Gets rid of warning: (fields.W903) NullBooleanField is deprecated. Support for it (except in historical migrations) will be removed in Django 4.0.
a5308d9
to
9043bf9
Compare
Codecov Report
@@ Coverage Diff @@
## master #2318 +/- ##
==========================================
- Coverage 58.02% 58.02% -0.01%
==========================================
Files 554 552 -2
Lines 40211 40207 -4
==========================================
- Hits 23334 23330 -4
Misses 16877 16877
Continue to review full report at Codecov.
|
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.
Overall, I'd say this looks peachy. The burning question is whether this completely moves NAV to require Django >= 3.2...
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.
Based on feedback, I am correct in assuming this PR solidly takes us into Django>=3.2
-land, which means a few more things are needed:
-
/requirements.txt
still requires Django 2.2. This needs an update. -
/NOTES.rst
needs a note about all the changed dependencies. -
/doc/howto/generic-install-from-source.txt
still includes a requirements list for Django 1.11, this needs an update.
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.
And just in time for the weekend! :)
Lots of things that were introduced in 2.2 replaces things that are removed in 4.0. When running on 3.2, this leads to various types of warnings. Depends on #2317.
Warnings triggered by Python itself, for pythons currently not supported by NAV like 3.9 or 3.10, will also be collected here.