Skip to content

Fix execution for Python 3.11

Stephan Seitz requested to merge seitz/pystencils:python-11.1 into master

Fixes execution on Python 3.11

Prevents the following error:

ImportError while loading conftest '/home/stephan/projects/pystencils/'. in <module>
    from pystencils.cpu import cpujit
pystencils/ in <module>
    from .config import CreateKernelConfig
pystencils/ in <module>
/usr/lib/python3.11/ in dataclass
    return wrap(cls)
/usr/lib/python3.11/ in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
/usr/lib/python3.11/ in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
/usr/lib/python3.11/ in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
E   ValueError: mutable default <class 'mappingproxy'> for field gpu_indexing_params is not allowed: use default_factory

I just did as I was told by Python 🤷

Merge request reports