[Compatibility] Python 3.11
From the Python 3.11 test with MA Secure Groups
aa_stable-py311: commands[0]> coverage run runtests.py memberaudit_securegroups -v 2
Traceback (most recent call last):
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/runtests.py", line 23, in <module>
execute_from_command_line(sys.argv.insert(1, "test"))
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/django/core/management/__init__.py", line 420, in execute
django.setup()
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate
app_config.ready()
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/securegroups/apps.py", line 11, in ready
import securegroups.signals
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/securegroups/signals.py", line 66, in <module>
for _filter in filters.get_hooks():
^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/securegroups/signals.py", line 23, in get_hooks
_hooks = hooks.get_hooks("secure_group_filters")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/allianceauth/hooks.py", line 123, in get_hooks
register_all_hooks()
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/allianceauth/hooks.py", line 112, in register_all_hooks
hooks = list(get_app_submodules('auth_hooks'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/allianceauth/hooks.py", line 101, in get_app_submodules
yield name, import_module(f'{name}.{module_name}')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/memberaudit/auth_hooks.py", line 4, in <module>
from . import urls
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/memberaudit/urls.py", line 3, in <module>
from .views import (
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/memberaudit/views/admin.py", line 13, in <module>
from ..forms import ImportFittingForm, ImportSkillPlanForm
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/memberaudit/forms.py", line 4, in <module>
from .core.eft_parser import EftParserError
File "/home/runner/work/aa-memberaudit-secure-groups/aa-memberaudit-secure-groups/.tox/aa_stable-py311/lib/python3.11/site-packages/memberaudit/core/eft_parser.py", line 156, in <module>
@dataclass
^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/dataclasses.py", line 1223, in dataclass
return wrap(cls)
^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/dataclasses.py", line 1213, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <enum '_EftSlotType'> for field slot_type is not allowed: use default_factory