gh-132629: Deprecate accepting out-of-range values for unsigned integers in PyArg_Parse (GH-132630)

For unsigned integer formats in the PyArg_Parse* functions,
accepting Python integers with value that is larger than
the maximal value the corresponding C type or less than
the minimal value for the corresponding signed integer type
is now deprecated.
This commit is contained in:
Serhiy Storchaka 2025-07-13 12:44:54 +03:00 committed by GitHub
parent 3dbe02ccd3
commit e18829a8ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 674 additions and 211 deletions

View file

@ -1,9 +1,9 @@
/* fcntl module */
// Need limited C API version 3.13 for PyLong_AsInt()
// Need limited C API version 3.14 for PyLong_AsNativeBytes() in AC code
#include "pyconfig.h" // Py_GIL_DISABLED
#ifndef Py_GIL_DISABLED
# define Py_LIMITED_API 0x030d0000
# define Py_LIMITED_API 0x030e0000
#endif
#include "Python.h"