-
Notifications
You must be signed in to change notification settings - Fork 843
Open
Labels
Description
I extracted those from the current warning C4996: 'xx': deprecated in 3.xx
build messages.
Deprecated since Python 3.11:
- Py_SetProgramName
- Set PyConfig.program_name instead.
- PySys_SetArgv
- Set PyConfig.argv instead.
Deprecated since Python 3.12:
- Py_FrozenFlag Stop using (exposing) deprecated
Py_FrozenFlag
#2593- Use PyConfig.pathconfig_warnings instead.
-
Changed in version 3.11: Now also applies on Windows.
Deprecated since Python 3.13:
- PyWeakref_GetObject
- Use PyWeakref_GetRef() instead.
-
Added in version 3.13.
All of the above are Pending removal in Python 3.15 (if not pushed back further).
Deprecated since Python 3.14 (Pending removal in Python 3.18):
-
_Py_HashPointer
Fix new 3.14 C API deprecation for_Py_HashPointer
#2602- Use Py_HashPointer().
-
Added in version 3.13.
-
_PyUnicode_AsString
: Replace_PyUnicode_AsString
andPYWIN_ATTR_CONVERT
withPyUnicode_AsUTF8
#2591- Use PyUnicode_AsUTF8().
-
Added in version 3.3.
-
Changed in version 3.7: The return type is now
const char *
rather ofchar *
.
-
_PyLong_Sign
Fix new 3.14 C API deprecation for_PyLong_Sign
#2603- Use PyLong_GetSign().
-
Added in version 3.14.
Because some of the replacements are late additions, we may not be able to resolve them immediately. If the signatures / usage are close enough, a simple macro could do.