| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
`_interpreters.run_string` (GH-132175) (#132209)
gh-132174: Fix function name in error message of `_interpreters.run_string` (GH-132175)
(cherry picked from commit f2daa96c81a45b26bdcf3d5c3887cec02137974e)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192)
(cherry picked from commit c0de6500249469e6fc5b458d6afb6bad1b6755cd)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
* make regen-sbom
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
|
| |
(GH-132173) (#132219)
gh-132171: Fix `_interpreters.run_string` crash on string subclass (GH-132173)
(cherry picked from commit 398071871066548954f4c51e8250d13b7c9659e0)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(GH-132201) (#132207)
gh-122040: reword `Modules/xxmodule.c` module-level comment (GH-132201)
(cherry picked from commit af8d1b95377917036aaedf18b9cc047d8877259c)
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
members (GH-132076) (GH-132086)
Now all structure members are initialized with zeroes by default.
(cherry picked from commit 345baa77ba2ce3b8ea8f2fad84754e5cc0b10938)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gh-111178: Fix getsockaddrarg() undefined behavior (#131668)
Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.
On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.
(cherry picked from commit 8cd29c2b533e5a1a262238695d05f2a7c44d6455)
|
| |
|
|
|
|
|
|
| |
(GH-131945) (#131949)
gh-131936: Strengthen check in `_suggestions._generate_suggestions` (GH-131945)
(cherry picked from commit 511d3440a0bbb19731f4d96dde65dffbf85cdda5)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
|
| |
concurrent mutations happen (GH-126124) (#131929)
gh-126033: fix UAF in `xml.etree.ElementTree.Element.remove` when concurrent mutations happen (GH-126124)
(cherry picked from commit bab1398a47f6d0cfc1be70497f306874c749ef7c)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
current mutations happen (#127964) (#131931)
gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when concurrent mutations happen (#127964)
We fix a use-after-free in the `find`, `findtext` and `findall` methods of `xml.etree.ElementTree.Element`
objects that can be triggered when the tag to find implements an `__eq__` method that mutates the
element being queried.
(cherry picked from commit c57623c221d46daeaedfbf2b32d041fde0c882de)
|
| |
|
|
|
| |
The bin tag is 3.0.16.1 because we rebuilt without uplink support to fix gh-131804.
This PR also prevents making calls that are now unsafe without uplink, and updates
the tests to property interpret these failures as unsupported.
|
| |
|
|
|
|
|
|
| |
from the command line (GH-129901) (#131734)
gh-129900: Fix `SystemExit` return codes when the REPL is started from the command line (GH-129901)
(cherry picked from commit 90b82f2b61219c8f94e2deddc989a4c4fe9ea7c7)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-131420) (#131620)
gh-131418: remove unused legacy typedefs in `{md5,sha1}module.c` (GH-131420)
- Remove legacy typedefs `MD5_INT32` and `MD5_INT64` in `Modules/md5module.c`
- Remove legacy typedefs `SHA1_INT32` and `SHA1_INT64` in `Modules/sha1module.c`.
Those legacy typedefs were used to detect whether the host platform could
correctly implement MD5 and SHA-1, but this is no longer needed as we now
fallback to HACL* implementations.
(cherry picked from commit a9a399f0ecfeeff91425cc089057f1b95799853b)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#131145) (#131347)
gh-127667: refactor and improve `_hashopenssl.c` error branches (#131145)
Refactor `_setException()` into different helpers that can be used separately:
- set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code.
- raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message.
- notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message.
(cherry-picked from commit ac50ece6cea8745834e4ec0a9617809a51245bfc).
|
| |
|
|
|
| |
gh-118201: Simplify conv_confname (#126089)
(cherry picked from commit c5c9286804e38c95fe717f22ce1bf2f18eee5b17)
|
| |
|
|
|
| |
(cherry picked from commit bb0268f60dfe903a9bdb8d84104247a9318c6b18)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
| |
(GH-130689) (#131195)
(cherry picked from commit c5abded09995f208b21ebaf012185ca5acb0180b)
Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
|
| |
|
|
|
|
|
| |
(#131084)
(cherry picked from commit de8818ae233b8e7722aa5d6f91d4b5a04bd039df)
Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
|
| |
|
|
|
|
|
|
|
| |
(GH-130828) (GH-130869)
(cherry picked from commit 90130807d9c5a55b2a64024f5dfbee4785b9a27c)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#130756)
gh-130740: Move some `stdbool.h` includes after `Python.h` (#130738)
Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is not
included first and when we are in a platform-agnostic context. This is to avoid having
features defined by `stdbool.h` before those decided by `Python.h` (this caused some
build failures when compiling CPython with `zig cc`).
(cherry-picked from commit 214562ed4ddc248b007f718ed92ebcc0c3669611)
---------
Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
|
| |
|
|
|
|
|
|
|
|
| |
gh-127667: fix memory leaks in `hashlib` (GH-127668)
- Correctly handle `NULL` values returned by `EVP_MD_CTX_md`.
- Correctly free resources in error branches.
- Consistently suppress `_setException()` return value when needed.
- Collapse `_setException() + return NULL` into a single statement.
(cherry-picked from commit 097846502b7f33cb327d512e2a396acf4f4de46e)
|
| |
|
|
|
|
|
|
|
| |
(#130666)
gh-130617 : fix time_clockid_converter on DragonFlyBSD (GH-130634)
(cherry picked from commit e41981704f0a6adb58c3e258b4226619521ce03c)
Signed-off-by: leleliu008 <leleliu008@gmail.com>
Co-authored-by: leleliu008 <leleliu008@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
(GH-130556)
The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
(cherry picked from commit 0ef4ffeefd1737c18dc9326133c7894d58108c2e)
|
| |
|
|
|
|
|
| |
test (GH-129406) (GH-130507)
(cherry picked from commit fc8d2cba541f378df0a439412665f3dbe0b9ae3c)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-130152) (#130491)
gh-130151: Fix reference leaks in `_hashlib.hmac_{new,digest}` (GH-130152)
* fix leak in `_hashlib.hmac_new`
* fix leak in `hmac_digest`
* fix exception type in `_hashlib.HMAC.copy`
(cherry picked from commit 071820113f11b8f6a21f98652d0840e10268114c)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
gh-129838: Don't redefine _Py_NO_SANITIZE_UNDEFINED (GH-129839)
Newer GCC versions accept both __attribute__((no_sanitize("undefined")))
and __attribute__((no_sanitize_undefined)) so check that the macro is
not already defined.
(cherry picked from commit 568db400ff07240a5ed6f263af281405ccaec716)
Co-authored-by: Collin Funk <collin.funk1@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-130237) (GH-130246)
(cherry picked from commit b93b7e566e5a4efe7f077af2083140e50bd2b08f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
`_pickle` (GH-130180) (#130190)
gh-130179: Fix `persistent_{id,load}_attr` reference leaks in `_pickle` (GH-130180)
(cherry picked from commit e7f00cd14f6a0c0dee6e733ac3e2c5d92e0809bb)
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
gh-129983: fix data race in compile_template in sre.c (#130015)
(cherry picked from commit 3cf68cdd3e1809df4e426c61f6990de63747ec6f)
Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
|
| |
|
|
|
| |
(#129604) (#129923)
(cherry picked from commit 7e6ee50b6b8c760bcefb92ab4ddbc3d85d37a834)
|
| |
|
|
| |
(cherry picked from commit 6c67904e793828d84716a8c83436c9495235f3a1)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gh-129502: Fix handling errors in ctypes callbacks (GH-129504)
Unlikely errors in preparing arguments for ctypes callback are now
handled in the same way as errors raised in the callback of in converting
the result of the callback -- using sys.unraisablehook() instead of
sys.excepthook() and not setting sys.last_exc and other variables.
(cherry picked from commit 9d63ae5fe52d95059ab1bcd4cbb1f9e17033c897)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
gh-129345: null check for indent syslogmodule (GH-129348)
(cherry picked from commit 25cf79a0829422bd8479ca0c13c72b769422077b)
Co-authored-by: Burkov Egor <xwooffie@gmail.com>
|
| |
|
| |
Previously, the macro would be redefined when the header was included.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-111495: Add PyFile tests (#129449)
Add tests for the following functions in test_capi.test_file:
* PyFile_FromFd()
* PyFile_GetLine()
* PyFile_NewStdPrinter()
* PyFile_WriteObject()
* PyFile_WriteString()
* PyObject_AsFileDescriptor()
Add Modules/_testlimitedcapi/file.c file.
Remove test_embed.StdPrinterTests which became redundant.
(cherry picked from commit 4ca9fc08f89bf7172d41e523d9e520eb1729ee8c)
|
| |
|
|
|
|
|
|
| |
2GB in CSV file (GH-129413) (#129436)
gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (GH-129413)
(cherry picked from commit 97b0ef05d987ebef354512b516a246feb411e815)
Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-129347) (#129372)
(cherry picked from commit 379ab856f59423c570333403a7d5d72f3ea82d52)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)
Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.
* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().
(cherry picked from commit 46c7e13c055c218e18b0424efc60965e6a5fe6ea)
|
| |
|
|
|
|
|
|
|
|
| |
`Modules/_multiprocessing/semaphore.c` (GH-129084) (#129100)
gh-111178: fix UBSan failures in `Modules/_multiprocessing/semaphore.c` (GH-129084)
fix UBSan failures for `SemLockObject`
(cherry picked from commit 5ed5572cac7ef204767ddf8e8888e15672ba558e)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
| |
Fix a typo in `syslog`'s error message (GH-129029)
(cherry picked from commit 9b1c1817af30e609b7cbfacbe5b1e73e21dc9e37)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
tracemalloc_alloc(), tracemalloc_realloc(), PyTraceMalloc_Track(),
PyTraceMalloc_Untrack() and _PyTraceMalloc_TraceRef() now check
tracemalloc_config.tracing after calling TABLES_LOCK().
_PyTraceMalloc_Stop() now protects more code with TABLES_LOCK(),
especially setting tracemalloc_config.tracing to 1.
Add a test using PyTraceMalloc_Track() to test tracemalloc.stop()
race condition.
Call _PyTraceMalloc_Init() at Python startup.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* gh-111495: Add more tests on PyEval C APIs (#122789)
* Add Lib/test/test_capi/test_eval.py
* Add Modules/_testlimitedcapi/eval.c
(cherry picked from commit bf8b3746398ea756c97e3cf263d63ca3ce3a544e)
* gh-111495: Fix refleaks in test_capi.test_eval tests (#122851)
(cherry picked from commit b4a316087c32d83e375087fd35fc511bc430ee8b)
|
| |
|
|
|
|
|
| |
(GH-128962) (#128976)
(cherry picked from commit 4dade055f4e18a7e91bc70293abb4db745ad16ca)
Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
gh-128911: Add tests on the PyImport C API (#128915)
* Add Modules/_testlimitedcapi/import.c
* Add Lib/test/test_capi/test_import.py
* Remove _testcapi.check_pyimport_addmodule(): tests already covered
by newly added tests.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit d95ba9fa1110534b7247fa2ff12b90e930c93256)
|
| |
|
|
|
|
| |
gh-58689: Fix os.kill() error handling on Windows (GH-128932)
(cherry picked from commit 939df0f9f6a76e0916b3ba53841e1413ab90952e)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
| |
(#128598)
(cherry picked from commit e08b28235a863323ca3a7e444776bb7803e77caf)
PR #14868 replaced the ttyname() call with ttyname_r(), but the old
check remained.
|
| |
|
|
|
|
|
|
| |
encodings (GH-127220) (#128689)
gh-127196: Fix crash in `_interpreters`, when `shared` had invalid encodings (GH-127220)
(cherry picked from commit 087bb48acac997c06e69dae25bae2dd75194b980)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
(GH-128422) (GH-128423)
(cherry picked from commit c9356feef28e6dfc4dc32830d3427a5ae0e426e2)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-128405) (GH-128407)
(cherry picked from commit 8d16919a06a55a50756bf083221a6f6cab43de50)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
similarly named function (GH-128220)
(cherry picked from commit 3ddd70ceaaf67b111ee4251817e150396d6d10a9)
Co-authored-by: Sergey Muraviov <smurav@mail.ru>
|