Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[mypyc] Pickle test failure with Python 3.14.0a1 #17973

Closed
Labels
bugmypy got something wrongtopic-mypycmypyc bugs
@cdce8p

Description

@cdce8p

After being a bit late with Python 3.13, I figured to start testing 3.14 early this time.

With Python3.14.0a1 the following fails:

# native.pyfromtypingimportAnydefdec(x:Any)->Any:returnx@decclassD:x:intclassE(D):y:int
# driver.pyfromnativeimportD,Eimportpickleassertnothasattr(D,'__mypyc_attrs__')assertE.__mypyc_attrs__== ('y','__dict__')e=E()e.x=10e.y=20asserte.__getstate__()== {'y':20,'__dict__': {'x':10}}e2=pickle.loads(pickle.dumps(e))asserteisnote2ande.x==e2.xande.y==e2.y
rm -rf buildrm *.sopython3.14 -m mypyc native.pypython3.14 -c 'import driver.py'

The error message

$python-c"import driver.py"Traceback (mostrecentcalllast):File"<string>",line1,in<module>importdriver.pyFile".../driver.py",line14,in<module>asserteisnote2ande.x==e2.xande.y==e2.y^^^^AttributeError:'E'objecthasnoattribute'x'

I bisected this topython/cpython#123192 upstream.

--
This is also part of the mypyc test suite

pytest -n0 mypyc/test/test_run.py::TestRun::run-classes.test::testPickling

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-mypycmypyc bugs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp