django-multiselectfield
django-multiselectfield copied to clipboard
[BUG] Fails in Django 3.0
After upgrading to django 3.0, the module fails, it seems, due to some dependency on python_2 things from django, which might have been removed or changed. AFAIK python2 isn't officially supported anywhere anymore in 20~ days.
File ".../venv/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File ".../venv/lib/python3.8/site-packages/multiselectfield/__init__.py", line 1, in <module>
from multiselectfield.db.fields import MultiSelectField # noqa: F401
File ".../venv/lib/python3.8/site-packages/multiselectfield/db/fields.py", line 23, in <module>
from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (.../venv/lib/python3.8/site-packages/django/utils/encoding.py)
Hi, thanks for reporting this bug. Should we remove support for python2 here? Anyway, this bug comes from Django 3.0, doesn't it?
Sorry - yes - django3.0 - i'll edit the title
Maybe you could also utilize the new enum types that django officially support now. https://docs.djangoproject.com/en/3.0/ref/models/fields/#field-choices-enum-types
I'd probably create a "final" python2 version, and then slowly drop support, if i were you guys. It's a mess to support both it'd say.
Hi, could you paste your pip freeze? which version have you installed? The current version doesn't have "python_2_unicode_compatible"
"django-multiselectfield==0.1.8" it seems.
ok, please update to last version 0.1.10.
django-multiselect fields doesn not work on latest Django and Python combination due to python_2_unicode_compatible dependency
Django 3.1.1 Python 3.8.5 django-multipleselectfield 0.2.0.post2
Please assist with any feedback.
Same issue django-multiselectfield==0.1.12 python 3.6.4 django 3.0.7
##Update Had to specifically use pip3 to install. Seems to be working now.
Python 3.8.10 Django 3.2.x django-multiselectfield==0.1.12
Same problem as above. Had nobody made a fix for this yet? 🤔
Fixed in #148.