Skip to content
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

Model._meta API warnings with Django 1.9 (RemovedInDjango110Warning) #3252

Closed
jamesbeith opened this issue Aug 9, 2015 · 9 comments
Closed
Labels
Milestone

Comments

@jamesbeith
Copy link
Contributor

jamesbeith commented Aug 9, 2015

Whilst running Django 1.9.dev (master) I'm getting a couple of warnings in relations to the changes in the Model._meta API introduced in Django 1.8.

.../lib/python3.4/site-packages/rest_framework/utils/model_meta.py:130: RemovedInDjango110Warning: 'get_all_related_objects is an unofficial API that has been deprecated. You may be able to replace it with 'get_fields()'
for relation in opts.get_all_related_objects():

.../lib/python3.4/site-packages/rest_framework/utils/model_meta.py:141: RemovedInDjango110Warning: 'get_all_related_many_to_many_objects is an unofficial API that has been deprecated. You may be able to replace it with 'get_fields()'
for relation in opts.get_all_related_many_to_many_objects():

@tomchristie
Copy link
Member

tomchristie commented Aug 9, 2015

Noted, thanks.
We'll aim to clear this up as part of official 1.9 support when that comes out.

@tomchristie
Copy link
Member

tomchristie commented Sep 28, 2015

Now resolved in master.

@jamesbeith
Copy link
Contributor Author

jamesbeith commented Nov 1, 2015

Now running Django 1.9b1 and DRF 3.3.0 I'm continuing to get a couple of warnings in relations to the changes in the Model._meta API introduced in Django 1.8.

...lib/python3.4/site-packages/rest_framework/utils/model_meta.py:137: RemovedInDjango110Warning: 'get_all_related_objects is an unofficial API that has been deprecated. You may be able to replace it with 'get_fields()'
for relation in opts.get_all_related_objects():

.../lib/python3.4/site-packages/rest_framework/utils/model_meta.py:149: RemovedInDjango110Warning: 'get_all_related_many_to_many_objects is an unofficial API that has been deprecated. You may be able to replace it with 'get_fields()'
for relation in opts.get_all_related_many_to_many_objects():

@tomchristie tomchristie reopened this Nov 1, 2015
@tomchristie
Copy link
Member

tomchristie commented Nov 1, 2015

Thanks for the report.

tomchristie added a commit that referenced this issue Nov 19, 2015
Fix #3252 -- Use related_objects api for Django 1.9+
@jsclev
Copy link

jsclev commented Feb 13, 2016

It's unclear to me whether this issue is supposed to have been resolved. I am using Django 1.9 and DRF 3.2.4 and am getting these warnings. Is there still a plan to fix these? I have googled a solution to no avail. I also cannot figure out a way to suppress them. I care because they output from my automated build, which causes the developers to sometimes think there is an error from the build, when it's really just a warning.

@xordoquy
Copy link
Collaborator

xordoquy commented Feb 14, 2016

They are known to be resolved in master

@jsclev
Copy link

jsclev commented Feb 18, 2016

Thanks for the info. I just upgraded to DRF 3.3.2, ran my automated build, and the warnings are gone. Thanks for your help.

@xordoquy
Copy link
Collaborator

xordoquy commented Feb 18, 2016

Thanks for the feedback.

@tomchristie
Copy link
Member

tomchristie commented Feb 18, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants