-
-
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
Fixed a deprecation warning #5058
Conversation
Seems valid to me, yup. I'm slightly wary of introducing this change in a minor version, in case there's any unexpected breakages with some older, but still supported, versions of Django. Opinions from anyone else? |
Have re-milsetoned a few weeks ago, but just to make it explicit: We'll aim to merge this in for 3.7.0. Thanks so much for the fix. Good catch! |
Django 1.8 will still be with us for a while. I think we need a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs shim and test as per comment.
btw, the current recommendation in the 2.0 release notes is to drop support for versions below 1.11 |
There's a good question as to when we drop what, i.e. do we really intend to maintain Python 2.7 compat right until 1.11 is EOL (?) , but I think we need to keep 1.8 for now. |
Yeah, dropping Django 1.8 support should probably coincide with adding Django 2.0 support. |
@thierryba Can I ask how you triggered the warning here? I'm trying to reproduce this in a minimal test case and can't quite see how you'd end up in the E.G. If you're using a So, what's your setup such that you hit this? Thanks! |
@carltongibson I actually cannot reproduce it any more. I've obviously switched to newer versions of all 3rdparty including the latest django rest framework. Sorry. |
@thierryba OK. Thanks for the follow-up. @encode/django-rest-framework-core-team Can someone check my reasoning here... — I don't think First we fetch the target field info: django-rest-framework/rest_framework/utils/model_meta.py Lines 31 to 49 in 7d60b7e
Then django-rest-framework/rest_framework/serializers.py Lines 1132 to 1144 in 7d60b7e
But question: won't a relational field always end up coming out of If so then the correct fix here is to just delete the whole
Ta! |
It's not clear if that's viable without more digging. As it happens we're rolling the 3.7 release, and I think it'd be very reasonable for use to move to "1.9, 1.10, 1.11, 2.0" as our supported targets. I think the path of least resistance will be to update our version support, and then merge this in. |
@tomchristie
In my opinion there is little reason to provide support for versions of Django which are not supported, because they do not even get security fixes and so, there is no point in using them in production. Some people however might need a bit more time to make a leap from 1.8 to 1.11. |
@piotr-szpetkowski Given 1.8s LTS status I had thought to keep it for this release. As @rpkilby noted, once Django 2.0 is released we'll be making 1.11 the minimum supported version (following the guidelines). This will be despite the fact that 1.8 will not then be EOL. Given the hoops we need to jump through here we're just going to bring that change forward. (Though I think we can still keep 1.10 for now...) Django REST Framework 3.6 will continue to function with Django 1.8. People stuck on 1.8 can pin to that. The bottom line is that if you're on Django 1.8 your time is much better spent updating Django than on updating Django REST Framework. (If you're on 1.8 you can't claim a concern for the latest features...) Similar reasoning will apply soon enough when we think about dropping support for Python 2.7. If you're on Python 2.7 your time is much better spent updating Python than on updating Django REST Framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, with #5457 coming in, we'll take this as is.
@thierryba Thanks for the input! 👍
To be honest, it's ok to drop 1.8. |
Remove Django 1.8 & 1.9 from README and setup.py
Remove Django 1.8 & 1.9 from README and setup.py
Remove Django 1.8 & 1.9 from README and setup.py
Remove Django 1.8 & 1.9 from README and setup.py
Remove Django 1.8 & 1.9 from README and setup.py
* Set version number for 3.7.0 release * Rename release notes section Moved issue links to top for easier access. (Can move back later) * Add release note for #5273 * Add release note for #5440 * Add release note for #5265 Strict JSON handling * Add release note for #5250 * Add release notes for #5170 * Add release notes for #5443 * Add release notes for #5448 * Add release notes for #5452 * Add release not for #5342 * Add release notes for 5454 * Add release notes for #5058 & #5457 Remove Django 1.8 & 1.9 from README and setup.py * Release notes for merged 3.6.5 milestone tickets Tickets migrated to 3.7.0 milestone. * Add release notes for #5469 * Add release notes from AM 2ndOct * Add final changes to the release notes. * Add date and milestone link Move issue links back to bottom. * Update translations from transifex * Begin releae anouncement * Add release note for #5482 * 3.7 release announcement & related docs.
Simple fix that's using deprecated django api.
was getting "/usr/local/filewave/python/lib/python3.6/site-packages/djangorestframework-3.6.1-py3.6.egg/rest_framework/fields.py:1774: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead."