| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
GH-106152: Add PY_THROW event to cProfile (GH-106161)
(cherry picked from commit cea9d4ea82abcb2c6f1d83a2fe819859da4bbda4)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
|
|
|
|
| |
(#106099)
[3.12] gh-105987: Fix reference counting issue in `_asyncio._swap_current_task` (GH-105989).
(cherry picked from commit d2cbb6e918d9ea39f0dd44acb53270f2dac07454)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
(#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)
|
|
|
|
| |
For a while now, pending calls only run in the main thread (in the main interpreter). This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run.
(cherry picked from commit 757b402)
|
|
|
|
|
|
|
|
| |
(gh-105731)
We are changing it to be more flexible that a strict bool can be for possible future expanded used cases.
(cherry picked from commit b97e14a806477af4225777d215ac38c0d9b845f0)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
|
|
|
|
|
|
|
| |
(#105667) (#105720)
Prevent exceptions from possibly being overwritten in case of multiple
failures.
(cherry picked from commit 217589d4f3246d67c6ef0eb0be2b1c33987cf260)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-105686) (#105710)
All fields must be explicitly initialised to prevent manipulation of
uninitialised fields in dealloc.
Align initialisation order with the layout of the object structs.
(cherry picked from commit ca3cc4b95d66f7527ebe0ba4cdb1907082d9bfc8)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
| |
values (GH-105495) (#105700)
gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit 4f7d3b602d47d61137e82145f601dccfe6f6cd3c)
Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
| |
(cherry picked from commit 20a56d8becba1a5a958b167fdb43b1a1b9228095)
Add proper error handling to add_errors_module() to prevent exceptions
from possibly being overwritten.
|
|
|
|
|
|
|
| |
Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the
current exception.
(cherry picked from commit e8998e46a7ce8ad336e0941a6da6e50cb88d1e47)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix a bug where an IndexError could end up being overwritten.
(cherry picked from commit f668f73bc88cce0112b304d87aa998fb28013c71)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix a bug where an exception could end up being overwritten.
(cherry picked from commit c932f7284977ebf813313157c52d716ba225a7ac)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Improve error handling so init bails on the first exception.
(cherry picked from commit 16d49680b56e00c53c00683b949138e584669fd3)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
| |
Add proper error handling to prevent reference leaks and overwritten
exceptions.
(cherry picked from commit 01f4230460454d4a849a5ba93320142c1a0c93a8)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
Fix a bug where 'tp_richcompare' could end up overwriting an exception.
(cherry picked from commit 35cff545db7c7912046c0ce5627db2e4d2b60f57)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(#105612)
Fix bugs where exceptions could end up being overwritten
because of deferred error handling.
(cherry picked from commit 33c92c4f15539806c8aff8574ff30a8b307e3e4d)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.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>
|
|
|
|
|
|
| |
Fix bugs where exceptions could end up being overwritten.
(cherry picked from commit 00b599ab5a76023fa0083d7cc5d3c569342a5191)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
(cherry picked from commit eede1d2f48b4fe7f7918952d9ebeb744b58668c1)
Bail immediately if an exception is set, to prevent exceptions from
being overwritten.
|
|
|
|
|
|
| |
(cherry picked from commit 89aac6f6b7b3af046ec137121c90732289e79efc)
Error handling was deferred in some cases, which could potentially lead
to exceptions being overwritten.
|
|
|
|
|
|
|
|
| |
(gh-105465) (gh-105471)
Fixes a typo in d2e2e53.
(cherry picked from commit 5394bf92aa6516feb3322d8372d1579bd9c1417b)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
|
|
|
|
| |
(GH-105457) (#105458)
|
|
|
|
|
|
|
|
| |
(GH-105412) (#105440)
Check for error after each call to PyUnicode_FromStringAndSize().
(cherry picked from commit a24a780d937109a0982d807473ae410cc75b0e3b)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
| |
gh-104399: Use newer libtommath APIs when necessary (GH-104407)
(cherry picked from commit 00d73caf804c0474980e471347d6385757af975f)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#105371)
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)
* Add "limited-c-api" and "stable-api" references.
* Rename "stable-abi-list" reference to "limited-api-list".
* Makefile: Document files regenerated by "make regen-limited-abi"
* Remove first empty line in generated files:
- Lib/test/test_stable_abi_ctypes.py
- PC/python3dll.c
(cherry picked from commit bae415ad02c79cf3a2eec4aa6969221a12e6716f)
* gh-102304: Fix up Simple ABI doc (GH-105351)
(cherry picked from commit 0202aa002e06acef9aa55ace0d939103df19cadd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
finalization (GH-104826) (#105277)
gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826)
Disallow thread creation and fork at interpreter finalization.
in the following functions, check if interpreter is finalizing and raise `RuntimeError` with appropriate message:
* `_thread.start_new_thread` and thus `threading`
* `posix.fork`
* `posix.fork1`
* `posix.forkpty`
* `_posixsubprocess.fork_exec` when a `preexec_fn=` is supplied.
---------
(cherry picked from commit ce558e69d4087dd3653207de78345fbb8a2c7835)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
| |
_testcapimodule/get_basic_static_type() (GH-105225) (#105248)
(cherry picked from commit e01b04c9075c6468ed57bc883693ec2a06a6dd8e)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
|
|
| |
PyType_Ready() (gh-105122) (gh-105211)
When I added the relevant condition to type_ready_set_bases() in gh-103912, I had missed that the function also sets tp_base and ob_type (if necessary). That led to problems for third-party static types.
We fix that here, by making those extra operations distinct and by adjusting the condition to be more specific.
(cherry picked from commit 1469393)
Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
|
|
|
|
|
|
|
|
| |
Static Builtin Types (gh-105115) (gh-105124)
In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry. However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses). We address that here by reverting back to shared objects, making them immortal in the process.
(cherry picked from commit 7be667d)
Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#105199)
gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174)
Upgrade builds to OpenSSL 1.1.1u.
This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t.
The Mac/BuildScript/build-installer.py was already updated.
Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9, and adds a new _ssl_data_31.h file from 3.1.1 along with the ssl.c code to use it.
Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting).
backports of this prior to 3.12 will not include the openssl 3.1 header.
(cherry picked from commit ede89af605b1c0442353435ad22195c16274f65d)
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Quoting autoconf (v2.71):
All current systems provide time.h; it need not be checked for.
Not all systems provide sys/time.h, but those that do, all allow
you to include it and time.h simultaneously.
(cherry picked from commit 9ab587b7146618866cee52c220aecf7bd5b44b02)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
| |
test_import (GH-105085) (#105170)
(cherry picked from commit a99b9d911e0f8cb11b3436bdd8eb649b15d01a50)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
| |
(cherry picked from commit cda1bd3c9d3b2cecdeeba0c498cd2df83fbdb535)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
implementation in the unstable API (GH-105072) (#105095)
(cherry picked from commit b7aadb4583b040ddc8564896b91f4e5e571c82d6)
|
|
|
|
|
|
|
|
|
|
| |
(GH-105082) (#105083)
Correctly decref 'initialized' in init_module()
(cherry picked from commit d14eb3433cf2a40a202471b815f0a935f2840ead)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
| |
not support FileIdInformation (GH-104892)
(cherry picked from commit 6031727a37c6003f78e3b0c7414a0a214855dd08)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
| |
Windows Dev Drive (GH-104805)
(cherry picked from commit bfd20d257e4ad16a25f4bac0ea4dbb719cdf6bc7)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
| |
(GH-104965) (GH-104997)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-104372: Drop the GIL around the vfork() call. (GH-104782)
On Linux where the `subprocess` module can use the `vfork` syscall for
faster spawning, prevent the parent process from blocking other threads
by dropping the GIL while it waits for the vfork'ed child process `exec`
outcome. This prevents spawning a binary from a slow filesystem from
blocking the rest of the application.
Fixes GH-104372.
(cherry picked from commit d08679212d9af52dd074cd4a6abb440edb944c9c)
Co-authored-by: Gregory P. Smith <gps@python.org>
|
|
|
|
|
|
|
|
| |
gh-99108: Refresh HACL* (GH-104808)
Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3.
(cherry picked from commit 160321e5304b962a162eb023472aa2bc8307ae15)
Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
|
|
|
|
|
|
|
|
| |
gh-104372: use == -1 before PyErr_Occurred (GH-104831)
The ideal pattern for this. (already in the 3.11 backport)
(cherry picked from commit 7f963bfc79a515dc9822ebddbfb1b5927d2dda09)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
| |
(GH-104811) (#104823)
gh-103295: fix stack overwrite on 32-bit in perf map test harness (GH-104811)
(cherry picked from commit e0b3078705b271ff278dfbc788c2b061c92a9aa3)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-104675) (#104776)
gh-99108: Release the GIL around hashlib built-in computation (GH-104675)
This matches the GIL releasing behavior of our existing `_hashopenssl`
module, extending it to the HACL* built-ins.
Includes adding comments to better describe the ENTER/LEAVE macros
purpose and explain the lock strategy in both existing and new code.
(cherry picked from commit 2e5d8a90aa633ff0bebc9b2b8e21eea389937b19)
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
|
|
| |
(#104542)
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
| |
Co-authored-by: Aniket Panse <aniketpanse@fb.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
| |
|