You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The accepted PEP 699 proposed removing the private ma_version_tag field from PyDictObject. Note that PEP 699 supersedes PEP 509, which originally proposed the field.
Why now?
The ma_version_tag field was deprecated in 3.12 and we are now working on 3.14, so I think this is in line with Python's backward compatibility policy from PEP 387.
Cython and PyTorch (dynamo) and Nuitka have stopped using it for CPython 3.12+. I don't think ma_version_tag ever saw widespread usage. Cython was the major user mentioned in PEP 699. 1
I think the ma_version_tag updates have a non-negligible cost in the free-threaded build, and it's easier and simpler to remove it (if we're planning to do that anyways) than to make it more efficient
I searched the top ~7500 sdists as well. The only other actual usage I saw was https://github.com/slezica/python-frozendict, which doesn't have a 3.11 or 3.12 C extension yet (but also functions as a pure-Python package). ↩
Feature or enhancement
The accepted PEP 699 proposed removing the private
ma_version_tagfield fromPyDictObject. Note that PEP 699 supersedes PEP 509, which originally proposed the field.Why now?
ma_version_tagfield was deprecated in 3.12 and we are now working on 3.14, so I think this is in line with Python's backward compatibility policy from PEP 387.ma_version_tagever saw widespread usage. Cython was the major user mentioned in PEP 699. 1ma_version_tagupdates have a non-negligible cost in the free-threaded build, and it's easier and simpler to remove it (if we're planning to do that anyways) than to make it more efficientDict Watchers
The
ma_version_tagfield is also used for dict watchers (8 bits) and the tier2 mutation counter (4 bits). We will still want that functionality.cc @Fidget-Spinner @markshannon
Linked PRs
Footnotes
I searched the top ~7500 sdists as well. The only other actual usage I saw was https://github.com/slezica/python-frozendict, which doesn't have a 3.11 or 3.12 C extension yet (but also functions as a pure-Python package). ↩