| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
This is minimal support. Subinterpreters are not supported yet. That will be addressed in a later change.
(cherry picked from commit 3e8b60905e97a4fe89bb24180063732214368938)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
|
|
|
|
|
|
| |
The fix in gh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once. This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag. We fix that here by clearing each of the three modules after loading them. We also tweak a check in _modules_by_index_check().
(cherry picked from commit ae7b17673f29efe17b416cbcfbf43b5b3ff5977c)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(gh-119632)
The assertion was added in gh-118532 but was based on the invalid assumption that PyState_FindModule() would only be called with an already-initialized module def. I've added a test to make sure we don't make that assumption again.
(cherry picked from commit 0c5ebe13e9937c446e9947c44f2570737ecca135)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
|
|
|
| |
(GH-119541) (#119630)
|
|
|
|
| |
(gh-119626) (gh-119629)
|
|
|
|
|
|
| |
(GH-119583) (#119624)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
|
|
| |
(#119621)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-119475) (#119602)
gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475)
(cherry picked from commit 3b26cd8ca0e6c65e4b61effea9aa44d06e926797)
Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
|
|
|
|
| |
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
|
|
|
| |
argument counts. (GH-119179) (GH-119575)
gh-111997: Fix argument count for LINE event and clarify type of argument counts. (GH-119179)
(cherry picked from commit 70b07aa4153c1a914a3d69307d5b258cf7ed16ab)
Co-authored-by: scoder <stefan_ml@behnel.de>
|
|
|
|
| |
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
| |
(#119556)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
| |
(#119544)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 08e65430aafa1047029e6f132a5f748c415bda14)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
Misc improvement to the docs for itertools (gh-119529)
|
|
|
|
| |
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
|
|
|
| |
posixmodule (GH-118355)
(cherry picked from commit 96b392df303b2cfaea823afcb462c0b455704ce8)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`Out-File -Encoding utf8` and similar commands in Windows Powershell 5.1 emit
UTF-8 with a BOM marker, which the regular `utf-8` codec decodes incorrectly.
`utf-8-sig` accepts a BOM, but also works correctly without one.
This change also makes .pth files match the way Python source files are handled.
(cherry picked from commit bf5b6467f8cc06759f3396ab1a8ad64fe7d1db2e)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
|
|
| |
gh-69214: Fix fcntl.ioctl() request type (GH-119498)
Use an 'unsigned long' instead of an 'unsigned int' for the request
parameter of fcntl.ioctl() to support requests larger than UINT_MAX.
(cherry picked from commit 92fab3356f4c61d4c73606e4fae705c6d8f6213b)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
monitoring (GH-119216) (#119497)
* gh-118692: Avoid creating unnecessary StopIteration instances for monitoring (GH-119216)
(cherry picked from commit 6e9863d7a3516cc76d6ce13923b15620499f3855)
---------
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
| |
(cherry picked from commit b48a3dbff4d70e72797e67b46276564fc63ddb89)
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-119461: Fix ThreadedVSOCKSocketStreamTest (#119465)
Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.
On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).
(cherry picked from commit e94dbe4ed83460f18bd72563c5f09f6cdc71f604)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
thread holds it (GH-118745) (#119474)
`drop_gil()` assumes that its caller is attached, which means that the current
thread holds the GIL if and only if the GIL is enabled, and the enabled-state
of the GIL won't change. This isn't true, though, because `detach_thread()`
calls `_PyEval_ReleaseLock()` after detaching and
`_PyThreadState_DeleteCurrent()` calls it after removing the current thread
from consideration for stop-the-world requests (effectively detaching it).
Fix this by remembering whether or not a thread acquired the GIL when it last
attached, in `PyThreadState._status.holds_gil`, and check this in `drop_gil()`
instead of `gil->enabled`.
This fixes a crash in `test_multiprocessing_pool_circular_import()`, so I've
reenabled it.
(cherry picked from commit be1dfccdf2c5c7671b8a549e969b8cf7d60d9936)
Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 6e012ced6cc07a7502278e1849c5618d1ab54a08)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
| |
(GH-119456)
|
| |
|
|
|
|
|
|
|
|
| |
Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#119439)
(cherry picked from commit e6572e8f98d33994d2d0dd3afa92a2a72ee642a9)
Also includes:
* gh-111201: Use calc_complete_screen after bracketed paste in PyREPL (GH-119432)
(cherry picked from commit 14b063cbf1bb11a489d04a31f277edba0fc8893c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
| |
from terminating the code block (GH-119355) (#119404)
(cherry picked from commit 5091c4400c9ea2a2d1e4d89a28c9d0de2651fa6d)
Co-authored-by: Aya Elsayed <ayah.ehab11@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
| |
(GH-119435) (#119441)
Fix culmitive errors in wrapping as lines proceed
(cherry picked from commit e3bf5381fd056d0bbdd775463e3724aab2012e45)
Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
|
|
|
|
|
|
|
|
| |
gh-117657: Fix missing atomic in dict_resize (GH-119312)
Fix missing atomic in dict_resize
(cherry picked from commit 2b3fb767bea1f96c9e0523f6cc341b40f0fa1ca1)
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-70795: Rework RLock documentation (GH-103853)
Attempted to simultaneously reduce verbosity, while more descriptively
describing behavior.
Fix links (RLock acquire/release previously linking to Lock
acquire/release, seems like bad copy pasta).
Add a seealso for with-locks.
Switch section to use bullet points.
---------
(cherry picked from commit 2fbea81d646688cf438be1dc0be82112a9ae4325)
Co-authored-by: uıɐɾ ʞ ʇɐɯɐs <_@skj.io>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
|
|
|
|
|
| |
(cherry picked from commit cd516cd1f5e94dba887353f421513fd172efadf3)
Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
(cherry picked from commit 0883fd22e6d4a3e360b48f30f6afa34553b3786a)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
| |
(#119429)
(cherry picked from commit e03dde5a24d3953e0b16f7cdefdc8b00aa9d9e11)
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
|
|
|
|
|
|
|
|
| |
(#119414)
(cherry picked from commit 73ab83b27f105a4509046ce26e35f20d66625195)
Co-authored-by: Eugene Triguba <eugenetriguba@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages.
(cherry picked from commit c9073eb1a99606df1efeb8959e9f11a8ebc23ae2)
Co-authored-by: Michael Vincent <377567+Vynce@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(#119430)
(cherry picked from commit 447edb6e987d22c91f6dfad043f3472ce07bdfc0)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
build (GH-119315) (#119419)
Add `Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST` and
`Py_END_CRITICAL_SECTION_SEQUENCE_FAST` macros and update `str.join` to use
them. Also add a regression test that would crash reliably without this
patch.
(cherry picked from commit baf347d91643a83483bae110092750d39471e0c2)
Co-authored-by: Josh {*()} Rosenberg <26495692+MojoVampire@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 033f5c87f1f876088701d1ae078dc39c41177d4a)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Interpreters (gh-119331) (gh-119410)
_PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed.
This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple.
This change also fixes a bug where only the most recent parser was added to the global linked list.
(cherry picked from commit 81865002aee8eaaeb3c7e402f86183afa6de77bf)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-119318) (#119408)
(cherry picked from commit a3e4fec8734a304d654e4ae24a4aa2f41a7b0640)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
(cherry picked from commit 506b1a3ff66a41c72d205c8e4cba574e439d8e76)
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
| |
(GH-119274) (#119405)
(cherry picked from commit c886bece3b3a49f8a0f188aecfc1d6ff89d281e6)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
(#119403)
(cherry picked from commit 561ff1fa710493dee8c6482f990bd17535b27040)
|
|
|
|
|
| |
(cherry picked from commit f49df4f486e531ff2666eb22854117c564b3de3d)
Co-authored-by: Eugene Triguba <eugenetriguba@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix regression introduced in gh-100884: AttributeError when re-fold a long
address list.
Also fix more cases of incorrect encoding of the address separator in the
address list missed in gh-100884.
(cherry picked from commit 858b9e85fcdd495947c9e892ce6e3734652c48f2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-119151) (GH-119386)
Deprecation took place in d78742a260ba09e53c844de7b1fd11a11c674945 (3.5)
(cherry picked from commit aee8f03abbebfb76357f459dfb297026862e3c0b)
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 904e256292a0ed6c36f3490da9e4f8245370f535)
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
|
|
| |
(GH-119298) (GH-119346)
(cherry picked from commit 10b1bd926a5546e0f5cbd1a47d00dc5ff84f1979)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|