-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
RegexURLResolver no longer exists in Django 2.0(a1) #5456
Comments
Pretty sure it's |
Ok, so as far as I've been able to figure out, they're far from drop-in replacements. The entire way resolving paths used to work appears to have been refactored and you would need to do some work to work with this new api. You would need some compatibility shim, as some of the attributes have been renamed or layers of indirection have been added since Django 2.0. |
Its now |
|
Also running Django 2.x alpha with the latest Rest Framework When running python manage.py compress the following output is returned: Just adding it here in case it helps with any debugging. Would be happy to do anything else to help too. |
I just installed DRF 3.7, and it seems that there still is a compatibility issue with Django 2.0 (a1): File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "~/myproject/urls.py", line 4, in <module>
from django_rest_passwordreset.views import reset_password_request_token, reset_password_confirm
File "~/myproject/views.py", line 8, in <module>
from rest_framework import parsers, renderers, status
File "~/myproject/venv/lib/python3.5/site-packages/rest_framework/parsers.py", line 23, in <module>
from rest_framework import renderers
File "~/myproject/venv/lib/python3.5/site-packages/rest_framework/renderers.py", line 24, in <module>
from rest_framework import VERSION, exceptions, serializers, status
File "~/myproject/venv/lib/python3.5/site-packages/rest_framework/exceptions.py", line 17, in <module>
from rest_framework.utils.serializer_helpers import ReturnDict, ReturnList
File "~/myproject/venv/lib/python3.5/site-packages/rest_framework/utils/serializer_helpers.py", line 8, in <module>
from rest_framework.compat import unicode_to_repr
File "~/myproject/venv/lib/python3.5/site-packages/rest_framework/compat.py", line 31, in <module>
from django.core.urlresolvers import ( # Will be removed in Django 2.0
ImportError: No module named 'django.core.urlresolvers' Could be fixed by PR #5485 |
Checklist
master
branch of Django REST framework.In testing an application against Django 2.0a1, I ran into a confusing error:
After investigating, it is related to a shim for older Django versions which now breaks as of Django 2.0a1:
django-rest-framework/rest_framework/compat.py
Line 28 in 607e4ed
It turns out,
RegexURLResolver
no longer exists. I would imagine this is related to the new simplified URL patterns.I'm unsure what the exact fix is at this moment, as I haven't dug into the new url implementation(s) yet, but I do recall that the old regex functionality is being maintained.
The text was updated successfully, but these errors were encountered: