| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(gh-101447)
|
|
|
|
|
| |
(cherry picked from commit 11f99323c2ae0ec428c370a335695e3d8d4afc1d)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
|
|
| |
(#100841)
(cherry picked from commit a2141882f259e21bb09fa0b7cba8142147b9e3d7)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 46521826cb1883e29e4640f94089dd92c57efc5b)
Co-authored-by: Éric <earaujo@caravan.coop>
|
|
|
|
|
| |
(#100368)
(cherry picked from commit 0da728387c99fe6c127b070f2d250dc5bdd62ee5)
|
|
|
|
|
| |
(cherry picked from commit 1cf3d78c92eb07dc09d15cc2e773b0b1b9436825)
Co-authored-by: Jeremy Paige <ucodery@gmail.com>
|
|
|
|
|
|
|
|
| |
argument parsing (GH-99890) (#100385)
(cherry picked from commit efbb1eb9f54cad4f7bf5df03eed3a6aba02d99f4)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
line (#99423)
[3.11] gh-99103: Normalize specialized traceback anchors against the current line (GH-99145)
Automerge-Triggered-By: GH:isidentical.
(cherry picked from commit 57be5459593bbd09583317ebdafc4d58ae51dbf4)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
|
|
|
|
|
|
| |
Fix a reference bug in _imp.create_builtin() after the creation of
the first sub-interpreter for modules "builtins" and "sys".
(cherry picked from commit cb2ef8b2acbb231c207207d3375b2f8b0077a6ee)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470)
Fix a number of compile errors with GCC-12 on macOS:
1. In pylifecycle.c the compile rejects _Pragma within a declaration
2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS
3. _ctypes assumed that __builtin_available is always present on macOS
(cherry picked from commit cdde29dde90947df9bac39c1d19479914fb3db09)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
| |
code paths (gh-99461) (#99514)
Manual backport of GH-99461.
|
|
|
|
|
|
|
| |
the gc module (GH-99373)
(cherry picked from commit 4e4b13e8f6211abbc0d53056da11357756daa314)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
| |
(cherry picked from commit 9d692841691590c25e6cf5b2250a594d3bf54825)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
| |
(cherry picked from commit 283ab0e1c002f2d7459d581df6b4b8599e7d1a4d)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
|
|
|
|
| |
Fix use-after-free in Py_SetPythonHome(NULL), Py_SetProgramName(NULL)
and _Py_SetProgramFullPath(NULL) function calls.
Issue reported by Benedikt Reinartz.
(cherry picked from commit b07f546ea3a574bc3016fb023c157c65a47f4849)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
* gh-98925: Lower marshal recursion depth for WASI (GH-98938)
For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack.
As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.
(cherry picked from commit 9711265182f163ba381e7800e3748ac28710f9ef)
Co-authored-by: Brett Cannon <brett@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* As most of `test_embed` now uses `Py_InitializeFromConfig`, add
a specific test case to cover `Py_Initialize` (and `Py_InitializeEx`)
* Rename `_testembed` init helper to clarify the API used
* Add a `PyConfig_Clear` call in `Py_InitializeEx` to make
the code more obviously correct (it already didn't leak as
none of the dynamically allocated config fields were being
populated, but it's clearer if the wrappers follow the
documented API usage guidelines)
(cherry picked from commit 05e48865be69e1e5824f6915b588ff054717bb42)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
|
| |
|
|
|
|
|
| |
(cherry picked from commit c7b220499662f0c7a4cae51e33372f92ca7b1ee9)
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
|
|
| |
PyFrameObject (GH-98002)
(cherry picked from commit 21a2d9ff550977f2668e2cf1cc15793bf27fa109)
|
|
|
|
|
|
| |
- only define recreate_gil with ifdef HAVE_FORK.
(cherry picked from commit d9c1b746b5013f81d1724757bb3c6a1c87c4a8dc)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
| |
frames (GH-97886)
(cherry picked from commit 0ff8fd65838f9f9ed90d7a055d26a2ce9fc0ce85)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
| |
generator/coroutine frames (GH-97812)
(cherry picked from commit 93fcc1f4133e177882850177c2c047d46019b812)
|
|
|
|
|
| |
(cherry picked from commit 873a2f25272ca9fb027866a9730c44ba627b30cc)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
Fix command line parsing: reject "-X int_max_str_digits" option with
no value (invalid) when the PYTHONINTMAXSTRDIGITS environment
variable is set to a valid limit.
(cherry picked from commit 41351662bcd21672d8ccfa62fe44d72027e6bcf8)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 8fd2c3b75b90c4ee391894aa5094615bbdb6242f)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-96973)
(cherry picked from commit dfc73b57247aac575c83055d960c03bdc28b51fd)
Automerge-Triggered-By: GH:brandtbucher
|
|
|
|
|
| |
(cherry picked from commit c10e33ac119d96c4d88d5ae8b59e65a76ae0ad3c)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At Python exit, sometimes a thread holding the GIL can wait forever
for a thread (usually a daemon thread) which requested to drop the
GIL, whereas the thread already exited. To fix the race condition,
the thread which requested the GIL drop now resets its request before
exiting.
take_gil() now calls RESET_GIL_DROP_REQUEST() before
PyThread_exit_thread() if it called SET_GIL_DROP_REQUEST to fix a
race condition with drop_gil().
Issue discovered and analyzed by Mingliang ZHAO.
(cherry picked from commit 04f4977f508583954ad7b9cb09076ee1e57461f8)
|
|
|
|
|
|
|
|
|
| |
frame object. (GH-96776) (#96787)
(cherry picked from commit 12c5f328d2479ac3432df5e266adc4e59adeabfe)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH-96045, GH-96389, GH-96744) (GH-96749)
Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.
``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.
|
|
|
|
|
| |
(cherry picked from commit 50a70a083d34305a52fac4f5901bff2ead152d68)
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
| |
(cherry picked from commit 88a7f661ca02c0eb76b8f19234b8293b70f171e2)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
| |
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit aa3b4cf779b3dddb84e094879b91703354910d8c)
|
|
|
| |
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 67444902a0f10419a557d0a2d3b8675c31b075a9)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.
This PR comes fresh from a pile of work done in our private PSRT security response team repo.
This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002
Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).
<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->
I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
|
|
|
|
|
|
|
|
| |
Automerge-Triggered-By: GH:tiran
(cherry picked from commit 822955c16654c22c10a993f5a94bbb68b857a150)
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
Alternative of GH-96107
(cherry picked from commit e0d54a4a799dae4ebdd72a16bcf287ed62ae2972)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit 1b46d118e6e72daa64b98cafddb406c68b419efa)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
|
| |
Co-authored-by: Brett Cannon <brett@python.org>.
(cherry picked from commit 0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
| |
command line (GH-28823)" (GH-94745)
(cherry picked from commit aa37ffda29ac48fb2df5a7029ba2e626ecc45850)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
(GH-95272)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
| |
(cherry picked from commit b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-94999) (GH-95353)
When keyword argument name is an instance of a str subclass with
overloaded methods __eq__ and __hash__, the former code could not find
the name of an extraneous keyword argument to report an error, and
_PyArg_UnpackKeywords() returned success without setting the
corresponding cell in the linearized arguments array. But since the number
of expected initialized cells is determined as the total number of passed
arguments, this lead to reading NULL as a keyword parameter value, that
caused SystemError or crash or other undesired behavior.
(cherry picked from commit ebad53a4dc1bb591820724a22cef9b8459185b5f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-95208)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 00474472944944b346d8409cfded84bb299f601a)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|