-
-
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
'generateschema' doesn't work with Python 2 #6261
Comments
We were mistakenly importing the 'urlparse' function from the Python 2 'urlparse' module, as opposed to the module itself. Correct this. Signed-off-by: Stephen Finucane <[email protected]> Closes: encode#6261
I've part of this fixed with #6262 but there are more issues here.
|
Given #6230 (which'll be 3.10) I'm wondering how much effort we want to exert here. (We may just want to say "Oh well...") Milestoned for 3.9.1, since it's that or not at all. |
I'm running into this issue currently, and would like to voice the opinion that while 1.11 is LTS things like this should work as intended. |
@stephenfin Any update on the remaining issues? |
I hadn't prioritized them as it didn't seem worth the effort, per #6261 (comment). I can pick it back up though. I think #6262 is ready to go as-is. |
* compat: (py2) urlparse = urllib.parse (py3) We were mistakenly importing the 'urlparse' function from the Python 2 'urlparse' module, as opposed to the module itself. Correct this. Signed-off-by: Stephen Finucane <[email protected]> Closes: #6261 * compat: Remove 'compat.urlparse' We can just use Django's vendored six library, like we do everywhere else. Signed-off-by: Stephen Finucane <[email protected]>
* compat: (py2) urlparse = urllib.parse (py3) We were mistakenly importing the 'urlparse' function from the Python 2 'urlparse' module, as opposed to the module itself. Correct this. Signed-off-by: Stephen Finucane <[email protected]> Closes: encode#6261 * compat: Remove 'compat.urlparse' We can just use Django's vendored six library, like we do everywhere else. Signed-off-by: Stephen Finucane <[email protected]>
Checklist
master
branch of Django REST framework.Steps to reproduce
Run
python manage.py generateschema
on Python 2.Expected behavior
It should run.
Actual behavior
Python 2.
Python 3
Looks like a dodgy wrapper in
rest_framework.compat
.The text was updated successfully, but these errors were encountered: