]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Mon, 27 Nov 2023 18:57:34 +0000 (19:57 +0100)]
[3.12] gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409) (#112468)
gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409)
(cherry picked from commit
45d648597b1146431bf3d91041e60d7f040e70bf )
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Mon, 27 Nov 2023 18:42:48 +0000 (19:42 +0100)]
[3.12] bpo-41422: Visit the Pickler's and Unpickler's memo in tp_traverse (GH-21664) (GH-112464)
(cherry picked from commit
967f2a3052c2d22e31564b428a9aa8cc63dc2a9f )
Co-authored-by: kale-smoothie <34165060+kale-smoothie@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 27 Nov 2023 17:57:30 +0000 (18:57 +0100)]
[3.12] gh-112438: Fix support of format units with the "e" prefix in nested tuples in PyArg_Parse (gh-112439) (GH-112460)
(cherry picked from commit
4eea1e82369fbf7a795d1956e7a8212a1b58009f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 27 Nov 2023 17:30:53 +0000 (18:30 +0100)]
[3.12] gh-84443: SSLSocket.recv_into() now support buffer protocol with itemsize != 1 (GH-20310) (GH-112458)
It is also no longer use __len__().
(cherry picked from commit
812360fddda86d7aff5823f529ab720f57ddc411 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 27 Nov 2023 15:04:18 +0000 (16:04 +0100)]
[3.12] GH-101100: Fix reference warnings for ``socket`` methods (GH-110114) (#112455)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 27 Nov 2023 12:02:16 +0000 (13:02 +0100)]
[3.12] Move What's New In Python 3.12 entries to the right section (GH-112447) (#112450)
Move What's New In Python 3.12 entries to the right section (GH-112447)
Jython and ctypes removals are unrelated to C API Removals.
(cherry picked from commit
d44ee42cd7c9a40e1d7096b95476fe47156f571f )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 27 Nov 2023 09:34:19 +0000 (10:34 +0100)]
[3.12] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112444)
Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442)
(cherry picked from commit
fb79e1ed4a985a487a02bb8585cc1bd2933dfa7c )
Co-authored-by: Tom Levy <tomlevy93@gmail.com>
Miss Islington (bot) [Mon, 27 Nov 2023 08:53:57 +0000 (09:53 +0100)]
[3.12] gh-112414: Fix `AttributeError` when calling `repr()` on a namespace package imported with a custom loader (GH-112425) (#112440)
gh-112414: Fix `AttributeError` when calling `repr()` on a namespace package imported with a custom loader (GH-112425)
(cherry picked from commit
0622839cfedacbb48eba27180fd0f0586fe97771 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Mark Dickinson [Mon, 27 Nov 2023 08:25:06 +0000 (08:25 +0000)]
[3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct (GH-112424) (#112426)
* [3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (GH-112424)
Revert commit
c8c0afc7137ab9f22bf59d591084948ca967c97c (PR GH-94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`..
(cherry picked from commit
9fe60340d7e8dc22b3aec205c557bc69a1b2d18c )
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Remove unrelated test
Hugo van Kemenade [Sun, 26 Nov 2023 12:22:13 +0000 (14:22 +0200)]
[3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sat, 25 Nov 2023 22:26:31 +0000 (23:26 +0100)]
[3.12] gh-112331: Fix reference manual description of attribute lookup mechanics (gh-112375) (#112412)
Miss Islington (bot) [Sat, 25 Nov 2023 22:24:43 +0000 (23:24 +0100)]
[3.12] Descriptor HowTo: Sync the error-messages with the C code. Add tests. (gh-112403) (gh-112411)
Miss Islington (bot) [Sat, 25 Nov 2023 19:26:00 +0000 (20:26 +0100)]
[3.12] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) (#112402)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sat, 25 Nov 2023 17:56:46 +0000 (18:56 +0100)]
[3.12] gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385) (#112400)
gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385)
(cherry picked from commit
fbb9027a037ff1bfaf3f596df033ca45743ee980 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Sat, 25 Nov 2023 08:00:21 +0000 (09:00 +0100)]
[3.12] gh-101100: Define `_tkinter` module to fix references (GH-112382) (#112392)
gh-101100: Define `_tkinter` module to fix references (GH-112382)
Define _tkinter module to fix references
(cherry picked from commit
6b961b8ceaba372b78d03feaceb4837bf7236694 )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sat, 25 Nov 2023 07:59:09 +0000 (08:59 +0100)]
[3.12] gh-101100: Define `test.regrtest` module to fix references (GH-112381) (#112390)
gh-101100: Define `test.regrtest` module to fix references (GH-112381)
Define test.regrtest module to fix references
(cherry picked from commit
d525d01e2794e7e736527eaa7ee309ca1252f5bd )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 24 Nov 2023 18:15:54 +0000 (19:15 +0100)]
[3.12] gh-59254: mention in open() doc that line buffering is for writing (GH-112318) (#112378)
gh-59254: mention in open() doc that line buffering is for writing (GH-112318)
(cherry picked from commit
fafae08cc7caa25f2bd6b29106b50ef76c3e296f )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Thu, 23 Nov 2023 23:07:14 +0000 (00:07 +0100)]
[3.12] Remove bogus annotations from the descriptor howto guide (GH-112349) (#112352)
Remove bogus annotations from the descriptor howto guide (GH-112349)
(cherry picked from commit
d9fc15222e96942e30ea8b0561dec5c82ecb4663 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Tian Gao [Thu, 23 Nov 2023 18:18:17 +0000 (10:18 -0800)]
[3.12] GH-109052: Use the base opcode when comparing code objects (GH-112329)
Miss Islington (bot) [Wed, 22 Nov 2023 05:41:53 +0000 (06:41 +0100)]
[3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)
Fix docstring and var name of itertools recipe (GH-112113)
`prepend()` works with arbitrary iterables, not only iterators. In fact,
the example given uses a `list`, which is iterable, but not an iterator.
(cherry picked from commit
6c47eaccfa2550c140a24bc6e520d968731d9689 )
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Miss Islington (bot) [Tue, 21 Nov 2023 23:06:13 +0000 (00:06 +0100)]
[3.12] GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112304)
(cherry picked from commit
46500c42f09a8342efde48ad74327d5225158ff3 )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Tue, 21 Nov 2023 08:46:13 +0000 (09:46 +0100)]
[3.12] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041) (#112294)
Add upstream Tk patches for three problems affecting tkinter users:
- Update macOS installer to include a fix accepted by upstream Tcl/Tk
for a crash encountered after the first :meth:`tkinter.Tk` instance
is destroyed. (gh-92603)
- Update macOS installer to include an upstream Tcl/Tk fix
for the ``ttk::ThemeChanged`` error encountered in Tkinter. (gh-71383)
- Update macOS installer to include an upstream Tcl/Tk fix for the
``Secure coding is not enabled for restorable state!`` warning
encountered in Tkinter on macOS 14 Sonoma. (gh-110950)
(cherry picked from commit
d67f947c72af8a215db2fd285e5de9b1e671fde1 )
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Ned Deily <nad@python.org>
Pablo Galindo Salgado [Mon, 20 Nov 2023 15:38:57 +0000 (15:38 +0000)]
[3.12] gh-112243: Don't include comments in f-string debug expressions (GH-112284) (#112285)
(cherry picked from commit
d59feb5dbe5395615d06c30a95e6a6a9b7681d4d )
Miss Islington (bot) [Sun, 19 Nov 2023 23:25:36 +0000 (00:25 +0100)]
[3.12] gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324) (#112272)
gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324)
Omit the `@interface_scope` from an IPv6 address when used as Host header by `http.client`.
---------
(cherry picked from commit
ce1096f974d3158a92e050f9226700775b8db398 )
[Google LLC]
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Miss Islington (bot) [Sun, 19 Nov 2023 18:59:50 +0000 (19:59 +0100)]
[3.12] gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstrings (GH-112268) (#112270)
gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstrings (GH-112268)
(cherry picked from commit
f8129146ef9e1b71609ef4becc5d508061970733 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 19 Nov 2023 15:19:12 +0000 (16:19 +0100)]
[3.12] gh-112186: Improve test case `test_loop_is_closed_resource_warnings` (GH-112187) (#112255)
(cherry picked from commit
18c692946953e586db432fd06c856531a2b05127 )
Co-authored-by: DPR <dpr-0xff@pm.me>
Miss Islington (bot) [Sun, 19 Nov 2023 12:29:24 +0000 (13:29 +0100)]
[3.12] gh-110383: Explained which error message is generated when there is an unhandled exception (GH-111574) (#112264)
Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 19 Nov 2023 10:03:07 +0000 (11:03 +0100)]
[3.12] gh-110383: Fix documentation profile cumtime fix (GH-112221) (#112262)
Co-authored-by: Alex Ptakhin <me@aptakhin.name>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 19 Nov 2023 06:53:37 +0000 (07:53 +0100)]
[3.12] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112259)
IDLE: Fix test_debugger bug and buildbot failures (GH-112258)
Missing "requires('gui')" causes Tk() to fail when no gui.
This caused CI Hypothesis test to fail, but I did not understand
the its error message. Then buildbots failed.
IdbTest failed on draft Bdb replacement because so different.
Simplified version works on old and new.
(cherry picked from commit
14fd86a59d0d91fe72641efeb14a59d99127dec3 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sun, 19 Nov 2023 04:35:59 +0000 (05:35 +0100)]
[3.12] gh-79871: IDLE - Fix and test debugger module (GH-11451) (#112256)
gh-79871: IDLE - Fix and test debugger module (GH-11451)
Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes.
Expand test_debugger coverage from 19% to 66%.
---------
(cherry picked from commit
adedcfa06b553242d8033f6d9bebbcb3bc0dbb4d )
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Nikita Sobolev [Sat, 18 Nov 2023 11:13:37 +0000 (14:13 +0300)]
[3.12] gh-112155: Run `typing.py` doctests during tests (GH-112156) (#112230)
Miss Islington (bot) [Fri, 17 Nov 2023 18:28:35 +0000 (19:28 +0100)]
[3.12] gh-112194: Convert more examples to doctests in `typing.py` (GH-112195) (#112208)
gh-112194: Convert more examples to doctests in `typing.py` (GH-112195)
(cherry picked from commit
949b2cc6eae6ef4f3312dfd4e2650a138446fe77 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Fri, 17 Nov 2023 12:37:12 +0000 (13:37 +0100)]
[3.12] gh-94309: "What's new in Python 3.12": improve deprecation notice for typing.Hashable and typing.Sized (GH-112196) (#112200)
gh-94309: "What's new in Python 3.12": improve deprecation notice for typing.Hashable and typing.Sized (GH-112196)
(cherry picked from commit
fb4cddb0cc6c9b94929f846da8e95aeec3849212 )
Co-authored-by: Ori Avtalion <ori@avtalion.name>
Miss Islington (bot) [Fri, 17 Nov 2023 01:11:46 +0000 (02:11 +0100)]
[3.12] gh-112165: Fix typo in `__main__.py` (GH-112183) (#112184)
gh-112165: Fix typo in `__main__.py` (GH-112183)
Change '[2]' to '[1]' to get second argument.
(cherry picked from commit
8cd70eefc7f3363cfa0d43f34522c3072fa9e160 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 16 Nov 2023 21:09:34 +0000 (22:09 +0100)]
[3.12] Remove `imp_dummy_def` from `Tools/c-analyzer/cpython/ignored.tsv` (gh-112122) (gh-112177)
It was removed in 3.12, no need to keep the ignore.
(cherry picked from commit
762eb58220992d1ab809b9a281d47c0cd48a5aec )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
DPR [Thu, 16 Nov 2023 17:40:55 +0000 (01:40 +0800)]
[3.12] gh-109538: Catch closed loop runtime error and issue warning (GH-111983) (#112142)
* [3.12] gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop (GH-111983)
Issue a ResourceWarning instead.
(cherry picked from commit
e0f512797596282bff63260f8102592aad37cdf1 )
gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop (#111983)
Issue a ResourceWarning instead.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit
e0f512797596282bff63260f8102592aad37cdf1 )
* Fix missing warnings import
Miss Islington (bot) [Thu, 16 Nov 2023 17:11:33 +0000 (18:11 +0100)]
[3.12] gh-111811: Fix test_recursive_repr for WASI (GH-112130) (#112131)
gh-111811: Fix test_recursive_repr for WASI (GH-112130)
(cherry picked from commit
7218bac8c84115a8e9a18a4a8f3146235068facb )
Co-authored-by: Kushal Das <mail@kushaldas.in>
Miss Islington (bot) [Thu, 16 Nov 2023 15:32:47 +0000 (16:32 +0100)]
[3.12] GH-112152: Fix typo in `typing.override` docstring (GH-112158) (#112162)
GH-112152: Fix typo in `typing.override` docstring (GH-112158)
(cherry picked from commit
12c7e9d573de57343cf018fb4e67521aba46c90f )
Co-authored-by: Qua27 <92877777+Qua27@users.noreply.github.com>
Victor Stinner [Thu, 16 Nov 2023 14:55:40 +0000 (15:55 +0100)]
[3.12] gh-112088: Run autoreconf in GHA check_generated_files (GH-112090) (#112159)
gh-112088: Run autoreconf in GHA check_generated_files (#112090)
The "Check if generated files are up to date" job of GitHub Actions
now runs the "autoreconf -ivf -Werror" command instead of the "make
regen-configure" command to avoid depending on the external quay.io
server.
Add Tools/build/regen-configure.sh script to regenerate the configure
with an Ubuntu container image. The
"quay.io/tiran/cpython_autoconf:271" container image
(https://github.com/tiran/cpython_autoconf) is no longer used.
(cherry picked from commit
d9fd33a869d2be769ff596530f63ee099465b037 )
Miss Islington (bot) [Thu, 16 Nov 2023 12:34:29 +0000 (13:34 +0100)]
[3.12] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504) (GH-112148)
gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504)
(cherry picked from commit
985679f05d1b72965bfbed99d1499c22815375e4 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Hugo van Kemenade [Thu, 16 Nov 2023 00:44:39 +0000 (02:44 +0200)]
[3.12] gh-111062: CI: Move OS test jobs to reusable workflows (gh-111568)
CI: Move OS test jobs to reusable workflows
Co-authored-by: Donghee Na <donghee.na@python.org>
Miss Islington (bot) [Wed, 15 Nov 2023 15:48:04 +0000 (16:48 +0100)]
[3.12] Fix typo in perf profiling docs (GH-112112) (#112117)
Fix typo in perf profiling docs (GH-112112)
(cherry picked from commit
0cfdd6e3d17fee8c1c1f4b42b2146abcb43aa34b )
Co-authored-by: Ryuji Tsutsui <ryu22e+github@gmail.com>
Victor Stinner [Wed, 15 Nov 2023 13:55:46 +0000 (14:55 +0100)]
[3.12] gh-111942: Fix SystemError in the TextIOWrapper constructor (GH-112061) (GH-112089)
In non-debug more the check for the "errors" argument is skipped,
and then PyUnicode_AsUTF8() can fail, but its result was not checked.
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit
9302f05f9af07332c414b3c19003efd1b1763cf3 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 15 Nov 2023 13:08:05 +0000 (14:08 +0100)]
[3.12] gh-108303: Delete `imp_dummy` test file (GH-112110) (#112114)
gh-108303: Delete `imp_dummy` test file (GH-112110)
(cherry picked from commit
422c0f030170490c001575303d9e628a0298d457 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Wed, 15 Nov 2023 05:20:14 +0000 (06:20 +0100)]
[3.12] Docs: Add the time to the HTML last updated format (GH-110091) (#112102)
Docs: Add the time to the HTML last updated format (GH-110091)
(cherry picked from commit
6c214dea7c503eb42bd130d43e8880f39bff0350 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Tue, 14 Nov 2023 16:15:10 +0000 (17:15 +0100)]
[3.12] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112058)
* Fix crash when encoding is not string or None.
* Fix crash when both line_buffering and write_through raise exception
when converted ti int.
* Add a number of tests for constructor and reconfigure() method
with invalid arguments.
(cherry picked from commit
ee06fffd38cb51ce1c045da9d8336d9ce13c318a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 14 Nov 2023 12:25:19 +0000 (13:25 +0100)]
[3.12] gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826) (GH-112024)
gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826)
(cherry picked from commit
1c7ed7e9ebc53290c831d7b610219fa737153a1b )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Tue, 14 Nov 2023 09:38:19 +0000 (10:38 +0100)]
[3.12] gh-111622: Fix doc for items views (GH-112051) (#112052)
They are set-like even when some values are not hashable,
but work even better when all are.
(cherry picked from commit
e31d65e0b7bb6d6fee4e8df54e10976b4cfab1de )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Tue, 14 Nov 2023 01:59:01 +0000 (02:59 +0100)]
[3.12] gh-111460: Restore ncurses widechar support on macOS (GH-111878) (gh-112034)
gh-111460: Restore ncurses widechar support on macOS (GH-111878)
(cherry picked from commit
d2f305dfd183025a95592319b280fcf4b20c8694 )
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
Miss Islington (bot) [Mon, 13 Nov 2023 19:55:33 +0000 (20:55 +0100)]
[3.12] gh-112007: Re-organize help utility intro message (GH-112017) (#112047)
gh-112007: Re-organize help utility intro message (GH-112017)
Most important: move how-to-quit sentence to the end and mention 'q'.
Re-group the other sentences and improve some wording.
---------
(cherry picked from commit
b28bb130bbc2ad956828819967d83e06d30a65c5 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 13 Nov 2023 16:25:01 +0000 (17:25 +0100)]
gh-111856: Fix os.fstat on windows with FAT32 and exFAT filesystem (GH-112038)
(cherry picked from commit
29af7369dbbbba8cefafb196e977bce8189a527d )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Petr Viktorin [Mon, 13 Nov 2023 14:54:40 +0000 (15:54 +0100)]
[3.12] gh-102837: more tests for the math module (GH-111930)(GH-102523) (GH-112030)
* gh-102837: improve test coverage for math module (GH-102523)
(Only the test changes from GH-102523 are cherry-picked)
- input checks for math_1(L989), math_1a(L1023), math_2(L1064,L1071), hypot(L2682), log(L2307), ldexp(L2168), ceil(L1165), floor(L1236,L1239) and dist(L2587,L2588,L2628).
- improve fsum coverage for exceptional cases (L1433,L1438,L1451,L1497), ditto fmod(L2378)
(all line numbers are wrt the main branch at
5e6661bce9 )
* gh-102837: more tests for the math module (GH-111930)
Add tests to improve coverage:
* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330
// line numbers wrt to
9dc4fb8204
(cherry picked from commit
c61de456db0186b65d479d41e84127832205d30d )
---------
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Alex Waygood [Mon, 13 Nov 2023 14:08:57 +0000 (14:08 +0000)]
[3.12] gh-111681: minor fixes to typing doctests; remove unused imports in `test_typing` (#111682) (#112035)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Alex Waygood [Mon, 13 Nov 2023 13:59:56 +0000 (13:59 +0000)]
[3.12] Bump mypy to 1.7.0 (GH-111961) (#112033)
Miss Islington (bot) [Mon, 13 Nov 2023 08:15:11 +0000 (09:15 +0100)]
[3.12] Docs: Add `make htmllive` to rebuild and reload HTML files in your browser (GH-111900) (#112022)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 13 Nov 2023 00:17:54 +0000 (01:17 +0100)]
[3.12] gh-111944: Add assignment expression parentheses requirements (GH-111977) (#112010)
Augment the list of places where parentheses are
required around assignnment statements. In particular,
'a := 0' and 'a = b := 1' are syntax errors.
(cherry picked from commit
9a2f25d374f027f6509484d66e1c7bba03977b99 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sun, 12 Nov 2023 13:20:36 +0000 (14:20 +0100)]
[3.12] gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002) (GH-112003)
(cherry picked from commit
40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 12 Nov 2023 01:22:44 +0000 (02:22 +0100)]
[3.12] gh-111933: fix broken link to A.Neumaier article (gh-111937) (gh-111993)
Miss Islington (bot) [Sun, 12 Nov 2023 00:44:24 +0000 (01:44 +0100)]
[3.12] gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction (GH-111778) (#111989)
gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction (GH-111778)
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
(cherry picked from commit
ce6a533c4bf1afa3775dfcaee5fc7d5c15a4af8c )
Co-authored-by: T. Wouters <thomas@python.org>
Miss Islington (bot) [Sun, 12 Nov 2023 00:39:03 +0000 (01:39 +0100)]
[3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) (#111992)
Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982)
Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
(cherry picked from commit
21615f77b5a580e83589abae618dbe7c298700e2 )
Co-authored-by: T. Wouters <thomas@python.org>
Gregory P. Smith [Sat, 11 Nov 2023 17:21:52 +0000 (09:21 -0800)]
[3.12] gh-110395: invalidate open kqueues after fork (GH-110517) (#111745)
* [3.12] gh-110395: invalidate open kqueues after fork (GH-110517)
Invalidate open select.kqueue instances after fork as the fd will be invalid in the child.
(cherry picked from commit
a6c1c04d4d2339f0094422974ae3f26f8c7c8565 )
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
* move assert to after the child dying
this is in `main` via https://github.com/python/cpython/pull/111816/files
Miss Islington (bot) [Sat, 11 Nov 2023 08:02:08 +0000 (09:02 +0100)]
[3.12] gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows (GH-111842) (GH-111966)
(cherry picked from commit
0b06d2482d77e02c5d40e221f6046c9c355458b2 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 10 Nov 2023 14:58:00 +0000 (15:58 +0100)]
[3.12] gh-111251: Fix error checking in _blake2 module init (GH-111252) (#111297)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Fri, 10 Nov 2023 14:12:39 +0000 (15:12 +0100)]
[3.12] gh-111912: Run test_posix on Windows (GH-111913) (GH-111953)
(cherry picked from commit
64fea3211d08082236d05c38ee728f922eb7d8ed )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 10 Nov 2023 14:00:48 +0000 (15:00 +0100)]
[3.12] gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (GH-111910) (#111955)
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (GH-111910)
(cherry picked from commit
d61313bdb1eee3e4bb111e0b248ac2dbb48be917 )
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
Victor Stinner [Fri, 10 Nov 2023 13:07:45 +0000 (14:07 +0100)]
[3.12] gh-109181: Fix refleak in tb_get_lineno() (#111948)
PyFrame_GetCode() returns a strong reference.
Miss Islington (bot) [Fri, 10 Nov 2023 12:32:21 +0000 (13:32 +0100)]
[3.12] gh-108303: Install `Lib/test/configdata` (GH-111899) (#111946)
gh-108303: Install `Lib/test/configdata` (GH-111899)
(cherry picked from commit
65d6dc27156112ac6a9f722b7b62529c94e0344b )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Victor Stinner [Fri, 10 Nov 2023 09:32:06 +0000 (10:32 +0100)]
gh-111929: Fix regrtest --pgo: test_str => test_unicode (#111938)
test_unicode was renamed to test_str in Python 3.13, but Python 3.12
still uses test_unicode name.
Miss Islington (bot) [Fri, 10 Nov 2023 07:37:19 +0000 (08:37 +0100)]
gh-111356: io: Add missing documented objects to io.__all__ (GH-111370)
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
(cherry picked from commit
baeb7718f8981319c5cb1fbdd46d162ded7964ea )
Co-authored-by: Nicolas Tessore <n.tessore@ucl.ac.uk>
Serhiy Storchaka [Fri, 10 Nov 2023 07:17:02 +0000 (09:17 +0200)]
[3.12] gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780) (GH-111934)
Follow-up of gh-107219.
* Only close the connection writer on Windows.
* Also use existing constant _winapi.ERROR_OPERATION_ABORTED instead of
WSA_OPERATION_ABORTED.
(cherry picked from commit
0b4e090422db5f959184353d53552d1675f74212 )
Brett Cannon [Thu, 9 Nov 2023 23:35:51 +0000 (15:35 -0800)]
[3.12] GH-111804: Drop posix.fallocate() under WASI (GH-111869) (GH-111919)
GH-111804: Drop posix.fallocate() under WASI (GH-111869)
Drop posix.fallocate() under WASI.
The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
Miss Islington (bot) [Thu, 9 Nov 2023 19:34:10 +0000 (20:34 +0100)]
[3.12] gh-110875: Handle '.' properties in logging formatter configuration c… (GH-110943) (GH-111911)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Miss Islington (bot) [Thu, 9 Nov 2023 19:13:23 +0000 (20:13 +0100)]
[3.12] gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898) (#111908)
gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898)
Convert definition list to bullet list for readability on mobile
(cherry picked from commit
7d21e3d5ee9858aee570aa6c5b6a6e87d776f4b5 )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Thu, 9 Nov 2023 15:40:10 +0000 (16:40 +0100)]
[3.12] gh-111881: Import doctest lazily in libregrtest (GH-111884) (#111893)
gh-111881: Import doctest lazily in libregrtest (GH-111884)
In most cases, doctest is not needed. So don't always import it at
startup. The change reduces the number of modules already
imported when a test is run.
(cherry picked from commit
6f09f69b7f85962f66d10637c3325bbb2b2d9853 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Thu, 9 Nov 2023 15:23:58 +0000 (16:23 +0100)]
[3.12] gh-111881: Use lazy import in test.support (#111885) (#111890)
gh-111881: Use lazy import in test.support (#111885)
* Import lazily getpass in test.support
* Only import ctypes on Windows in test.support.os_helper.
(cherry picked from commit
0372e3b02a7e3dc1c564dba94dcd817c5472b04f )
Miss Islington (bot) [Thu, 9 Nov 2023 15:21:24 +0000 (16:21 +0100)]
[3.12] gh-108303: Move more files to `Lib/test/test_module` (GH-111880) (#111891)
gh-108303: Move more files to `Lib/test/test_module` (GH-111880)
(cherry picked from commit
0c42f7304a2757fe0f78bc6c6fbb33225cd9da15 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Thu, 9 Nov 2023 14:41:44 +0000 (15:41 +0100)]
[3.12] gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879) (gh-111882)
gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879)
(cherry picked from commit
cc18b886a51672c59622837a2b8e83bf6be28c58 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Wed, 8 Nov 2023 20:48:18 +0000 (21:48 +0100)]
[3.12] gh-110543: Fix CodeType.replace in presence of comprehensions (GH-110586) (#111866)
gh-110543: Fix CodeType.replace in presence of comprehensions (GH-110586)
(cherry picked from commit
0b718e6407da65b838576a2459d630824ca62155 )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Wed, 8 Nov 2023 18:10:13 +0000 (19:10 +0100)]
[3.12] gh-111495: Add tests for PyList C API (GH-111562) (GH-111861)
(cherry picked from commit
a3903c8ec838f82338f7a7af68a6699118778e1d )
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Kalyan <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Nikita Sobolev [Wed, 8 Nov 2023 16:56:24 +0000 (19:56 +0300)]
[3.12] gh-108303: Move more typing related files to Lib/test/typinganndata (GH-111825) (#111859)
[3.12] gh-108303: Move more typing related files to Lib/test/typinganndata(GH-111825)
Miss Islington (bot) [Wed, 8 Nov 2023 14:45:17 +0000 (15:45 +0100)]
[3.12] Glossary: Add "static type checker" (GH-111837) (#111854)
Glossary: Add "static type checker" (GH-111837)
(cherry picked from commit
8ab7ad63086b1793c24b1c5aaa19b60fc0e6540e )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Tue, 7 Nov 2023 22:04:29 +0000 (23:04 +0100)]
[3.12] gh-111806: Fix `test_recursion` in `test_richcmp` on WASI builds (GH-111830) (GH-111831)
gh-111806: Fix `test_recursion` in `test_richcmp` on WASI builds (GH-111830)
(cherry picked from commit
f115a55f0e455a4b43a1da9fd838a60a101f182a )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 7 Nov 2023 12:06:21 +0000 (13:06 +0100)]
[3.12] gh-111765: Move old PyFloat_* tests to Lib/test/test_capi/test_float.py (GH-111766) (GH-111818)
(cherry picked from commit
a077b2fbb88f5192bb47e514334f760bf08d0295 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Tue, 7 Nov 2023 01:00:16 +0000 (02:00 +0100)]
[3.12] gh-111729: update generic syntax for `typing.Concatenate` sample code in `Doc/library/typing.rst` (GH-111734) (#111814)
(cherry picked from commit
c3e19c3a62e82b9e77563e934059895b6230de6e )
Co-authored-by: 方糖 <cubesugarcheese@qq.com>
Miss Islington (bot) [Mon, 6 Nov 2023 11:31:58 +0000 (12:31 +0100)]
[3.12] gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695) (gh-111769)
gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695)
(cherry picked from commit
c8faa3568afd255708096f6aa8df0afa80cf7697 )
Co-authored-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
Miss Islington (bot) [Sun, 5 Nov 2023 08:12:57 +0000 (09:12 +0100)]
[3.12] gh-111495: Add tests for PyComplex C API (GH-111591) (GH-111753)
(cherry picked from commit
24b5cbd3dce3fe37cdc787ccedd1e73a4f8cfc3c )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Sun, 5 Nov 2023 08:01:31 +0000 (09:01 +0100)]
[3.12] gh-111495: Add tests for PyFloat C API (GH-111624) (GH-111752)
(cherry picked from commit
b452202a11c4cb60f69a098a0076a8a8aabade38 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Sun, 5 Nov 2023 04:28:58 +0000 (05:28 +0100)]
[3.12] gh-111747: DOC: fix moved link to Documentation Translations (GH-111748) (#111749)
Update old link in bugs.rst to the table of doc translators and translation repositories at Github.
(cherry picked from commit
72e27a67b97993f277e69c9dafb063007ba79adf )
Co-authored-by: partev <petrosyan@gmail.com>
Miss Islington (bot) [Sat, 4 Nov 2023 19:55:55 +0000 (20:55 +0100)]
[3.12] gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725) (#111727)
gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725)
Close database connection explicitly in test cleanup.
(cherry picked from commit
f48e669504ce53040a04e0181064c11741a87817 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Serhiy Storchaka [Sat, 4 Nov 2023 10:28:34 +0000 (12:28 +0200)]
[3.12] gh-111495: Test C API functions with extreme sizes and indices (GH-111631) (GH-111731)
(cherry picked from commit
a8e1f474c20ab15140dd0cfcb96b696857907a60 )
Miss Islington (bot) [Sat, 4 Nov 2023 10:21:06 +0000 (11:21 +0100)]
[3.12] gh-111159: Fix `SyntaxError` doctests for non-builtin exception classes (GH-111541) (#111732)
gh-111159: Fix `SyntaxError` doctests for non-builtin exception classes (GH-111541)
(cherry picked from commit
18c954849bcdd5acb6ef91cd90d92f3b5c685134 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sat, 4 Nov 2023 06:29:20 +0000 (07:29 +0100)]
[3.12] gh-111644: Fix asyncio test_unhandled_exceptions() (GH-111713) (#111718)
gh-111644: Fix asyncio test_unhandled_exceptions() (GH-111713)
Fix test_unhandled_exceptions() of test_asyncio.test_streams: break
explicitly a reference cycle.
Fix also StreamTests.tearDown(): the loop must not be closed
explicitly, but using set_event_loop() which takes care of shutting
down the executor with executor.shutdown(wait=True).
BaseEventLoop.close() calls executor.shutdown(wait=False).
(cherry picked from commit
ac01e2243a1104b2154c0d1bdbc9f8d5b3ada778 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Sat, 4 Nov 2023 00:56:34 +0000 (01:56 +0100)]
[3.12] gh-111644: Fix support threading_cleanup() (GH-111714) (#111716)
gh-111644: Fix support threading_cleanup() (GH-111714)
Copy the list of dangling threads to make sure that the list of
"Dangling thread" is complete. Previously, the list was incomplete if
threads completed just before the list was displayed.
Changes:
* Rewrite the warning to make it easier to understand.
* Use support.sleeping_retry().
* threading_cleanup() no longer copies threading._dangling,
but only counts the number of dangling thread.
* Remove support.gc_support() call.
(cherry picked from commit
f62c7ccf9abf6e0493978da9cf9ca43adcd403f9 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Jelle Zijlstra [Fri, 3 Nov 2023 14:02:07 +0000 (07:02 -0700)]
[3.12] gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF (GH-111655) (#111674)
(cherry picked from commit
3a1b09e6d070778d78d81084f88d37377d38ee9b )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Fri, 3 Nov 2023 06:28:55 +0000 (07:28 +0100)]
[3.12] gh-54434: Make difflib.rst doctests pass. (GH-111677) (#111678)
gh-54434: Make difflib.rst doctests pass. (GH-111677)
(cherry picked from commit
0d3df272fbd131bff7f02d4d4279ad1e35081121 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 2 Nov 2023 22:58:20 +0000 (23:58 +0100)]
[3.12] Fix typo in documentation of `SysLogHandler.createSocket` (GH-111665) (#111669)
(cherry picked from commit
489b80640ff9c4f10b25da6d562b06c62a10a76b )
Miss Islington (bot) [Thu, 2 Nov 2023 12:04:27 +0000 (13:04 +0100)]
[3.12] gh-111625: Fix link to Info-ZIP homepage (GH-111626) (#111639)
Co-authored-by: partev <petrosyan@gmail.com>
Kumar Aditya [Thu, 2 Nov 2023 08:18:49 +0000 (13:48 +0530)]
[3.12] GH-110894: Call loop exception handler for exceptions in client_connected_cb (GH-111601) (#111632)
Call loop exception handler for exceptions in `client_connected_cb` of `asyncio.start_server` so that applications can handle it..
(cherry picked from commit
229f44d353c71185414a072017f46f125676bdd6 )
Miss Islington (bot) [Wed, 1 Nov 2023 20:01:28 +0000 (21:01 +0100)]
[3.12] gh-111253: Fix error checking in _socket module init (GH-111254) (#111299)
gh-111253: Fix error checking in _socket module init (GH-111254)
(cherry picked from commit
3052c098ca2779c2d9ab9800dabe66d0efa01794 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Wed, 1 Nov 2023 19:58:02 +0000 (20:58 +0100)]
[3.12] gh-111295: Fix error checking in time extension module init (GH-111296) (#111300)
gh-111295: Fix error checking in time extension module init (GH-111296)
Introduce ADD_INT macro wrapper for PyModule_AddIntConstant()
(cherry picked from commit
81b03e78101c97c1d3fe5f90908bbf94e83d7df1 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>