Skip to content

Python 3.11.0b3 crashes dill #509

@DanielNoord

Description

@DanielNoord

This seems related to #432.

When running the test suite of pylint I get numerous of these errors:

pickler = <dill._dill.Pickler object at 0x1273546d0>
obj = <code object identity at 0x103cd23f0, file "/Users/daniel/.pyenv/versions/3.11.0b3/lib/python3.11/argparse.py", line 1770>

    @register(CodeType)
    def save_code(pickler, obj):
        log.info("Co: %s" % obj)
        if PY3:
            if hasattr(obj, "co_exceptiontable"):
                args = (
                    obj.co_argcount, obj.co_posonlyargcount,
                    obj.co_kwonlyargcount, obj.co_nlocals, obj.co_stacksize,
                    obj.co_flags, obj.co_code, obj.co_consts, obj.co_names,
                    obj.co_varnames, obj.co_filename, obj.co_name, obj.co_qualname,
>                   obj.co_firstlineno, obj.co_lnotab, obj.co_endlinetable,
                    obj.co_columntable, obj.co_exceptiontable, obj.co_freevars,
                    obj.co_cellvars
E                   AttributeError: 'code' object has no attribute 'co_endlinetable'

I guess some of these attributes changed again?

I'm not sure but some of the discussion in python/cpython#93516 might be relevant. I think they are also discussing whether endlinetable should always exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions