-
Notifications
You must be signed in to change notification settings - Fork 648
Add support for Django 1.10 and Django REST Framework 3.4 #256
Conversation
djangorestframework-oauth does not support Django 1.10.
This looks great. +1 Not sure what's going on with the |
@mblayman great stuff! What do you mean "That data did not exist under 1.10..."? That assert is just to make sure what's expected after setting a custom @carltongibson thanks for checking this out. |
I see what you mean now with that assert failing after seeing this https://travis-ci.org/GetBlimp/django-rest-framework-jwt/jobs/156378076 |
@jpadilla I looked more closely based on your comments and can now see that deleting the assert for that custom payload handler test was the wrong thing to do. That user data should be there. I'll check if DRF is somehow ignoring the settings change that is done in the I'm traveling tomorrow so I might not get to this for a couple of days. |
I couldn't sleep so I found the problem. The custom handler function is stored in The My guess is that My fix works by hotswapping the module level variable in |
I think using override_settings is the right approach here. |
@carltongibson I'm not clear how
In that sequence, I can't see how changing the setting with |
Argh. You're right. It's setting the value at import time that does it. It would need a bit of a jiggle round. |
With the tests passing, I'm not sure there's anything left to do for this PR. Any chance of getting it merged and cutting a release? I'd love to get my projects upgraded to 1.10. |
@mblayman @carltongibson awesome, glad you figured it out! I'll do a final review on Tuesday to cut a release early in the week. Thanks again for the great work. |
Reason why I haven't released this yet, Travis is reporting some errors. Any help debugging those would be amazing. |
@jpadilla That's really odd considering the build was green before the merge. The broken builds seem to be related to Python 3.3 and a |
@jpadilla Did you get a chance to try a rebuild of master on Travis? |
So I'd like a new release with 1.10 support as well. That being said, when I look at |
@nicholashughes the job you referenced is for a recent Pull Request, not for the latest master build. The last master build is failing for the reasons I documented earlier related to My guess is still that the problem is a bad virtualenv and would work with rebuild. Unfortunately, I do not have permissions to trigger that rebuild to confirm or deny my theory. |
Oh! Dang. Yeah I just clicked on the Build Failing link in the docs and that's what I saw. |
This branch takes a slightly different approach to 1.10/3.4 support than #252. It includes:
tests/urls.py
. 1.10 wasn't working withurlpatterns
in thetest_views
andtest_authentication
files.is_active
behavior for the pre-1.10ModelBackend
and uses the newAllowAllUsersModelBackend
to test the similar behavior for 1.10.verbose
for tox execution to show what is skipped for Travis builds.There is one oddity in this branch that I can't really explain well.
test_jwt_login_custom_response_json
did a check for theusername
with:That data did not exist under 1.10 and I don't understand why. Someone with a bit more history with the project might want to check if that's ok or a behavioral regression that needs to be fixed first.