django-rest-framework-proxy icon indicating copy to clipboard operation
django-rest-framework-proxy copied to clipboard

Django 3 compatibility: django.utils.six has been removed

Open MarkusShepherd opened this issue 6 years ago • 2 comments

Django 3 removed some Python 2 compatibility libraries which this project depends on, making it impossible right now to upgrade to Django 3.

This PR patches the problem by catching the ImportError and importing six directly instead. It also adds six as a dependency (in the version as it was available in Django 2.2).

A full fix would be to drop six altogether since Python 2 is officially retired now and no longer supported by Django, but this is beyond the scope of this PR.

MarkusShepherd avatar Jan 14 '20 09:01 MarkusShepherd

Codecov Report

Merging #33 into master will decrease coverage by 0.74%. The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
- Coverage   67.55%   66.81%   -0.75%     
==========================================
  Files           5        5              
  Lines         225      229       +4     
==========================================
+ Hits          152      153       +1     
- Misses         73       76       +3
Impacted Files Coverage Δ
rest_framework_proxy/views.py 69.78% <50%> (-1.33%) :arrow_down:

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 1fa51b1...3b9d838. Read the comment docs.

codecov-io avatar Jan 14 '20 10:01 codecov-io