Skip to content

Fix 1.10 deprecation warnings #4505

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

Closed
wants to merge 6 commits into from
Closed

Conversation

rpkilby
Copy link
Member

@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
@tomchristie tomchristie added this to the 3.4.8 Release milestone Sep 21, 2016
@rpkilby
Copy link
Member 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.

@@ -124,22 +138,8 @@ def test_api_exception_rollback_transaction(self):
connection.features.uses_savepoints,
"'atomic' requires transactions and savepoints."
)
@override_settings(ROOT_URLCONF='tests.test_atomic_requests')
Copy link
Member 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

@tomchristie
Copy link
Member

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