-
-
Notifications
You must be signed in to change notification settings - Fork 61
[deps] Add support for Django 5.x and update channels #345
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
38289f5 to
3d247ca
Compare
requirements-test.txt
Outdated
| @@ -1,7 +1,4 @@ | |||
| openwisp-utils[qa,selenium] @ https://github.com/openwisp/openwisp-utils/tarball/1.2 | |||
| openwisp-utils[qa,selenium,channels, channels-test] @ https://github.com/openwisp/openwisp-utils/tarball/issues/388-channels | |||
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.
TODO: Update this once PR in openwisp-utils is merged.
be25baf to
78e42f7
Compare
nemesifier
left a comment
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.
A few questions below.
| raise ImproperlyConfigured(f'No such Notification Choice {notification_type}') | ||
|
|
||
|
|
||
| def get_notification_choices(): |
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.
Are you sure this is necessary?
I don't see the django docs saying that passing a callable is necessary for choice fields. Am I missing something?
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.
I have added the comment in the code to explain the implementation details of Django
From the docs:
Passing a callable for choices can be particularly handy when, for example, the choices are:
the result of I/O-bound operations (which could potentially be cached), such as querying a table in the same or an external database, or accessing the choices from a static file.
a list that is mostly stable but could vary from time to time or from project to project. Examples in this category are using third-party apps that provide a well-known inventory of values, such as currencies, countries, languages, time zones, etc.
We fall in the second point. The NOTIFICATION_CHOICES changes when registering/unregistering notification types.
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.
Good, point I was forgetting this important detail for a moment.
| 'Operating System :: OS Independent', | ||
| 'Framework :: Django', | ||
| 'Programming Language :: Python :: 3.8', | ||
| 'Programming Language :: Python :: 3', |
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.
Can you update this consistently with the other modules please?
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.
We don't mention the Python version in any OpenWISP module. I checked the following
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.
Ok great, maybe the other modules I saw were libraries and we use more classifiers there.
- Dropped support for Python < 3.9 - Dropped support for Django < 4.2 Closes #340
| raise ImproperlyConfigured(f'No such Notification Choice {notification_type}') | ||
|
|
||
|
|
||
| def get_notification_choices(): |
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.
Good, point I was forgetting this important detail for a moment.
| 'Operating System :: OS Independent', | ||
| 'Framework :: Django', | ||
| 'Programming Language :: Python :: 3.8', | ||
| 'Programming Language :: Python :: 3', |
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.
Ok great, maybe the other modules I saw were libraries and we use more classifiers there.
Checklist
Blockers
Closes #340