diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-26 10:10:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 10:10:53 (GMT) |
commit | c075a1974b0dce9801cb645c77faa8af612b3db5 (patch) | |
tree | 9d11e456048a42b7ba912dac1c99dd137c2442b8 /Modules | |
parent | dac3d389e747c6f6ef17e4e2f38731c8ef83eada (diff) | |
download | cpython-c075a1974b0dce9801cb645c77faa8af612b3db5.zip cpython-c075a1974b0dce9801cb645c77faa8af612b3db5.tar.gz cpython-c075a1974b0dce9801cb645c77faa8af612b3db5.tar.bz2 |
gh-105927: Deprecate PyWeakref_GetObject() function (#106006)
Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testcapimodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index d847539..dc8acec 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -3375,6 +3375,10 @@ error: static PyObject * test_weakref_capi(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args)) { + // Ignore PyWeakref_GetObject() deprecation, we test it on purpose + _Py_COMP_DIAG_PUSH + _Py_COMP_DIAG_IGNORE_DEPR_DECLS + // Create a new heap type, create an instance of this type, and delete the // type. This object supports weak references. PyObject *new_type = PyObject_CallFunction((PyObject*)&PyType_Type, @@ -3463,6 +3467,8 @@ test_weakref_capi(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args)) Py_DECREF(weakref); Py_RETURN_NONE; + + _Py_COMP_DIAG_POP } |