| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* gh-89811: Check for valid tp_version_tag in specializer (GH-113558)
* gh-113937 Fix failures in type cache tests due to re-running (GH-113953)
* Update backported code for 3.11 specifically
|
|
|
|
|
|
|
|
|
|
| |
(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 3ddc5152550ea62280124c37d0b4339030ff7df4)
|
|
|
|
|
|
|
| |
(GH-114701)
(cherry picked from commit 1ac1b2f9536a581f1656f0ac9330a7382420cda1)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
| |
__getattr__ : Normalize exception (#114379)
|
|
|
|
|
|
|
| |
implementation (GH-114385) (#114387)
(cherry picked from commit 38768e4cdd1c4b6e03702da8a94e1c22479d6ed3)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
| |
__getattr__ (GH-113359) (#114118)
|
|
|
|
|
|
|
| |
Python/symtable.c (GH-113843) (GH-113852)
(cherry picked from commit fda901a1ff94ea6cc338b74928acdbc5ee165ed7)
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
|
|
|
|
|
|
|
|
|
| |
PyAST_mod2obj call. (GH-113035) (GH-113472) (GH-113476)
(cherry picked from commit 48c49739f5502fc7aa82f247ab2e4d7b55bdca62)
(cherry picked from commit d58a5f453f59f44ccf09b1a9b11a0b879ac6f35b)
Co-authored-by: Yilei Yang <yileiyang@google.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
|
|
|
|
|
|
|
|
|
| |
(GH-112770) (GH-113105)
It was raised in two cases:
* in the import statement when looking up __import__
* in pickling some builtin type when looking up built-ins iter, getattr, etc.
(cherry picked from commit 1161c14e8c68296fc465cd48970b32be9bee012e)
|
|
|
|
|
| |
tuples in PyArg_Parse (gh-112439) (GH-112461)
(cherry picked from commit 4eea1e82369fbf7a795d1956e7a8212a1b58009f)
|
|
|
|
|
|
|
|
| |
[3.12] gh-109181: Fix refleak in tb_get_lineno() (GH-111948)
PyFrame_GetCode() returns a strong reference.
(cherry picked from commit 4b0c875d91727440251a8427a80d8515e39d18cd)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
| |
line number (GH-111548) (#111550)
.
(cherry picked from commit abb15420c11d9dda9c89f74eac8417240b321109)
|
|
|
|
| |
(#111373)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.11] gh-109216: Fix possible memory leak in `BUILD_MAP`
* Add NEWS
* Update Python/ceval.c
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
---------
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
|
|
|
|
| |
(GH-110238) (#110512)
gh-110237: Check `PyList_Append` for errors in `_PyEval_MatchClass` (GH-110238)
(cherry picked from commit dd9d781da30aa3740e54c063a40413c542d78c25)
Co-authored-by: denballakh <47365157+denballakh@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-109522) (GH-109781)
PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks
or sys.path_importer_cache or they are not list and dict correspondingly.
Previously it could return NULL without setting error in obscure cases,
crash or raise SystemError if these attributes have wrong type.
(cherry picked from commit 62c7015e89cbdedb5218d4fedd45f971885f67a8)
|
|
|
|
|
|
|
|
|
|
| |
gh-110052: Fix faulthandler for freed tstate (#110069)
faulthandler now detected freed interp and freed tstate, and no
longer dereference them.
Backport to 3.11: add pycore_pymem.h include to traceback.c.
(cherry picked from commit 2e37a38bcbfbe1357436e030538290e7d00b668d)
|
|
|
|
|
| |
(cherry picked from commit c829975428253568d47ebfc3104fa7386b5e0b58)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-109352) (#109380)
gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352)
(cherry picked from commit 79101edb03b7381b514126c68acabfcbbba2f842)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
| |
(#109197) (#109283)
gh-109179: Fix traceback display for SyntaxErrors with notes (#109197)
(cherry picked from commit ecd21a629a2a30bcae89902f7cad5670e9441e2c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#109272)
gh-108987: Fix _thread.start_new_thread() race condition (#109135)
Fix _thread.start_new_thread() race condition. If a thread is created
during Python finalization, the newly spawned thread now exits
immediately instead of trying to access freed memory and lead to a
crash.
thread_run() calls PyEval_AcquireThread() which checks if the thread
must exit. The problem was that tstate was dereferenced earlier in
_PyThreadState_Bind() which leads to a crash most of the time.
Move _PyThreadState_CheckConsistency() from thread_run() to
_PyThreadState_Bind().
(cherry picked from commit 517cd82ea7d01b344804413ef05610934a43a241)
|
|
|
|
|
|
|
| |
(GH-109225) (GH-109228)
(cherry picked from commit 429749969621b149c1a7c3c004bd44f52bec8f44)
Co-authored-by: 云line <31395137+yunline@users.noreply.github.com>
|
|
|
|
|
| |
(GH-109146) (GH-109158)
(cherry picked from commit 87a7faf6b68c8076e640a9a1347a255f132d8382)
|
|
|
|
|
|
| |
parentheses (GH-108959) (#109148)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#109134)
gh-104690: thread_run() checks for tstate dangling pointer (#109056)
thread_run() of _threadmodule.c now calls
_PyThreadState_CheckConsistency() to check if tstate is a dangling
pointer when Python is built in debug mode.
Rename ceval_gil.c is_tstate_valid() to
_PyThreadState_CheckConsistency() to reuse it in _threadmodule.c.
(cherry picked from commit f63d37877ad166041489a968233b57540f8456e8)
|
|
|
|
|
|
|
|
| |
(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>
|