Serhiy Storchaka
7273a58a85
[3.11] gh-115011: Improve support of __index__() in setters of members with unsigned integer type (GH-115029) (GH-115295)
...
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.
(cherry picked from commit d9d6909697
)
2024-02-11 12:03:48 +00:00
Serhiy Storchaka
89878141ed
[3.11] gh-114392: Improve test_capi.test_structmembers (GH-114393) (GH-115030)
...
Test all integer member types with extreme values and values outside of
the valid range. Test support of integer-like objects. Test warnings for
wrapped out values.
(cherry picked from commit 15f6f048a6
)
2024-02-05 13:24:23 +02:00
Serhiy Storchaka
0244e96d10
[3.11] gh-114388: Fix warnings when assign an unsigned integer member (GH-114391) (GH-115002)
...
* Fix a RuntimeWarning emitted when assign an integer-like value that
is not an instance of int to an attribute that corresponds to a C
struct member of type T_UINT and T_ULONG.
* Fix a double RuntimeWarning emitted when assign a negative integer value
to an attribute that corresponds to a C struct member of type T_UINT.
(cherry picked from commit 3ddc515255
)
2024-02-04 17:54:26 +00:00
Serhiy Storchaka
fe2b4dd3c0
[3.11] gh-81682: Fix test failures when CPython is built without docstrings (GH-113410) (GH-113430)
...
(cherry picked from commit 4e5b27e6a3
)
2023-12-23 11:38:07 +00:00
Serhiy Storchaka
581b244155
[3.11] gh-112438: Fix support of format units with the "e" prefix in nested tuples in PyArg_Parse (gh-112439) (GH-112461)
...
(cherry picked from commit 4eea1e8236
)
2023-11-27 18:11:09 +00:00
Furkan Onder
f446df741f
[3.11] gh-67565: Add tests for C-contiguity checks (GH-110951) (GH-111199)
...
(cherry picked from commit 9376728ce4
)
2023-10-23 12:49:44 +03:00
Serhiy Storchaka
22b39d13ec
[3.11] gh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH-107736) (GH-107741)
...
(cherry picked from commit bea5f93196
)
2023-08-07 20:51:00 +00:00
Serhiy Storchaka
b8b3e6afc0
[3.11] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224)
...
Previously *consumed was not set in this case.
(cherry picked from commit f08e52ccb0
)
2023-07-25 14:15:14 +03:00
Brandt Bucher
fbb6def08a
[3.11] GH-104405: Add missing PEP 523 checks (GH-104441)
2023-05-12 23:03:47 +00:00
Irit Katriel
fcafc37411
[3.11] gh-102493: backport unit test for PyErr_SetObject ( #102602 )
...
gh-102493: backport unit test for PyErr_SetObject
2023-03-11 15:01:01 +00:00
Łukasz Langa
955ba2839b
[3.11] gh-101072: support default and kw default in PyEval_EvalCodeEx for 3.11+ (GH-101127) ( #101636 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Matthieu Dartiailh <m.dartiailh@gmail.com>
2023-02-07 13:36:35 +00:00
Bill Fisher
57e727af3f
[3.11] gh-99110: Initialize frame->previous in init_frame to fix segmentation fault (GH-100182) ( #100478 )
...
(cherry picked from commit 88d565f32a
)
Co-authored-by: Bill Fisher <william.w.fisher@gmail.com>
2022-12-24 11:17:10 +05:30
colorfulappl
bed1d141a9
[3.11] gh-99240: Reset pointer to NULL when the pointed memory is freed in argument parsing (GH-99890) ( #100385 )
...
(cherry picked from commit efbb1eb9f5
)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-12-21 15:32:29 +05:30
Miss Islington (bot)
7aa87bba05
gh-60203: Always pass True/False as boolean arguments in tests (GH-99983)
...
Unless we explicitly test non-bool values.
(cherry picked from commit 76f43fc09a
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-12-04 04:50:46 -08:00
Serhiy Storchaka
56a517e9e8
[3.11] gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode (GH-99431). (GH-99614)
...
(cherry picked from commit 06d4e02c3b
)
2022-11-20 11:24:45 +02:00
Miss Islington (bot)
ecc164f350
bpo-34272: Reorganize C API tests. (GH-8551)
...
Move some C API tests into Lib/test/test_capi/.
(cherry picked from commit f883b7f8ee
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-11-12 09:36:42 -08:00