summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.13] gh-119443: Turn off from __future__ import annotations in REPL ↵Miss Islington (bot)2024-05-291-0/+2
| | | | | | | | (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>
* [3.13] gh-117398: Statically Allocate the Datetime C-API (GH-119472) (gh-119641)Eric Snow2024-05-281-0/+3
| | | | | | | 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)
* [3.13] gh-119118: Fix performance regression in tokenize module (GH-119615) ↵Miss Islington (bot)2024-05-281-0/+2
| | | | | | | | | | | | | (#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>
* [3.13] gh-119011: `type.__type_params__` now return an empty tuple ↵Miss Islington (bot)2024-05-281-0/+2
| | | | | | | (GH-119296) (#119678) (cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.13] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) ↵Jelle Zijlstra2024-05-282-0/+4
| | | | | | | | (#119643) Fixes #119311. Fixes #119395. (cherry picked from commit a9a74da4a0ca0645f049e67b6434a95e30592c32)
* [3.13] gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-119561) ↵Miss Islington (bot)2024-05-271-0/+3
| | | | | | | | | (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>
* [3.13] Fix typos in HISTORY documentation (GH-119453) (#119597)Miss Islington (bot)2024-05-272-35/+36
| | | | Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.13] gh-111999: Fix the signature of str.format_map() (GH-119540) (#119543)Miss Islington (bot)2024-05-251-0/+1
| | | | | (cherry picked from commit 08e65430aafa1047029e6f132a5f748c415bda14) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-118263: Add additional arguments to path_t (Argument Clinic type) in ↵Miss Islington (bot)2024-05-241-0/+1
| | | | | | | posixmodule (GH-118355) (cherry picked from commit 96b392df303b2cfaea823afcb462c0b455704ce8) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* [3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (#119504)Miss Islington (bot)2024-05-241-0/+3
| | | | | | | | | 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>
* [3.13] gh-118692: Avoid creating unnecessary StopIteration instances for ↵Miss Islington (bot)2024-05-241-0/+1
| | | | | | | | | | 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>
* [3.13] GH-117195: Avoid assertion error in `object.__sizeof__` (GH-117220) ↵Miss Islington (bot)2024-05-231-0/+2
| | | | (GH-119456)
* [3.13] Fix typos in what's new documentation (GH-119448) (#119449)Miss Islington (bot)2024-05-236-9/+9
|
* [3.13] gh-118911: Trailing whitespace in a block shouldn't prevent the user ↵Lysandros Nikolaou2024-05-231-0/+5
| | | | | | | | 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>
* [3.13] gh-113978: Ignore warnings on text completion inside REPL (GH-113979) ↵Miss Islington (bot)2024-05-221-0/+1
| | | | | | | (#119429) (cherry picked from commit e03dde5a24d3953e0b16f7cdefdc8b00aa9d9e11) Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
* gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257)Miss Islington (bot)2024-05-221-0/+1
| | | | | | 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>
* [3.13] gh-119247: Add macros to use PySequence_Fast safely in free-threaded ↵Miss Islington (bot)2024-05-221-0/+4
| | | | | | | | | | | 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>
* [3.13] gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across ↵Miss Islington (bot)2024-05-221-0/+3
| | | | | | | | | | | | | 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>
* [3.13] gh-111201: Remove readline dependency from the PyREPL (GH-119262) ↵Lysandros Nikolaou2024-05-221-0/+1
| | | | | (#119403) (cherry picked from commit 561ff1fa710493dee8c6482f990bd17535b27040)
* [3.13] gh-118643: Fix AttributeError in the email module (GH-119099) (GH-119389)Miss Islington (bot)2024-05-221-0/+2
| | | | | | | | | | 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>
* [3.13] Fix typos in NEWS entries for 3.13 (GH-119374) (GH-119385)Miss Islington (bot)2024-05-222-17/+17
| | | | | (cherry picked from commit 904e256292a0ed6c36f3490da9e4f8245370f535) Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* gh-118507 : Refactor `nt._path_is*` to improve applicability for other cases ↵Miss Islington (bot)2024-05-221-0/+1
| | | | | | | (GH-118755) (cherry picked from commit b64182550f73e556344bd754d32e3be5d22a74e1) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* [3.13] Fix typos in documentation (GH-119295) (#119337)Miss Islington (bot)2024-05-217-9/+9
| | | | Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.13] Docs: Ensure no warnings are found in the NEWS file before a given ↵Hugo van Kemenade2024-05-212-3/+3
| | | | line number (GH-119221) (#119261)
* [3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) ↵Miss Islington (bot)2024-05-211-0/+3
| | | | | | | | | | | 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>
* [3.13] gh-119050: Add XML support to libregrtest refleak checker (GH-119148) ↵Miss Islington (bot)2024-05-201-0/+2
| | | | | | | | | | | | | | | | (#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>
* [3.13] gh-118760: Restore the default value of tkinter.wantobjects to 1 ↵Miss Islington (bot)2024-05-202-7/+8
| | | | | | | | (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>
* [3.13] gh-92081: Fix for email.generator.Generator with whitespace between ↵Miss Islington (bot)2024-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [3.13] gh-115119: Fall back to bundled libmpdec if system libmpdec is not ↵Miss Islington (bot)2024-05-201-0/+1
| | | | | | | found (GH-119196) (#119217) (cherry picked from commit 642b25b9a82c368b045709f0b94e7d5a02400ed2) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.13] gh-119121: Fix and test `async.staggered.staggered_race` (GH-119173) ↵Miss Islington (bot)2024-05-201-0/+2
| | | | | | | | (#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>
* [3.13] GH-119113: Raise `TypeError` from ↵Miss Islington (bot)2024-05-191-0/+2
| | | | | | | | `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>
* [3.13] GH-118447: Fix handling of unreadable symlinks in ↵Miss Islington (bot)2024-05-181-0/+2
| | | | | | | | `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>
* [3.13] gh-119132: Update sys.version to identify free-threaded or not. ↵Miss Islington (bot)2024-05-181-0/+2
| | | | | | | | (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>
* [3.13] gh-119049: Fix incorrect display of warning which is constructed by C ↵Miss Islington (bot)2024-05-171-0/+2
| | | | | | | | | 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>
* [3.13] Fix typos in documentation (GH-119092) (#119116)Miss Islington (bot)2024-05-1710-15/+15
| | | | | | | 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>
* [3.13] GH-118943: Fix a race condition when generating jit_stencils.h ↵Miss Islington (bot)2024-05-161-0/+3
| | | | | (GH-119101) (cherry picked from commit 4702b7b5bdc07d046576b4126cf4e4f5f7145abb)
* [3.13] gh-118760: Fix errors in calling Tkinter bindings on Windows ↵Miss Islington (bot)2024-05-151-0/+1
| | | | | | | | | (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>
* [3.13] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path ↵Miss Islington (bot)2024-05-141-0/+2
| | | | | | | starting with multiple slashes and no authority (GH-113563) (GH-119023) (cherry picked from commit e237b25a4fa5626fcd1b1848aa03f725f892e40e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] GH-118836: Fix JIT build error when SHT_NOTE section is present ↵Miss Islington (bot)2024-05-131-0/+2
| | | | | | | (GH-119020) (cherry picked from commit e04cd964eb4eee1b0ae5b2c34727abce6c0fb7f0) Co-authored-by: Michał Górny <mgorny@gentoo.org>
* [3.13] gh-58933: Make pdb return to caller frame correctly when f_trace is ↵Miss Islington (bot)2024-05-131-0/+1
| | | | | | | | 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>
* [3.13] gh-87106: Fix inspect.signature.bind() handling of positional-only ↵Miss Islington (bot)2024-05-131-0/+3
| | | | | | | arguments with **kwargs (GH-103404) (#118985) (cherry picked from commit 9c1520244151f36e010c1b04bedf14747a28517d) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* [3.13] GH-118844: Fix build failures when combining --disable-gil with ↵Miss Islington (bot)2024-05-131-0/+1
| | | | | | | --enable-experimental-jit (GH-118959) (cherry picked from commit 5b941e57c71d7d0ab983d81a169f892662cfe446) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* [3.13] gh-118921: Add `copy()` method for `FrameLocalsProxy` (GH-118923) ↵Miss Islington (bot)2024-05-101-0/+1
| | | | | | | (#118933) (cherry picked from commit 35c436186b849f8f2f9fb866c59015c9d034d448) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.13] gh-118895: Call PyType_Ready() on typing.NoDefault (GH-118897) (#118914)Miss Islington (bot)2024-05-101-0/+2
| | | | | (cherry picked from commit 13d7cf997bc9c22cf67c42fd799413e8325e0039) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.13] gh-117657: Fix data races reported by TSAN on `interp->threads.main` ↵Miss Islington (bot)2024-05-101-0/+1
| | | | | | | | (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>
* [3.13] gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797) (GH-118903)Miss Islington (bot)2024-05-101-0/+2
| | | | | | | | | | | | | | | 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>
* gh-118209: Add Windows structured exception handling to mmap module (GH-118213)Miss Islington (bot)2024-05-101-0/+2
| | | | | (cherry picked from commit e85e8deaf3220c8d12b69294e45645aaf20187b9) Co-authored-by: Dobatymo <Dobatymo@users.noreply.github.com>
* [3.13] gh-118851: Default ctx arguments to AST constructors to Load() ↵Miss Islington (bot)2024-05-091-0/+2
| | | | | | | | (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>
* [3.13] gh-116984: Make mimalloc header includes relative to the current file ↵Miss Islington (bot)2024-05-091-0/+3
| | | | | | | | | | | (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>
* [3.13] gh-118561: Fix crash involving list.extend in free-threaded build ↵Miss Islington (bot)2024-05-091-0/+2
| | | | | | | | | | | | (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>