| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
(GH-119493) (#119697)
gh-119443: Turn off from __future__ import annotations in REPL (GH-119493)
(cherry picked from commit a8e35e8ebad8c3bb44d14968aa05d1acbc028247)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
| |
This is a backport of 3 commits that go together.
(cherry picked from commit a895756)
(cherry picked from commit b30d30c)
(cherry picked from commit a89fc26)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#119682)
- Cache line object to avoid creating a Unicode object
for all of the tokens in the same line.
- Speed up byte offset to column offset conversion by using the
smallest buffer possible to measure the difference.
(cherry picked from commit d87b0151062e36e67f9e42e1595fba5bf23a485c)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(GH-119296) (#119678)
(cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
(#119643)
Fixes #119311. Fixes #119395.
(cherry picked from commit a9a74da4a0ca0645f049e67b6434a95e30592c32)
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
| |
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 08e65430aafa1047029e6f132a5f748c415bda14)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
posixmodule (GH-118355)
(cherry picked from commit 96b392df303b2cfaea823afcb462c0b455704ce8)
Co-authored-by: Nice Zombies <nineteendo19d0@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>
|
|
|
|
| |
(GH-119456)
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(#119429)
(cherry picked from commit e03dde5a24d3953e0b16f7cdefdc8b00aa9d9e11)
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(#119403)
(cherry picked from commit 561ff1fa710493dee8c6482f990bd17535b27040)
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit 904e256292a0ed6c36f3490da9e4f8245370f535)
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
|
|
| |
(GH-118755)
(cherry picked from commit b64182550f73e556344bd754d32e3be5d22a74e1)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
|
|
|
|
| |
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
| |
line number (GH-119221) (#119261)
|
|
|
|
|
|
|
|
|
|
|
| |
windows blurry (GH-119175) (#119289)
gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175)
------
(cherry picked from commit 538ed5e4818aa0d0aa759634e8bfa23e317434a1)
Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#119270)
gh-119050: Add XML support to libregrtest refleak checker (GH-119148)
regrtest test runner: Add XML support to the refleak checker
(-R option).
* run_unittest() now stores XML elements as string, rather than
objects, in support.junit_xml_list.
* runtest_refleak() now saves/restores XML strings before/after
checking for reference leaks. Save XML into a temporary file.
(cherry picked from commit 9257731f5d3e9d4f99e314b23a14506563e167d7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
(GH-118784) (GH-119251)
It was set to 2 in 65f5e586a1239ed1a66d8284773d7b02ce40e480 (GH-98592).
(cherry picked from commit e188527c343c74574d481b77c30063db1436e62b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
encoded words. (GH-92281) (#119245)
* Fix for email.generator.Generator with whitespace between encoded words.
email.generator.Generator currently does not handle whitespace between
encoded words correctly when the encoded words span multiple lines. The
current generator will create an encoded word for each line. If the end
of the line happens to correspond with the end real word in the
plaintext, the generator will place an unencoded space at the start of
the subsequent lines to represent the whitespace between the plaintext
words.
A compliant decoder will strip all the whitespace from between two
encoded words which leads to missing spaces in the round-tripped
output.
The fix for this is to make sure that whitespace between two encoded
words ends up inside of one or the other of the encoded words. This
fix places the space inside of the second encoded word.
A second problem happens with continuation lines. A continuation line that
starts with whitespace and is followed by a non-encoded word is fine because
the newline between such continuation lines is defined as condensing to
a single space character. When the continuation line starts with whitespace
followed by an encoded word, however, the RFCs specify that the word is run
together with the encoded word on the previous line. This is because normal
words are filded on syntactic breaks by encoded words are not.
The solution to this is to add the whitespace to the start of the encoded word
on the continuation line.
Test cases are from GH-92081
* Rename a variable so it's not confused with the final variable.
(cherry picked from commit a6fdb31b6714c9f3c65fefbb3fe388b2b139a75f)
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
|
|
|
|
|
|
|
| |
found (GH-119196) (#119217)
(cherry picked from commit 642b25b9a82c368b045709f0b94e7d5a02400ed2)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
|
|
|
|
|
|
|
| |
(#119206)
gh-119121: Fix and test `async.staggered.staggered_race` (GH-119173)
(cherry picked from commit 16b46ebd2b0025aa461fdfc95fbf98a4f04b49e6)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
`pathlib.PurePath.with_suffix(None)` (GH-119124) (#119183)
Restore behaviour from 3.12 when `path.with_suffix(None)` is called.
(cherry picked from commit 3c28510b984392b8dac87a17dfc5887366d5c4ab)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
|
|
|
|
|
|
|
| |
`os.path.realpath()` (GH-118489) (#119163)
(cherry picked from commit caf6064a1bc15ac344afd78b780188e60b9c628e)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
|
|
|
|
|
|
|
|
| |
(gh-119134) (#119153)
gh-119132: Update sys.version to identify free-threaded or not. (gh-119134)
(cherry picked from commit c141d4393750c827cbcb3867f0f42997a3bb3528)
Co-authored-by: Donghee Na <donghee.na@python.org>
|
|
|
|
|
|
|
|
|
| |
API (GH-119063) (GH-119106)
The source line was not displayed if the warnings module had not yet
been imported.
(cherry picked from commit 100c7ab00ab66a8c0d54582f35e38d8eb691743c)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
|
|
|
| |
Fix typos in documentation (GH-119092)
(cherry picked from commit 65de194dd80bbc8cb7098d21cfd6aefd11d0d0ce)
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
(GH-119101)
(cherry picked from commit 4702b7b5bdc07d046576b4126cf4e4f5f7145abb)
|
|
|
|
|
|
|
|
|
| |
(GH-118782) (GH-119072)
For unknown reasons some arguments for Tkinter binding can be created
as a 1-tuple containing a Tcl_Obj when wantobjects is 2.
(cherry picked from commit 5b88d95cc542cf02303c6fe0e8719a93544decdb)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
starting with multiple slashes and no authority (GH-113563) (GH-119023)
(cherry picked from commit e237b25a4fa5626fcd1b1848aa03f725f892e40e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-119020)
(cherry picked from commit e04cd964eb4eee1b0ae5b2c34727abce6c0fb7f0)
Co-authored-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
not set (GH-118979) (#119007)
gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979)
(cherry picked from commit f526314194f7fd15931025f8a4439c1765666e42)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
|
|
|
| |
arguments with **kwargs (GH-103404) (#118985)
(cherry picked from commit 9c1520244151f36e010c1b04bedf14747a28517d)
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
|
|
|
| |
--enable-experimental-jit (GH-118959)
(cherry picked from commit 5b941e57c71d7d0ab983d81a169f892662cfe446)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
|
|
|
|
|
|
|
| |
(#118933)
(cherry picked from commit 35c436186b849f8f2f9fb866c59015c9d034d448)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
|
| |
(cherry picked from commit 13d7cf997bc9c22cf67c42fd799413e8325e0039)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-118865) (#118904)
Use relaxed loads/stores when reading/writing to this field.
(cherry picked from commit 22d5185308f85efa22ec1e8251c409fe1cbd9e6b)
Co-authored-by: mpage <mpage@meta.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797)
_PyWeakref_ClearRef was previously exposed in the public C-API, although
it begins with an underscore and is not documented. It's used by a few
C-API extensions. There is currently no alternative public API that can
replace its use.
_PyWeakref_ClearWeakRefsExceptCallbacks is the only thread-safe way to
use _PyWeakref_ClearRef in the free-threaded build. This exposes the C
symbol, but does not make the API public.
(cherry picked from commit db5af7da092409030c9fbe0a3a986bd0ee441b8b)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit e85e8deaf3220c8d12b69294e45645aaf20187b9)
Co-authored-by: Dobatymo <Dobatymo@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-118854) (#118871)
(cherry picked from commit 68fbc00dc870f6a8dcbecd2ec19298e21015867f)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118808) (#118866)
Some embedders and extensions include parts of the internal API. The
pycore_mimalloc.h file is transitively include by a number of other
internal headers. This avoids include errors for code that was
already including those headers.
(cherry picked from commit 71cc0651e79041abd648595f3030dfa41009137a)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118723) (#118863)
The `list_preallocate_exact` function did not zero initialize array
contents. In the free-threaded build, this could expose uninitialized
memory to concurrent readers between the call to
`list_preallocate_exact` and the filling of the array contents with
items.
(cherry picked from commit 2402715e10d00ef60fad2948d8461559d084eb36)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|