| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
(GH-108524)
Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be
called immediately after using the C API which sets errno or the Windows
error code.
(cherry picked from commit 2b15536fa94d07e9e286826c23507402313ec7f4)
|
|
|
|
|
|
|
| |
PyErr_SetFromErrnoWithFilename() etc (GH-107929) (GH-108206)
(cherry picked from commit 80bdebdd8593f007a2232ec04a7729bba6ebf12c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
PyErr_Format() (GH-107918) (GH-108135)
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: Finn Womack <flan313@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-106768) (GH-106855) (GH-106863)
[3.11] [3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855)
Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65baee72131b49f4ce8ca2da568a6f2001ce93).
(cherry picked from commit a423ddbdeada8a2fd8657453b9e9f58ba0dd921d)
|
|
|
|
|
| |
(cherry picked from commit 0355625d94a50f4b816770bad946420d005900b8)
Co-authored-by: Jeremy Paige <ucodery@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-106227)
* EOFError no longer overrides other errors such as MemoryError or OSError at
the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904b229583033035d91a3800da5604dcaad4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
(`Python/import.c`) (GH-105980). (#106100)
* [3.11] gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (GH-105980).
(cherry picked from commit cd5280367a3a7065d13b8f7234474f7a2e9a18fd)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
(#106040)
[3.11] 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-106039)
* PyUnicode_CompareWithASCIIString() only works if the second argument
is ASCII string.
* Refleak in get_suggestions_for_name_error.
* Add some missing error checks.
(cherry picked from commit c8c162ef5294cddb7ac75fe93ab918e5661c68ee)
|
|
|
|
|
|
|
|
| |
many __defaults__ (GH-105864)
GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105847)
(cherry picked from commit 2beab5bdef5fa2a00a59371e6137f769586b7404)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
|
|
|
| |
(GH-105839)
GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)
(cherry picked from commit a4056c8f9c2d9970d39e3cb6bffb255cd4b8a42c)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
|
|
|
|
|
| |
In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit a8d69fe92c65d636fc454cfb1825c357eb2e6325)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
| |
(#105611) (#105666)
(cherry picked from commit 41cddc2e93a285b81fa30ac542b088bd9d0112e9)
In _PySys_AddXOptionWithError() and sys_add_xoption(),
bail on first error to prevent exceptions from possibly being
overwritten.
|
|
|
|
|
|
|
|
|
| |
(#105660)
Bail on first error to prevent exceptions from possibly being
overwritten.
(cherry picked from commit 567d6ae8e77579173510fc948ac06b2ababf3d40)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
| |
(GH-105585) (#105650)
(cherry picked from commit d4fa52934a282df51cff800eee5caeb94a229547)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
| |
(#105582)
(cherry picked from commit 6c832ddcf28187f86100c790afb16a0223d945d0)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
| |
(cherry picked from commit 69d1245685cf95ddc678633e978a56673da64865)
|
|
|
|
|
|
|
|
| |
checked with PyErr_Occurred (GH-105185) (#105219)
gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185)
(cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
| |
(GH-104650)
Backport of GH-104579
|
|
|
|
|
| |
(#104636)
(cherry picked from commit 0589c6a4d3d822cace42050198cb9a5e99c879ad)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-104107) (#104260)
gh-104018: remove unused format "z" handling in string formatfloat() (GH-104107)
This is a cleanup overlooked in PR GH-104033.
(cherry picked from commit 69621d1b09c996e43a1e13d2fa4c317d3dd4d738)
Co-authored-by: John Belmonte <john@neggie.net>
|
|
|
|
|
|
|
| |
gh-103886: Improve `builtins.__doc__` (GH-104179)
(cherry picked from commit b35711d17a90251bdd57d255090e07daafe89f6c)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#103550) (#103816)
Manual backport of https://github.com/python/cpython/pull/103550.
<!-- gh-issue-number: gh-101517 -->
* Issue: gh-101517
<!-- /gh-issue-number -->
---------
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
(#103040)
[3.11] gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282)
(cherry picked from commit afa6092ee4260bacf7bc11905466e4c3f8556cbb)
|
|
|
|
|
|
|
|
| |
The error-handling code in new_interpreter() has been broken for a while. We hadn't noticed because those code mostly doesn't fail. (I noticed while working on gh-101660.) The problem is that we try to clear/delete the newly-created thread/interpreter using itself, which just failed. The solution is to switch back to the calling thread state first.
(cherry picked from commit d1b883b52a99427d234c20e4a92ddfa6a1da8880)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
https: //github.com/python/cpython/issues/98608
|
|
|
|
|
| |
(GH-102803) (GH-102807)
Authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
|
|
|
|
|
|
| |
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
(cherry picked from commit 66aa78cbe604a7c5731f074b869f92174a8e3b64)
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
|
|
|
|
|
|
|
| |
(#102234)
[3.11] GH-102126: fix deadlock at shutdown when clearing thread states (GH-102222)
(cherry picked from commit 5f11478ce7fda826d399530af4c5ca96c592f144)
|
|
|
|
|
|
|
|
|
| |
gh-97786: Fix compiler warnings in pytime.c (GH-101826)
Fixes compiler warnings in pytime.c.
(cherry picked from commit b1b375e2670a58fc37cb4c2629ed73b045159918)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
|
|
|
| |
gh-101967: add a missing error check (GH-101968)
(cherry picked from commit 89413bbccb9261b72190e275eefe4b0d49671477)
Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
|
|
|
| |
modules for incompatibility (GH-101615)
(cherry picked from commit 3a88de7a0af00872d9d57e1d98bc2f035cb15a1c)
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
|
|
|
|
|
|
| |
3.11+ (GH-101127) (#101636)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Matthieu Dartiailh <m.dartiailh@gmail.com>
|
|
|
|
| |
(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>
|