Commit graph

119753 commits

Author SHA1 Message Date
Miss Islington (bot)
e57fbe3d2d
[3.12] gh-63143: Fix parsing mutually exclusive arguments in argparse (GH-124307) (GH-124419)
Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd17b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-24 07:42:34 +00:00
Miss Islington (bot)
1366fff609
[3.12] gh-124130: Increase test coverage for \b and \B in regular expressions (GH-124330) (GH-124414)
(cherry picked from commit b82f07653e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-24 06:56:45 +00:00
Miss Islington (bot)
d26d0a10b1
[3.12] Docs: Update two FAQs for Python 3 (GH-124247) (GH-124256)
(cherry picked from commit 5f01111594)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-24 09:42:00 +03:00
Alex Waygood
4b221bf878
[3.12] Bump Ruff to 0.6.7 (#124384) (#124391) 2024-09-23 23:09:27 +00:00
Miss Islington (bot)
db48e8f84d
[3.12] Doc: Add `make dist-no-html` (GH-124383) (#124388) 2024-09-23 23:19:18 +01:00
Miss Islington (bot)
7cc773ba3d
[3.12] GH-87041: Fix incorrect indentation in argparse help (GH-124230) (GH-124374)
In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

(cherry picked from commit 7ee9921734)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Co-authored-by: Pavel Ditenbir <pavel.ditenbir@gmail.com>
2024-09-23 20:16:45 +00:00
Adam Turner
62dcb8e013
[3.12] GH-109975: Copyedit 3.13 What's New: Copyedit C API deprecations pending removal (GH-124336) (#124365)
(cherry picked from commit e7d465a607)
2024-09-23 19:31:28 +00:00
Savannah Ostrowski
b3709562ad
[3.12] GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-123932) (GH-124356)
(cherry picked from commit 5f5c0b9c23)
2024-09-23 19:04:36 +00:00
Miss Islington (bot)
dd2066f274
[3.12] Replace the term Immutable with a Hashable in the sequence entry of the Glossary (GH-124350) (#124353)
Replace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossary (GH-124350)

The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable.
(cherry picked from commit 6203ef35dd)

Co-authored-by: decorator-factory <42166884+decorator-factory@users.noreply.github.com>
2024-09-23 16:41:01 +00:00
Miss Islington (bot)
533b06c118
[3.12] Fix doctrees directory for the gettext builder (GH-122997) (#124339)
Fix doctrees directory for the gettext builder (GH-122997)
(cherry picked from commit 315a933a5b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-23 14:37:10 +00:00
Miss Islington (bot)
d5aafe7713
[3.12] gh-124130: Notes on empty string corner case of category \B (GH-124133) (#124329)
gh-124130: Notes on empty string corner case of category `\B` (GH-124133)
(cherry picked from commit d3e79d75d1)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-23 07:05:24 +00:00
Terry Jan Reedy
7d505fecc9
[3.12] Backport idlelib typos (#124324)
See https://github.com/python/cpython/pull/123597.

(cherry picked from commit 1f4a49e)

Co-authored-by: abstractee
2024-09-22 21:57:36 -04:00
Miss Islington (bot)
cf39a5f22c
[3.12] gh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output. (GH-124310) (#124319)
gh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output. (GH-124310)

https://github.com/python/cpython/issues/88496 replaced text.update with text.update_idletasks in colorizer.py and outwin.py to fix test failures on macOS.  While theoretically correct, the result was Shell freezing when receiving continuous short strings to print.  Test: `while 1: 1`.

The guess is that there is no idle time in which to do the screen update.  Reverting the change in one of the files,
outwin, fixes the issue.  Colorizer runs ever 1/20 second and seems to work fine.

When running test-outwin on macOS, alias 'update'
to 'update_idletasks on the text used for testing.
(cherry picked from commit d5f95ec07b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-09-22 20:07:52 +00:00
Miss Islington (bot)
25312403de
[3.12] gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274) (GH-124276)
(cherry picked from commit baa3550bc3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-22 20:42:14 +03:00
Miss Islington (bot)
fcfe78664b
[3.12] gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block 3fff::/20 (GH-124240) (#124283)
gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (GH-124240)
(cherry picked from commit db6eb3640a)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
2024-09-20 14:20:27 +02:00
Miss Islington (bot)
8606a2e91c
[3.12] Fix typo in XMLParser doc (GH-124129) (#124281)
Fix typo in XMLParser doc (GH-124129)
(cherry picked from commit 622368d99c)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-09-20 10:51:12 +00:00
Miss Islington (bot)
6644cd2c1b
[3.12] gh-124248: Fix crash in struct when processing 0p fields (GH-124251) (#124278)
gh-124248: Fix crash in struct when processing 0p fields (GH-124251)
(cherry picked from commit 63f196090f)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2024-09-20 10:29:43 +00:00
Miss Islington (bot)
6c6b044304
[3.12] gh-81691: Fix handling of multiple "--" (double dashes) in argparse (GH-124233) (GH-124267)
Only the first one has now been removed, all subsequent ones are now
taken literally.
(cherry picked from commit aae126748f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-20 13:02:30 +03:00
Miss Islington (bot)
eca08d3687
[3.12] gh-124040: Adjust few tests in testHypot/testDist to get exactly computed results (GH-124042) (GH-124236)
(cherry picked from commit 4420cf4dc9)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-19 08:30:19 +00:00
Miss Islington (bot)
e9578f6424
[3.12] gh-123934: Fix MagicMock not to reset magic method return values (GH-124038) (#124232)
gh-123934: Fix `MagicMock` not to reset magic method return values (GH-124038)
(cherry picked from commit 7628f67d55)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-19 08:18:01 +00:00
Miss Islington (bot)
a82a2f1597
[3.12] gh-124083: Skip test_signal.test_strsignal() on NetBSD (GH-124084) (#124224)
gh-124083: Skip test_signal.test_strsignal() on NetBSD (GH-124084)

Skip test_strsignal() on NetBSD due to TypeError.
(cherry picked from commit 36682c0914)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-18 21:47:18 +00:00
Miss Islington (bot)
2216c52828
[3.12] Fix make htmllive target (GH-124222)
Allow `make -C Doc htmllive` to work without manual venv activation

Set PATH to ensure that `sphinx-autobuild` can find `sphinx-build`.

(cherry picked from commit 9a6e2336e4)

Authored-by: Zachary Ware <zach@python.org>
2024-09-18 16:12:17 -05:00
Miss Islington (bot)
1494d9563f
gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257)
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 c9073eb1a9)

Co-authored-by: Michael Vincent <377567+Vynce@users.noreply.github.com>
2024-09-18 15:16:29 +01:00
Miss Islington (bot)
708173c35e
[3.12] Revert "gh-123974: Fix time.get_clock_info() on NetBSD (GH-123975)" (GH-124115) (GH-124200)
This reverts commit b1d6f8a2ee.
(cherry picked from commit 79a7410236)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-18 06:47:17 +00:00
Miss Islington (bot)
5827be86fe
[3.12] gh-124194: Fix wrong issue number in What's New in Python 3.8 (GH-124195) (#124198)
gh-124194: Fix wrong issue number in What's New in Python 3.8 (GH-124195)
(cherry picked from commit d8c0fe1944)

Co-authored-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-18 00:58:10 +00:00
Sergey B Kirpichev
c7a94e77bc
[3.12] gh-123836: workaround fmod(x, y) bug on Windows (GH-124171) (#124186)
Buildbot failure on Windows 10 with MSC v.1916 64 bit (AMD64):
FAIL: testFmod (test.test_math.MathTests.testFmod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_math.py", line 605, in testFmod
    self.ftest('fmod(-10, 1)', math.fmod(-10, 1), -0.0)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_math.py", line 258, in ftest
    self.fail("{}: {}".format(name, failure))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: fmod(-10, 1): expected -0.0, got 0.0 (zero has wrong sign)

Here Windows loose sign of the result; if y is nonzero, the result
should have the same sign as x.

This amends commit 28aea5d07d.
(cherry picked from commit f4dd440210)
2024-09-17 21:44:52 +02:00
Miss Islington (bot)
6840b611de
[3.12] GH-103484: Fix broken links reported by linkcheck (GH-124169) (#124180)
GH-103484: Fix broken links reported by linkcheck (GH-124169)
(cherry picked from commit ab80c6b402)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-17 15:19:07 +00:00
Miss Islington (bot)
a032a96a92
[3.12] Use pep role instead of url (GH-121611) (#124173)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-17 13:08:38 +00:00
Miss Islington (bot)
c54ee87278
[3.12] gh-123836: Check zero signs in math_testcases.txt (GH-123854) (#124162)
gh-123836: Check zero signs in math_testcases.txt (GH-123854)

Just like cmath_testcases.txt. These tests require IEEE 754 anyway.

Correct zero sign for sqrt tests to match math.h convention.
(cherry picked from commit 28aea5d07d)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-17 08:39:44 +00:00
Miss Islington (bot)
92bc714033
[3.12] GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) (GH-124152)
Fix redirects reported by linkcheck, update docs conf.py checks.
(cherry picked from commit 0a32c6959c)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-16 20:53:46 -07:00
Miss Islington (bot)
2f9dc65e12
[3.12] GH-124108: Skip test_locale.test_strcoll_with_diacritic() on NetBSD (GH-124110) (#124147)
GH-124108: Skip test_locale.test_strcoll_with_diacritic() on NetBSD (GH-124110)

Skip test_strcoll_with_diacritic() and test_strxfrm_with_diacritic()
of test_locale on NetBSD due to lack of UTF-8 LC_COLLATE
support.
(cherry picked from commit 10de3600a9)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-16 23:28:51 +00:00
Miss Islington (bot)
446203e122
[3.12] gh-121023: Improve _xxtestfuzz/README.rst (GH-121024) (#124141)
gh-121023: Improve `_xxtestfuzz/README.rst` (GH-121024)
(cherry picked from commit a9c2bc1634)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2024-09-16 20:29:02 +00:00
Miss Islington (bot)
1151dd6c73
[3.12] GH-103484: Tell linkcheck to ignore debian manpage redirects (GH-123019) (#124136)
GH-103484: Tell linkcheck to ignore debian manpage redirects (GH-123019)
(cherry picked from commit 1054a755a3)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-16 18:49:14 +00:00
Miss Islington (bot)
f3c1f3d5ff
[3.12] Docs: Drop letter PDF (GH-123912) (#123999)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-16 16:08:02 +03:00
Miss Islington (bot)
3f5d18d351
[3.12] gh-94808: Add test coverage for "starred kind" in _PyPegen_set_expr_context (GH-119222) (GH-119264)
Add test coverage for "starred kind" in _PyPegen_set_expr_context
(cherry picked from commit 8231a24454)

Co-authored-by: Mark Jason Dominus (陶敏修) <mjd@pobox.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-16 10:43:31 +02:00
Miss Islington (bot)
ffde4cddc9
[3.12] gh-98442: fix locations of with statement's cleanup instructions (GH-120763) (#120787)
gh-98442: fix locations of with statement's cleanup instructions (GH-120763)
(cherry picked from commit 55596ae044)


gh-98442: fix location of with statement's cleanup instructions

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-09-15 19:14:19 +00:00
Miss Islington (bot)
b2a7d718e3
[3.12] gh-123974: Fix time.get_clock_info() on NetBSD (GH-123975) (#124073)
gh-123974: Fix time.get_clock_info() on NetBSD (GH-123975)

Fix OSError for thread_time clock on NetBSD by setting default resolution.
(cherry picked from commit b1d6f8a2ee)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-13 20:54:09 +00:00
Miss Islington (bot)
84e3f6078b
[3.12] gh-124030: Skip test_tcsendbreak on NetBSD for ENOTTY error (GH-124031) (GH-124062)
(cherry picked from commit 9f42b62db9)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-13 16:44:57 +00:00
Miss Islington (bot)
c5e11bec91
[3.12] Normalize cdecl formatting as found elsewhere on ctypes.rst (GH-121379) (#124057)
Co-authored-by: utkonos <utkonos@users.noreply.github.com>
2024-09-13 15:33:31 +00:00
Miss Islington (bot)
b6f4607351
[3.12] gh-123811: Test that round(Decimal) can return signed zero (GH-124007) (GH-124049)
(cherry picked from commit b46c65ed2b)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-13 13:09:26 +00:00
Victor Stinner
53af5b2dd2
[3.12] gh-123917: Fix crypt check in configure (#123952)
Use a global volatile variable and check if the function is not NULL
to use the variable. Otherwise, a compiler optimization can remove
the variable making the check useless.

Co-authored-by: Paul Smith <paul@mad-scientist.net>
2024-09-12 16:21:31 +02:00
Miss Islington (bot)
5c15b1a05a
[3.12] gh-118577: Clarify that inspect.BoundArguments prefers to put values in args (GH-119936) (GH-124004)
(cherry picked from commit 8e99495701)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-09-12 14:14:42 +02:00
Miss Islington (bot)
9e93556f0a
[3.12] gh-123935: Fix typo in _get_slots in dataclasses.py (GH-123941) (#123992)
gh-123935: Fix typo in `_get_slots` in `dataclasses.py` (GH-123941)
(cherry picked from commit ac918ccad7)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-12 07:48:01 +00:00
Miss Islington (bot)
cbfeb6a7fe
[3.12] gh-123919: Fix null handling in _freeze_module.c (GH-123920) (#123949)
gh-123919: Fix null handling in `_freeze_module.c` (GH-123920)
(cherry picked from commit c8d1dbef5b)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-11 13:56:00 +00:00
Miss Islington (bot)
8ca75eecb0
[3.12] gh-123811: test that round() can return signed zero (GH-123829) (#123939)
gh-123811: test that round() can return signed zero (GH-123829)
(cherry picked from commit d2b9b6f919)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-09-11 12:26:35 +00:00
Sergey B Kirpichev
ec119dc984
[3.12] gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071) (#123841)
* [3.12] gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071)
(cherry picked from commit 8ef8354ef1)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-11 14:06:40 +02:00
Serhiy Storchaka
90e5bd7ed2
[3.12] gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898) (GH-123937)
Now a memoryview object can only be cleared if there are no buffers
that refer it.
(cherry picked from commit a1dbf2ea69)
2024-09-11 09:32:39 +00:00
Miss Islington (bot)
c6ae90a63c
[3.12] gh-123905: Update TOML description to include version number (GH-123906) (#123907) 2024-09-10 23:28:36 -07:00
Miss Islington (bot)
41608f1760
gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918)
(cherry picked from commit 00ffdf2736)

Co-authored-by: adang1345 <adang1345@gmail.com>
2024-09-10 20:12:41 +00:00
Miss Islington (bot)
de20ad9683
[3.12] gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886) (#123891)
gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886)
(cherry picked from commit b52de7e02d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-10 06:27:50 -07:00