Skip to content

Test failures vs Django master (3.0) because django.utils.six was removed #6449

Closed
@therefromhere

Description

@therefromhere

Tests are failing vs django master because django.utils.six and django.utils.encoding.python_2_unicode_compatible were just removed (django/django@4138481 / https://code.djangoproject.com/ticket/27753), and they are used in lots of places.

eg: https://travis-ci.org/encode/django-rest-framework/jobs/489928209

What's the preferred solution?

a) Drop py2 and six (#6277 and some followup) (hopefully sometime before Django 2.2 is released)?
b) Add six as a dependency until py2 is dropped? (it'd have to be a bit more than this because e.g. django.utils.encoding.python_2_unicode_compatible was also removed)
c) other?

Checklist

  • I have verified that that issue exists against the master branch of Django REST framework.
  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • This is not a usage question. (Those should be directed to the discussion group instead.)
  • This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
  • I have reduced the issue to the simplest possible case.
  • I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)

Steps to reproduce

Run tests vs django master - eg tox -e py37-djangomaster

Expected behavior

Tests to pass

Actual behavior

Fails with ImportError: cannot import name 'six' from 'django.utils'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions