You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to python 3.9.2 I am now unable to import from the enumfields package
3.9.2 changed the way subclassing and multiple inheritance works so it might be related?
Python 3.9.2 (default, Feb 20 2021, 20:59:40)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from enumfields import EnumIntegerField
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/__init__.py", line 1, in <module>
from .enums import Enum, IntEnum
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/enums.py", line 28, in <module>
class Enum(EnumMeta('Enum', (BaseEnum,), _EnumDict())):
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/enums.py", line 18, in __new__
obj = BaseEnumMeta.__new__(mcs, name, bases, attrs)
File "/usr/lib/python3.9/enum.py", line 212, in __new__
classdict['__doc__'] = 'An enumeration.'
File "/usr/lib/python3.9/enum.py", line 97, in __setitem__
if _is_private(self._cls_name, key):
AttributeError: '_EnumDict' object has no attribute '_cls_name'
>>> from enumfields import EnumField
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/__init__.py", line 1, in <module>
from .enums import Enum, IntEnum
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/enums.py", line 28, in <module>
class Enum(EnumMeta('Enum', (BaseEnum,), _EnumDict())):
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/enums.py", line 18, in __new__
obj = BaseEnumMeta.__new__(mcs, name, bases, attrs)
File "/usr/lib/python3.9/enum.py", line 212, in __new__
classdict['__doc__'] = 'An enumeration.'
File "/usr/lib/python3.9/enum.py", line 97, in __setitem__
if _is_private(self._cls_name, key):
AttributeError: '_EnumDict' object has no attribute '_cls_name'
>>> import enumfields
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/__init__.py", line 1, in <module>
from .enums import Enum, IntEnum
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/enums.py", line 28, in <module>
class Enum(EnumMeta('Enum', (BaseEnum,), _EnumDict())):
File "/var/www/.venv/lib/python3.9/site-packages/enumfields/enums.py", line 18, in __new__
obj = BaseEnumMeta.__new__(mcs, name, bases, attrs)
File "/usr/lib/python3.9/enum.py", line 212, in __new__
classdict['__doc__'] = 'An enumeration.'
File "/usr/lib/python3.9/enum.py", line 97, in __setitem__
if _is_private(self._cls_name, key):
AttributeError: '_EnumDict' object has no attribute '_cls_name'
The text was updated successfully, but these errors were encountered:
After upgrading to python 3.9.2 I am now unable to import from the enumfields package
3.9.2 changed the way subclassing and multiple inheritance works so it might be related?
The text was updated successfully, but these errors were encountered: