]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-115011: Improve support of __index__() in setters of members with unsigned integer...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 11 Feb 2024 10:45:58 +0000 (12:45 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Feb 2024 10:45:58 +0000 (12:45 +0200)
commitd9d6909697501a2604d5895f9f88aeec61274ab0
treecdc8dbb18978002fa06eb6565be16d045ec6c7e5
parentd2c4baa41ff93cd5695c201d40e20a88458ecc26
gh-115011: Improve support of __index__() in setters of members with unsigned integer type (GH-115029)

Setters for members with an unsigned integer type now support
the same range of valid values for objects that has a __index__()
method as for int.

Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not support
objects that has a __index__() method larger than LONG_MAX.

Py_T_ULLONG did not support negative ints. Now it supports them and
emits a RuntimeWarning.
Lib/test/test_capi/test_structmembers.py
Misc/NEWS.d/next/Core and Builtins/2024-02-05-12-40-26.gh-issue-115011.L1AKF5.rst [new file with mode: 0644]
Python/structmember.c