| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
(cherry picked from commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7)
|
| |
|
|
|
|
|
| |
(cherry picked from commit dbc1752d4107532d312c78263212e807a3674eb1)
Co-authored-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
| |
(GH-121792) (#121840)
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792)
(cherry picked from commit 8b6d4755812d0b02e9f26beb9c9a7714e4c5ac28)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-118230) (GH-118266)
The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.
(cherry picked from commit 546cbcfa0eeeb533950bd49e30423f3d3bbd5ebe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-117982) (GH-118011)
(cherry picked from commit 6078f2033ea15a16cf52fe8d644a95a3be72d2e3)
Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
| |
64-bit platforms (GH-117064) (GH-117070)
(cherry picked from commit 519b2ae22b54760475bbf62b9558d453c703f9c6)
|
| |
|
|
|
|
|
|
| |
(gh-116601) (#116929)
(cherry picked from commit ebf29b3)
Co-authored-by: Donghee Na <donghee.na@python.org>
|
| |
|
|
|
|
|
| |
(GH-113132)
(cherry picked from commit a723a13bf135306cdc5999a959596bfb487e8f4f)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
| |
Add tests for PyObject_Str(), PyObject_Repr(), PyObject_ASCII() and
PyObject_Bytes().
(cherry picked from commit e0449b9a7fffc0c0eed806bf4cbb8f1f65397bbb)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-112489)
(cherry picked from commit f14d741daa1b9e5b9c9fc1edba93d0fa92b5ba8d)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
|
| |
tuples in PyArg_Parse (gh-112439) (GH-112460)
(cherry picked from commit 4eea1e82369fbf7a795d1956e7a8212a1b58009f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(cherry picked from commit a3903c8ec838f82338f7a7af68a6699118778e1d)
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Kalyan <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
| |
(cherry picked from commit 24b5cbd3dce3fe37cdc787ccedd1e73a4f8cfc3c)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit b452202a11c4cb60f69a098a0076a8a8aabade38)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-111607)
(cherry picked from commit 97b3cd38d105fd891ba46dd27d08f03d1c6dd348)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
This is to reduce merge conflicts (Modules/Setup.stdlib.in) for
subsequent pull requests for the issue.
(cherry picked from commit 33ed5fa69dbe25d64a910c450be527f4db9dc5dd)
|
| |
|
|
|
|
|
|
| |
(GH-111507)
Also document the behavior when called with NULL.
(cherry picked from commit bca330542912532baa33af20a107fcf956cf007a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-111067) (GH-111305)
* Move existing tests for PySys_GetObject() and PySys_SetObject() into
specialized files.
* Add test for PySys_GetXOptions() using _testcapi.
* Add tests for PySys_FormatStdout(), PySys_FormatStderr(),
PySys_WriteStdout() and PySys_WriteStderr() using ctypes.
(cherry picked from commit b2ba2985275d1200e5c44c3f224d754141fc5292)
|
| |
|
|
|
|
|
| |
(GH-110573) (GH-111161)
(cherry picked from commit f71cd5394efe154ba92228b2b67be910cc1ede95)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
| |
(cherry picked from commit 9d40ebf1902812fad6aa85ede7b6f1fdff3c1291)
|
| |
|
|
|
|
|
| |
(GH-110817) (GH-110825)
(cherry picked from commit 548ce0923b9ef93b1c1df59f8febc4bb3daff28a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-110552) (GH-110553)
(cherry picked from commit 89df5b73d07872d554da60b455b46c98e01a022d)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
(GH-110544) (GH-110554)
(cherry picked from commit ea39c877c0a8e7a717f2e4bf7d92a3a8780e67c0)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
| |
(GH-110547)
(cherry picked from commit c49edd7d9c5395a6a6696a4846f56bc8b2b22792)
|
| |
|
|
|
|
|
|
| |
_testcapi (GH-109533) (#109558)
gh-109469: Silence compiler warnings on string comparisons in _testcapi (GH-109533)
(cherry picked from commit ed582a2ed980efba2d0da365ae37bff4a2b99873)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
set (GH-109014) (#109023)
[3.12] C API tests: use special markers to test that output parameters were set (GH-109014).
(cherry picked from commit bf414b7fcb7c8ba780a5e1d9f320ecef0c7f9488)
|
| |
|
|
|
|
|
|
| |
Add Modules/_testcapi/util.h header (GH-108774)
It contains common macros used in C API tests.
(cherry picked from commit 0e01fac315dfa705ac8a6954485546f28cf4c87d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyErr_Format() (GH-107918) (#108134)
* gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)
Such C API functions as PyErr_SetString(), PyErr_Format(),
PyErr_SetFromErrnoWithFilename() and many others no longer crash or
ignore errors if it failed to format the error message or decode the
filename. Instead, they keep a corresponding error.
(cherry picked from commit 633ea217a85f6b6ba5bdbc73094254d5811b3485)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Define PY_SSIZE_T_CLEAN.
---------
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-107179) (#107728)
Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.
Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.
Add also tests for PyDict C API..
(cherry picked from commit 16c9415fba4972743f1944ebc44946e475e68bc4)
|
| |
|
|
|
|
|
|
| |
(GH-107821) (#107835)
gh-91054: make code watcher tests resilient to other watchers (GH-107821)
(cherry picked from commit 2ec16fed14aae896e38dd5bd9e73e2eddc974439)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
| |
|
|
|
|
|
| |
initializer (GH-106862) (GH-106953)
(cherry picked from commit 8d397ee8259fa0f81598a452438fc335267ca260)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
| |
Add tests for codecs.
(cherry picked from commit 51ea664d18938645521bdd128a3c55f9c197644c)
|
| |
|
|
|
|
|
|
| |
(GH-106286) (#106365)
gh-91053: make func watcher tests resilient to other func watchers (GH-106286)
(cherry picked from commit 58906213cc5d8f2be311664766b4923ef29dae1f)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
| |
|
|
|
|
|
|
|
|
| |
(#106041)
[3.12] gh-106033: Get rid of new occurrences of PyDict_GetItem and PyObject_HasAttr (GH-106034)
These functions are broken by design because they discard any exceptions raised
inside, including MemoryError and KeyboardInterrupt. They should not be
used in new code.
(cherry picked from commit 1d33d5378058671bfabb6f4d4b5bfd4726973ff9)
|
| |
|
|
|
|
|
|
| |
(GH-105386) (GH-105697)
gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386)
(cherry picked from commit 2b90796be6959d5ef46b38c434a514fce25be971)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-105608) (#105615)
Bail on first error in heapctypesubclasswithfinalizer_finalize()
(cherry picked from commit d636d7dfe714e7168b342c7ea5f9f9d3b3569ed0)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
| |
implementation in the unstable API (GH-105072) (#105095)
(cherry picked from commit b7aadb4583b040ddc8564896b91f4e5e571c82d6)
|
| |
|
|
|
|
|
|
|
| |
* Support for conversion specifiers o (octal) and X (uppercase hexadecimal).
* Support for length modifiers j (intmax_t) and t (ptrdiff_t).
* Length modifiers are now applied to all integer conversions.
* Support for wchar_t C strings (%ls and %lV).
* Support for variable width and precision (*).
* Support for flag - (left alignment).
|
| |
|
| |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| | |
|
| |
|
|
|
|
| |
* gh-104469: Update README.txt for _testcapi
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
| |
|
|
|
|
|
|
|
|
| |
Remove boilerplate code by converting the following functions:
- _testcapi.watch_dict
- _testcapi.unwatch_dict
- _testcapi.watch_type
- _testcapi.unwatch_type
- _testcapi.set_func_defaults_via_capi
- _testcapi.set_func_kwdefaults_via_capi
|
| | |
|
| | |
|
| |
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
| |
Add tests for lower-level functions.
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
| |
|
| |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
| |
|
|
| |
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-103972)
(That's a mouthful of an edge case!)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
| | |
|