Skip to content

Conversation

@rpkilby
Copy link
Contributor

@rpkilby rpkilby commented Sep 21, 2016

Sorry to recreate #4488 - had to switch branches.


Description

Fixes a number of deprecation warnings generated by DRF. The to-many fix is the only one that really concerns me, as it makes a call to model_meta.get_field_info. Not sure if there's a better way to pass that information to the create/update methods.

There isn't really an easy way to test this without manually running the tests with the -Werror flag. That said, django-guardian also generates a number of warnings too. Just to test it out, you can install my fork, which has the fixes applied.

@rpkilby rpkilby changed the title Fix deprecations Fix 1.10 deprecation warnings Sep 21, 2016
@lovelydinosaur lovelydinosaur added this to the 3.4.8 Release milestone Sep 21, 2016
@rpkilby
Copy link
Contributor Author

rpkilby commented Sep 21, 2016

Adding comment from original PR:


btw - there are two remaining deprecation warnings regarding the use of include:

  • tests/test_routers.py:61
  • tests/test_versioning.py:166
RemovedInDjango20Warning: Specifying a namespace in django.conf.urls.include() without providing an app_name is deprecated. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.

Not sure how to fix these, and tbh I'm not too worried about it as it's internal to the test suite.

connection.features.uses_savepoints,
"'atomic' requires transactions and savepoints."
)
@override_settings(ROOT_URLCONF='tests.test_atomic_requests')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, this test did not fail despite the urls property having been fully deprecated in 1.10

@lovelydinosaur
Copy link
Contributor

Now merged into version-3-5 branch. (#4525) Thanks!

@rpkilby rpkilby deleted the fix-deprecations branch September 29, 2016 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants