django-mailbox icon indicating copy to clipboard operation
django-mailbox copied to clipboard

ImportError: cannot import name ‘python_2_unicode_compatible’ from ‘django.utils.encoding’ (/opt/venv/lib/python3.8/site-packages/django/utils/encoding.py)

Open mishaelg opened this issue 5 years ago • 11 comments

Hi, There is an import error in one of the files, I think at /django_mailbox/models.py line 31 the line should change from 'django.utils.encoding import python_2_unicode_compatible' to 'from six import python_2_unicode_compatible'.

Thanks in advance, Mishael

mishaelg avatar Nov 04 '20 07:11 mishaelg

We drop support for Python 2, so we don't need python_2_unicode_compatible at all. Could you provide PR to fix that?

ad-m avatar Nov 04 '20 11:11 ad-m

I see now it was already removed in github. Is it possible that "pip install django-mailbox" doesn't install the latest version? I think it just a matter of updating the release.

mishaelg avatar Nov 04 '20 11:11 mishaelg

Same issue here!

valerytar avatar Nov 08 '20 16:11 valerytar

Is there a way I can assist in solving this problem?

mishaelg avatar Nov 10 '20 07:11 mishaelg

@mishaelg , could you prepare changelog for new release?

ad-m avatar Nov 10 '20 10:11 ad-m

Sure, what is the commit id for current release?

mishaelg avatar Nov 10 '20 10:11 mishaelg

We tag each release, so you can check by tag.

ad-m avatar Nov 10 '20 10:11 ad-m

I was about to create a new pr when I noticed you already have one for release 5.0 - https://github.com/coddingtonbear/django-mailbox/pull/223

mishaelg avatar Nov 10 '20 22:11 mishaelg

I have time 11.11.2020 to release it. Take look and provide any input.

ad-m avatar Nov 11 '20 01:11 ad-m

Seems fine, I would just add to changelog that you dropped support for python 2

mishaelg avatar Nov 11 '20 07:11 mishaelg

I see tag 5.0.0 since 2020 but not on pypi, any ideas?

variable avatar Jan 20 '22 21:01 variable

Fixed with the last release

pfouque avatar Dec 11 '23 19:12 pfouque