DarrenOfficial/dpaste

django 3.x breaks import

jamesbeedy opened this issue · 3 comments

Description

Getting ModuleNotFoundError: No module named 'django.utils.six' when django >= 3.x.

Possibly pin django to a lower version or remove/replace the import.

Steps to reproduce

  1. Install dpaste and see that django 3.x is installed
  2. Try to run the django server
  3. Get the import error

Expected result

ModuleNotFoundError: No module named 'django.utils.six'

Could you provide a full traceback? I'm running dpaste.org with Django 3.0 myself.

Interesting- I’m not sure I have the trace back handy unfortunately. I did find this in the release notes for 3.0 https://docs.djangoproject.com/en/3.0/releases/3.0/#removed-private-python-2-compatibility-apis

I forgot about this. I'm pretty sure you run into this with your setup mozilla/django-csp#129

In the Docker setup I currently overcome it with installing the latest master branch. https://github.com/bartTC/dpaste/blob/master/Dockerfile#L46-L48

In your particular setup its probably best to stay on Django 2.2 and once Mozilla pushed out a new release it will basically fix itself and you can upgrade to 3.0