Commit graph

116267 commits

Author SHA1 Message Date
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
Miss Islington (bot)
25af45d9a4
[3.11] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022) (#114029)
[3.12] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022)
(cherry picked from commit 94b1d1fa38)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2024-01-13 17:44:58 +00:00
Miss Islington (bot)
d7a544ad3b
[3.11] gh-89159: Document missing TarInfo members (GH-91564) (#114007)
gh-89159: Document missing TarInfo members (GH-91564)
(cherry picked from commit 3aa4b839e4)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2024-01-12 23:26:03 +00:00
Miss Islington (bot)
cd8fd2292e
[3.11] datamodel: Fix a typo in `object.__init_subclass__` (GH-111599) (#114005)
datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599)
(cherry picked from commit a47353d587)

Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2024-01-12 23:06:14 +00:00
Miss Islington (bot)
2d184b26df
[3.11] Link to the glossary for "magic methods" in `MagicMock` (GH-111292) (#114003)
Link to the glossary for "magic methods" in ``MagicMock`` (GH-111292)

The MagicMock documentation mentions magic methods several times without
actually pointing to the term in the glossary. This can be helpful for
people to fully understand what those magic methods are.
(cherry picked from commit e97da8677f)

Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
2024-01-12 23:01:09 +00: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)
e276743682
[3.11] Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039) (#114000)
Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039)
(cherry picked from commit 32f3684b8f)

Co-authored-by: Andrew Zipperer <47086307+zipperer@users.noreply.github.com>
2024-01-12 22:48:32 +00:00
Miss Islington (bot)
f8dd29030d
[3.11] Docs: Amend codeobject.co_lines docs; end number is exclusive (GH-113970) (#113988)
The end number should be exclusive, not inclusive.
(cherry picked from commit e68806c712)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-01-12 15:10:33 +00:00
Miss Islington (bot)
64d8f39a12
[3.11] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-113832)
Determine the support of the Kyiv timezone by checking the result of
astimezone() which uses the system tz database and not the one
populated by zoneinfo.
(cherry picked from commit 931d7e052e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-12 11:59:23 +00: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
Miss Islington (bot)
535b1dedb3
[3.11] GH-107678: Improve Unicode handling clarity in `library/re.rst` (GH-107679) (#113966)
GH-107678: Improve Unicode handling clarity in ``library/re.rst`` (GH-107679)
(cherry picked from commit c9b8a22f34)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-12 00:02:35 +00:00
Adam Turner
71288ed8b0
[3.11] GH-92584: Move installation schemes overview to sysconfig docs (GH-108018) (#110214)
* Add new installation path functions subsection

* Add content from install/index to sysconfig

* Fix table

* Update note about installers

* Clean up the list of schemes, remove references to Distutils.
(cherry picked from commit f16e81f368)
2024-01-11 23:48:10 +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)
6e21c590f6
[3.11] gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894) (#113923)
gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894)
(cherry picked from commit 901a971e16)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2024-01-10 18:32:52 +01: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)
50efd7db20
[3.11] gh-113842: Add missing error check for PyIter_Next() in Python/symtable.c (GH-113843) (GH-113852)
(cherry picked from commit fda901a1ff)

Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
2024-01-09 11:09:32 +00:00
Hugo van Kemenade
f20c69299e
[3.11] gh-101100: Fix Sphinx warnings for 2.6 port-specific deprecations (GH-113752) (#113847) 2024-01-09 11:58:59 +02:00
Miss Islington (bot)
3958c7d712
[3.11] Docs: Link tokens in the format string grammars (GH-108184) (#113840)
Docs: Link tokens in the format string grammars (GH-108184)
(cherry picked from commit f3d5d4aa8f)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-09 02:53:59 +00:00
Miss Islington (bot)
73573352fc
[3.11] gh-74678: Increase base64 test coverage (GH-21913) (GH-113810)
Ensure the character y is disallowed within an Ascii85 5-tuple.

(cherry picked from commit 802d4954f1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Lee Cannon <leecannon@leecannon.xyz>
2024-01-08 11:16:06 +00: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
Miss Islington (bot)
6aa86bdcb2
[3.11] gh-113360: Fix the documentation of module's attribute __test__ (GH-113393) (GH-113761)
It can only be a dict since Python 2.4.
(cherry picked from commit d99d871225)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-05 22:29:14 +00:00
Miss Islington (bot)
9dd73ccbb0
[3.11] gh-101100: Fix Sphinx warnings in library/pyclbr.rst (GH-113739) (#113749)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-05 21:36:58 +02: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)
2a4a724cdf
[3.11] gh-101100: Fix Sphinx warnings for 2.6 deprecations and removals (GH-113725) (#113735)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-05 16:02:07 +02:00
Miss Islington (bot)
99b4f1c3d5
[3.11] gh-113696: Docs: Annotate PyObject_CallOneArg and PyObject_CallNoArgs as returning a strong reference (GH-113697) (#113699)
(cherry picked from commit 1ae7ceba29)

Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
2024-01-05 01:17:31 +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
Alex Waygood
c828dbc196
[3.11] Document the co_lines method on code objects (#113682) (#113687)
(cherry-picked from commit f1f8392432)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 19:59:10 +00:00
Miss Islington (bot)
3a9bf03ac9
[3.11] functools.partial docs: Use the more common spelling for "referenceable" (GH-113675) (#113678)
`functools.partial` docs: Use the more common spelling for "referenceable" (GH-113675)
(cherry picked from commit 4de468cce1)

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-01-03 13:19:49 +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)
93e9381e1c
[3.11] gh-113628: Fix test_site test with long stdlib paths (GH-113640) (#113672)
gh-113628: Fix test_site test with long stdlib paths (GH-113640)
(cherry picked from commit 5dc79e3d7f)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2024-01-03 01:02:14 +00: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
Donghee Na
9beb56594d
[3.11] Use the official term "free-threading" for GitHub Action (g… (#113647) 2024-01-02 15:04:11 +02:00
Hugo van Kemenade
035b6eb987
[3.11] gh-101100: Fix Sphinx warnings from removed ~! references (GH-113629) (#113642)
(cherry picked from commit 7595380347)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-02 13:00:06 +00:00
Miss Islington (bot)
f8b61c739b
[3.11] gh-81094: Refer to PEP 318 in compound_statements.rst (GH-113588) (#113644)
Co-authored-by: John D. McDonald <43117960+Rasputin2@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-02 08:45:51 +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
Miss Islington (bot)
02912125b4
[3.11] Update ConfigParser docs defining valid section name (GH-110506) (#113590)
Co-authored-by: Delgan <4193924+Delgan@users.noreply.github.com>
2023-12-30 23:24:39 +00:00
Miss Islington (bot)
206dc9a82e
[3.11] gh-89414: Document that SIGCLD is not available on macOS (GH-113580) (#113586)
gh-89414: Document that SIGCLD is not available on macOS (GH-113580)

Document that SIGCLD is not available on macOS
(cherry picked from commit f48a1bcb29)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-30 18:10:11 +01: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)
2025d9fba2
[3.11] Doc/library/os.rst: os.waitid absent on MacOS (GH-104558) (#113554)
Doc/library/os.rst: `os.waitid` absent on MacOS (GH-104558)

* Doc/library/os.rst: `os.waitid` absent on MacOS

(cherry picked from commit db1c882239)

Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2023-12-29 09:27:19 +01:00