-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Compat cleanup #5581
Compat cleanup #5581
Conversation
rest_framework/compat.py
Outdated
@@ -254,7 +249,7 @@ def md_filter_add_syntax_highlight(md): | |||
return False | |||
|
|||
try: | |||
import pytz | |||
import pytz # noqa |
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.
Starting with Django 1.11, pytz is a Django requirement. So django-rest-framework can expect it to exist. I think adding a comment with this information would be helpful so that when Django 1.10 is dropped it is noticed and this workaround is removed.
... when dropping Django 1.10
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.
👍
Grrr. GitHub web editor 😡
Was there really an urgency to remove pytz ? |
Just added a note so that we remember when the time comes. pytz will become a hard requirement, so we’ll be able to drop the compat shim. |
@@ -253,8 +248,9 @@ def md_filter_add_syntax_highlight(md): | |||
def md_filter_add_syntax_highlight(md): | |||
return False | |||
|
|||
# pytz is required from Django 1.11. Remove when dropping Django 1.10 support. |
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.
@xordoquy it’s just this comment. Nothing is actually changed yet.
oh, perfect ! |
* Reenable flake8 on compat, cleanup style/imports * Cleanup compat urls imports * Refactor compat url pattern/resolver imports * Add comment re dropping pytz compat ... when dropping Django 1.10 * Strip whitespace Grrr. GitHub web editor 😡
compat
module, which is why whitespace issues went undetected by the linter. Removed the global noqa and re-added where necessary to individual lines.RegexURLPattern
=>URLPattern
RegexURLResolver
=>URLResolver