coddingtonbear / django-mailbox

Import mail from POP3, IMAP, local email mailboxes or directly from Postfix or Exim4 into your Django application automatically.
MIT License
356 stars 164 forks source link

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

Closed mishaelg closed 9 months ago

mishaelg commented 3 years ago

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

ad-m commented 3 years ago

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

mishaelg commented 3 years ago

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.

valerytar commented 3 years ago

Same issue here!

mishaelg commented 3 years ago

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

ad-m commented 3 years ago

@mishaelg , could you prepare changelog for new release?

mishaelg commented 3 years ago

Sure, what is the commit id for current release?

ad-m commented 3 years ago

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

mishaelg commented 3 years ago

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

ad-m commented 3 years ago

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

mishaelg commented 3 years ago

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

variable commented 2 years ago

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

pfouque commented 9 months ago

Fixed with the last release