Commit Graph

27129 Commits

Author SHA1 Message Date
Miss Islington (bot) 0e92265875
[3.11] gh-114077: Fix OverflowError in socket.sendfile() when pass count >2GiB (GH-114079) (GH-114111)
(cherry picked from commit d4dfad2aa9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-16 13:53:26 +02:00
Hugo van Kemenade 3a181a10b1
[3.11] gh-101100: Fix Sphinx warnings in `howto/urllib2.rst` and `library/http.client.rst` (GH-114060) (#114064)
(cherry picked from commit c2808431b3)
2024-01-14 21:14:11 +00:00
Miss Islington (bot) 6fa6a61805
[3.11] gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (GH-113567) (#114019)
gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (GH-113567)

Increase the backlog for multiprocessing.connection.Listener` objects created
 by `multiprocessing.manager` and `multiprocessing.resource_sharer` to
 significantly reduce the risk of getting a connection refused error when creating
 a `multiprocessing.connection.Connection` to them.
(cherry picked from commit c7d59bd8cf)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-14 16:29:30 +01:00
Alois Klink 0d12a64eaf
[3.11] gh-95649: Document that asyncio contains uvloop code (GH-107536) (#114045)
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.

[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0

(cherry picked from commit dce30c9cbc)
2024-01-14 02:14:51 +00:00
Mark Dickinson 41edd37160
[3.11] gh-114014: Update `fractions.Fraction()`'s rational parsing regex (GH-114015) (#114025)
Fix a bug in the regex used for parsing a string input to the `fractions.Fraction` constructor. That bug led to an inconsistent exception message being given for some inputs.

---------

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-13 13:22:31 -05:00
Hugo van Kemenade 4bd4367a97
[3.11] gh-101100: Fix Sphinx Lint warnings in `Misc/` (GH-113946) (#114001) 2024-01-12 15:58:26 -07:00
Miss Islington (bot) 96eff8c150
[3.11] gh-113903: Fix an IDLE configdialog test (GH-113973) (#113975)
test_configdialog.HighPageTest.test_highlight_target_text_mouse fails
if a line of the Highlight tab text sample is not visible. If so, bbox()
in click_char() returns None and the unpacking iteration fails.

This occurred on a Devuan Linux system. Fix by moving the
'see character' call inside click_char, just before the bbox call.

Also, reduce the click_char calls to just one per tag name and
replace the other nested function with a dict comprehension.
(cherry picked from commit c4992f4106)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-12 03:23:52 +00:00
Steve Dower 186c021688
gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 23:04:36 +00:00
Miss Islington (bot) d15e1ac828
gh-87868: Sort and remove duplicates in getenvironment() (GH-102731)
(cherry picked from commit c31be58da8)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-01-11 22:27:12 +00:00
Miss Islington (bot) a956e510f6
[3.11] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) (GH-113913)
Raise BadZipFile when try to read an entry that overlaps with other entry or
central directory.
(cherry picked from commit 66363b9a7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-11 11:24:47 +02:00
Miss Islington (bot) 435e891b32
[3.11] gh-113594: Fix UnicodeEncodeError in TokenList.fold() (GH-113730) (GH-113908)
It occurred when try to re-encode an unknown-8bit part combined with non-unknown-8bit part.
(cherry picked from commit e9d5b6ea2d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 13:24:17 +00:00
Serhiy Storchaka c92a473a71
[3.11] gh-113664: Improve style of Big O notation (GH-113695) (GH-113910)
Use cursive to make it looking like mathematic formulas.
(cherry picked from commit a8629816c6)
2024-01-10 13:13:27 +00:00
Miss Islington (bot) b4a6bbdd7d
[3.11] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900) (GH-113902)
winfo_id() converts the result of "winfo id" command to integer, but
"winfo pathname" command requires an argument to be a hexadecimal number
on Win64.
(cherry picked from commit 1b7e0024a1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 10:50:51 +00:00
Miss Islington (bot) 86b004358e
[3.11] gh-113781: Silence AttributeError in warning module during Python finalization (GH-113813) (GH-113874)
The tracemalloc module can already be cleared.
(cherry picked from commit 0297418cac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-09 22:41:02 +02:00
Miss Islington (bot) 4db8d3be49
[3.11] gh-80109: Fix io.TextIOWrapper dropping the internal buffer during write() (GH-22535) (GH-113809)
io.TextIOWrapper was dropping the internal decoding buffer
during read() and write() calls.
(cherry picked from commit 73c9326563)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2024-01-08 10:47:50 +00:00
Miss Islington (bot) 320c160b1a
[3.11] gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and 3.11.7 (GH-113731) (#113766)
(cherry picked from commit 66f3964815)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-06 01:45:41 -05:00
Miss Islington (bot) 9cea771261
[3.11] gh-85567: Fix resouce warnings in pickle and pickletools CLIs (GH-113618) (GH-113759)
Explicitly open and close files instead of using FileType.
(cherry picked from commit bd754b93ca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-05 22:29:31 +00:00
Erlend E. Aasland 1687e85343
[3.11] gh-80532: Do not set ipv6type when cross-compiling (GH-17956) (#113741)
(cherry picked from commit 5e1916ba1b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Xavier de Gaye <xdegaye@gmail.com>
2024-01-05 16:04:25 +00:00
Diego Russo 5da53d3024
[3.11] gh-110190: Fix ctypes structs with array on PPCLE64 (GH-112959) (#113167)
Fix the same issue of PR #112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.

(cherry picked from commit 6644ca45cd)
Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310
2024-01-05 16:38:20 +01:00
Miss Islington (bot) 456e2ecdd2
[3.11] gh-113538: Don't error in stream reader protocol callback when task is cancelled (GH-113690) (#113714)
(cherry picked from commit 4681a5271a)

Co-authored-by: Guido van Rossum <guido@python.org>
2024-01-04 20:39:52 +00:00
Ege Akman d4a28ec89c
[3.11] gh-113637: Let c_annotations.py to handle the spacing of Limited/Unstable API & Stable ABI translation strings (#113638) (#113679) 2024-01-03 15:05:54 +02:00
Miss Islington (bot) 1c381ec4ed
[3.11] gh-113602: Bail out when the parser tries to override existing errors (GH-113607) (#113653)
gh-113602: Bail out when the parser tries to override existing errors (GH-113607)
(cherry picked from commit 9ed36d533a)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-01-02 13:22:39 +00:00
Serhiy Storchaka 36153494f1
[3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113624)
The length field of StgDictObject for Structure class contains now
the total number of items in ffi_type_pointer.elements (excluding
the trailing null).

The old behavior of using the number of elements in the parent class can
cause the array to be truncated when it is copied, especially when there
are multiple layers of subclassing.

(cherry picked from commit 5f3cc90a12)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
2024-01-01 16:46:07 +00:00
Hugo van Kemenade 5169113379
[3.11] gh-101100: Fix Sphinx warnings in `library/configparser.rst` (GH-113598) (#113600)
(cherry picked from commit 30a6d79fb8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-31 18:18:49 +00:00
Guido van Rossum 8938495120
[3.11] gh-113566: Fix asyncio segfault during interpreter finalization (#113578) 2023-12-29 21:06:32 -08:00
Miss Islington (bot) ced2d35523
[3.11] gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544) (#113550)
gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544)
(cherry picked from commit fba324154e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-29 09:57:21 +01:00
Miss Islington (bot) 656eb16707
[3.11] bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (GH-19856) (GH-113541)
Always include <sys/types.h> before <sys/sysmacros.h>.

(cherry picked from commit f108468970)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-28 11:02:23 +00:00
Miss Islington (bot) 54927cd21a
[3.11] bpo-26791: Update shutil.move() to provide the same symlink move behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759) (GH-113518)
(cherry picked from commit c66b577d9f)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
2023-12-27 19:03:45 +02:00
Miss Islington (bot) a1f0118a26
[3.11] gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593) (GH-113515)
(cherry picked from commit 712afab5ac)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 14:43:59 +00:00
Serhiy Storchaka f1951900f1
[3.11] bpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408) (GH-113499)
Previously some error messages complained about incompatible
combinations of directives that are not contained in the format string.

(cherry picked from commit 4b2c3e8e43)

Co-authored-by: Gordon P. Hemsley <me@gphemsley.org>
2023-12-26 20:09:41 +00:00
Ronald Oussoren 0eea5c04b8
[3.11] gh-101778: Fix build error when there's a dangling symlink in the directory containing "ffi.h" (#113466)
gh-101778: Fix build error when there's a dangling symlink in the directory containing "ffi.h"
2023-12-26 10:05:48 +01:00
Serhiy Storchaka 4b358d754c
[3.11] gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. (GH-113035) (GH-113472) (GH-113476)
(cherry picked from commit 48c49739f5)
(cherry picked from commit d58a5f453f)

Co-authored-by: Yilei Yang <yileiyang@google.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-12-25 20:40:33 +00:00
Miss Islington (bot) 1cc594d571
[3.11] bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) (GH-112598)
* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
(cherry picked from commit 0daf555c6f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-12-25 20:55:27 +02:00
Miss Islington (bot) d04ca4ccd7
[3.11] gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423) (GH-113451)
(cherry picked from commit ce77ee5035)

Co-authored-by: Xu Song <xusong.vip@gmail.com>
2023-12-24 10:22:34 +00:00
Miss Islington (bot) 336d445934
[3.11] gh-113028: Correctly memoize str in pickle when escapes added (GH-113436) (GH-113449)
This fixes a divergence between the Python and C implementations of pickle
for protocol 0, such that it pickle.py fails to re-use the first pickled
representation of strings involving characters that have to be escaped.
(cherry picked from commit 08398631a0)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
2023-12-24 10:01:53 +00:00
Miss Islington (bot) b60bddbde2
[3.11] gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (GH-113040) (#113444)
gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (GH-113040)
(cherry picked from commit 050783cb37)

Co-authored-by: Yilei Yang <yileiyang@google.com>
2023-12-23 18:09:46 -08:00
Miss Islington (bot) 478da38e74
[3.11] gh-74573: document that ndbm can silently corrupt databases on macOS (GH-113354) (#113432)
gh-74573: document that ndbm can silently corrupt databases on macOS (GH-113354)

* gh-74573: document that ndbm can silently corrupt databases on macOS

The system ndbm implementation on macOS has an undocumented limitation
on the size of values and can silently corrupt database files when those
are exceeded.

(cherry picked from commit 593b4d81d2)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-23 13:49:58 +01:00
Miss Islington (bot) 80b2bad2c2
[3.11] gh-113188: Fix shutil.copymode() and shutil.copystat() on Windows (GH-113285) (GH-113426)
Previously they worked differenly if dst is a symbolic link:
they modified the permission bits of dst itself rather than the file
it points to if follow_symlinks is true or src is not a symbolic link,
and did nothing if follow_symlinks is false and src is a symbolic link.
(cherry picked from commit c7874bb56f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-23 12:53:48 +02:00
Miss Islington (bot) 706b40e892
[3.11] gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) (#113361)
gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352)

* gh-65701: document that freeze doesn't work with framework builds on macOS

The framework install is inherently incompatible with freeze. Document
that that freeze doesn't work with framework builds and bail out
early when trying to run freeze anyway.

(cherry picked from commit df1eec3dae)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-22 11:16:59 +01:00
Miss Islington (bot) 90593e6fa1
[3.11] gh-112305: Fix check-clean-src to detect frozen_modules .h files. (GH-113344) (#113347)
gh-112305: Fix check-clean-src to detect frozen_modules .h files. (GH-113344)

A typo left this check broken so many of us who do out-of-tree builds
were seeing strange failures due to bad `Python/frozen_modules/*.h`
files being picked up from the source tree and used at build time from
different Python versions leading to errors like:

`Fatal Python error: _PyImport_InitCore: failed to initialize importlib`

Or similar once our build got to an "invoke the interpreter"
bootstrapping step due to incorrect bytecode being embedded.
(cherry picked from commit 103c4ea274)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-12-21 07:47:20 +00:00
Miss Islington (bot) 9cbe4738bc
[3.11] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (GH-113334) (#113340)
When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.

This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).

(cherry picked from commit 1ff0238594)

Co-authored-by: Martijn Pieters <mj@zopatista.com>
2023-12-20 16:51:51 -08:00
Miss Islington (bot) 5e0d9aea99
[3.11] gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942) (#113265)
gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942)

Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
(cherry picked from commit 893c9ccf48)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-19 19:57:08 +01:00
Hugo van Kemenade 182676beba
[3.11] gh-101100: Fix Sphinx warnings in `library/ast.rst` (GH-113289) (#113291) 2023-12-19 18:12:33 +02:00
Miss Islington (bot) 1dd2ad6f8e
[3.11] gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271) (#113273)
gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271)

Hangs on installed 3.13.0a2 on macOS Catalina.
Behavior on installed 3.12.1 and 3.11.7 is unknown.
(cherry picked from commit fa9ba02353)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-19 05:42:59 +00:00
Miss Islington (bot) 44bdb6d55c
[3.11] gh-113199: Make read1() and readline() of HTTPResponse close IO after reading all data (GH-113200) (GH-113260)
(cherry picked from commit 41336a72b9)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2023-12-18 20:34:15 +00:00
Stéphane Bidoul 2cd3564738
[3.11] gh-113246: Updated bundled pip to 23.3.2 (gh-113249) (#113254)
Updated bundled pip to 23.3.2.
(cherry picked from commit 4a24bf9a13)
2023-12-18 11:34:58 +00:00
Miss Islington (bot) a7a176de07
[3.11] gh-110746: Improve markup in ``tkinter.ttk.rst`` (GH-111236) (#113194)
gh-110746: Improve markup in ``tkinter.ttk.rst`` (GH-111236)

* gh-110746: Improve markup in tkinter.ttk.rst

* gh-110746: Improve markup in tkinter.ttk.rst

* 📜🤖 Added by blurb_it.

---------

(cherry picked from commit 00d2b6d1fc)

Co-authored-by: Akshat Khandelwal <35228810+akshatgokul@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-12-15 22:56:36 +01:00
Miss Islington (bot) 220fae7706
[3.11] gh-113009: Fix multiprocessing Process.terminate() on Windows (GH-113128) (#113178)
gh-113009: Fix multiprocessing Process.terminate() on Windows (GH-113128)

On Windows, Process.terminate() no longer sets the returncode
attribute to always call WaitForSingleObject() in Process.wait().
Previously, sometimes the process was still running after
TerminateProcess() even if GetExitCodeProcess() is not STILL_ACTIVE.
(cherry picked from commit 4026ad5b2c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-15 15:20:18 +00:00
Miss Islington (bot) 6ff7c1311f
[3.11] gh-61648: Detect line numbers of properties in doctests (GH-113161) (GH-113165)
(cherry picked from commit 8f8f0f97e1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-15 13:38:45 +00:00
Serhiy Storchaka d4234937a1
[3.11] gh-112716: Fix SystemError when __builtins__ is not a dict (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 1161c14e8c)
2023-12-14 12:59:33 +00:00