Skip to content

Fix Django deprecation warning #346

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

Merged
merged 1 commit into from
May 7, 2017

Conversation

amw
Copy link
Contributor

@amw amw commented May 7, 2017

RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls

```
RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls
```
@amw amw force-pushed the django-deprecations branch from 01f7d99 to ebf0f4c Compare May 7, 2017 20:15
@codecov-io
Copy link

codecov-io commented May 7, 2017

Codecov Report

Merging #346 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #346      +/-   ##
===========================================
+ Coverage    76.37%   76.38%   +<.01%     
===========================================
  Files           50       50              
  Lines         6024     6026       +2     
===========================================
+ Hits          4601     4603       +2     
  Misses        1423     1423
Impacted Files Coverage Δ
rest_framework_json_api/views.py 95.48% <100%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da97874...ebf0f4c. Read the comment docs.

@mblayman
Copy link
Collaborator

mblayman commented May 7, 2017

You were busy today. 😄 Thanks, @amw! 👍

@mblayman mblayman merged commit 8970398 into django-json-api:develop May 7, 2017
@lucacorti
Copy link
Contributor

This now breaks drf-j-a on Django 2.0 rc.

@mblayman
Copy link
Collaborator

Do you mean that this fix breaks DJA on Django 2.0? Or do you mean that, because this fix is not in a released version on PyPI, DJA is broken on Django 2.0? I'm trying to figure out if the thing to fix this issue is to upload a release to PyPI.

@lucacorti
Copy link
Contributor

@mblayman Sorry, I mean this needs a PyPI release to be compatible with Django>=2.0.0 beacause the issue fixed by this this pull request has upgraded from deprecation to error in the 1.11 -> 2.0 upgrade.

@lucacorti
Copy link
Contributor

Also, this could be improved since Django 2.0.0 release notes are encouraging app authors to drop support for Django <= 1.11 so the version check on import could be removed if a new release is targeting Django>=1.11.

@mblayman
Copy link
Collaborator

Yeah, I agree. I think I need to put out a release that includes support for the older versions and the newer versions so there is a migration path, then the project can start dropping some of the older stuff (which will be nice because some of the imports are a mess).

@lucacorti
Copy link
Contributor

Yes, these two could be probably be tackled separately. A minor release as-is to make drf-ja work with Django>=2.0.0 and a new major with a larger refactoring to cleanup the compatibility stuff.

@lucacorti
Copy link
Contributor

relations.py has the same import and errors out on Django >= 2.0. Can this be fixed as a point release?

@lucacorti
Copy link
Contributor

See #392

@amw amw deleted the django-deprecations branch August 6, 2019 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants