Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Crash report
What happened?
A simple standalone file:
# test1.pyimporttimeobj=time.struct_time(range(1,10))
$pyenv install 3.14t-dev --debug$pyenvlocal 3.14t-dev-debug$python3 -VVPython 3.14.0a0 experimental free-threading build (heads/main:bd3d31f, Aug 1 2024, 01:22:33) [Clang 15.0.0 (clang-1500.3.9.4)]$python3 test1.pyFatal Python error: _Py_Dealloc: Deallocator of type 'time.struct_time' raised an exceptionPython runtime state: finalizing (tstate=0x00000001018ca548)Exception ignored in the internal traceback machinery:ImportError: sys.meta_path is None, Python is likely shutting downTypeError: Missed attribute 'n_fields' of type time.struct_timeCurrent thread 0x00000001fff70c00 (most recent call first): Garbage-collecting <no Python frame>[1] 89377 abort python3 test1.py$python3 -c'import test1'Fatal Python error: _Py_Dealloc: Deallocator of type 'time.struct_time' raised an exceptionPython runtime state: finalizing (tstate=0x00000001040a2548)Exception ignored in the internal traceback machinery:ImportError: sys.meta_path is None, Python is likely shutting downTypeError: Missed attribute 'n_fields' of type time.struct_timeCurrent thread 0x00000001fff70c00 (most recent call first): Garbage-collecting <no Python frame>[1] 89737 abort python3 -c 'import test1'
If I remove the assignment forobj, the program can exit successfully.
# test2.pyimporttimetime.struct_time(range(1,10))
$python3 test2.py# no output$python3 -c'import test2'# no output
CPython versions tested on:
CPython main branch, CPython 3.13t, CPython 3.14t
Operating systems tested on:
Linux, macOS
Output from running 'python -VV' on the command line:
Python 3.14.0a0 experimental free-threading build (heads/main:bd3d31f, Aug 1 2024, 01:22:33) [Clang 15.0.0 (clang-1500.3.9.4)]