-
-
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
Django 1.9 deprecation warnings #3729
Comments
Thanks for raising! |
can anyone help me how to figure out list of all deprecated warnings so that we can change in corresponding files. I tried running tests with -r w option but it didn't help. |
good question. @cnobile2012 any tip on how you got the warnings ? |
Sorry guys, been real busy . I have an old table that has issues which I'm in the process of fixing. $ ./manage.py test -k /home/cnobile/.virtualenvs/dinventory/local/lib/python2.7/site-packages/oauth2_provider/urls.py:20: Using existing test database for alias 'default'... for relation in opts.get_all_related_objects(): /home/cnobile/.virtualenvs/dinventory/local/lib/python2.7/site-packages/rest_framework/utils/model_meta.py:149: /home/cnobile/.virtualenvs/dinventory/local/lib/python2.7/site-packages/rest_framework/renderers.py:676: |
Thanks @cnobile2012. Let me cleanup these warnings. @xordoquy is there any way to figure out all the deprecation warnings in the code base so that I will clean up all.? Or I should only follow up the release notes of django 1.9? may I know how you guys got rid of deprecation warning for previous versions? |
Running DRF's tests (which I expect to be comprehensive) under |
@aaugustin - Indeed. Possible that we should be doing that as part of the standard travis runs. |
You may have to be smart and e.g. run with Really it depends what level of warnings you have to tolerate to remain compatible with all version of Django you target. Once you make that decision, it makes sense to enforce it on the CI. |
@aaugustin - Thanks. Good info |
Sorry for late response. I have run the drf tests with -Werror, and here is the following output
I think its problem with py.test deprication. And here is the output of
This shows 2 pytest-warnings. So I executed
And I think none of them shows any django 1.9 deprication problem in drf. What you guys think.. Am i missing something? |
python -Werror generates warnings informing that on_delete is a required keyword in Django 2.0
I've been running our tests with
|
I'm a bit surprised we don't see them in our test suite. |
I'm using the |
@jplock it's not about the test runner, it's about DRF test suite itself. |
Back to my original proposal though, would you welcome a pull request to try and address some of these? I wasn't sure if anyone else was looking into it or not. |
@jplock will process it if we get something sure. |
Documentation at https://docs.djangoproject.com/en/1.9/ref/templates/api/# says nothing about using dictionary instead of Context/RequestContext objects :( |
|
|
@xordoquy @aaugustin, thank you for clarification! |
Believe these all to be resovled via #4158 |
I realize you may not have gotten to these yet, but just in case you didn't know about them, there are new deprecation warning spit out when I ran my unit tests.
The text was updated successfully, but these errors were encountered: