Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ Deprecated
is no current event loop set and it decides to create one.
(Contributed by Serhiy Storchaka and Guido van Rossum in :gh:`100160`.)

* Added the PEP-699 Implementation, :meth:`ma_version_tag` is deprecated for extension modules
Comment thread
ramvikrams marked this conversation as resolved.
Outdated
you can continue using it for the core code. The deprecation warning will pop up for extension modules.
(Contributed by Ramvikrams and Kumar Aditya in :gh:`101193`.)

Comment thread
ramvikrams marked this conversation as resolved.
Outdated

Pending Removal in Python 3.13
------------------------------
Expand Down
4 changes: 4 additions & 0 deletions Include/cpython/dictobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ typedef struct {

/* Dictionary version: globally unique, value change each time
the dictionary is modified */
#ifdef Py_BUILD_CORE
uint64_t ma_version_tag;
#else
Py_DEPRECATED(3.12) uint64_t ma_version_tag;
#endif

PyDictKeysObject *ma_keys;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added the PEP-699 Implementation, :meth:`ma_version_tag` is deprecated for extension modules you can continue using it for the core code.
The deprecation warning will pop up for extension modules.
Comment thread
ramvikrams marked this conversation as resolved.
Outdated
3 changes: 3 additions & 0 deletions Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,7 +2148,10 @@ dict_get_version(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
return NULL;

_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
version = dict->ma_version_tag;
_Py_COMP_DIAG_POP

static_assert(sizeof(unsigned long long) >= sizeof(version),
"version is larger than unsigned long long");
Expand Down