Commit graph

116090 commits

Author SHA1 Message Date
Miss Islington (bot)
36ad8e61a6
[3.11] gh-66819: More IDLE htest updates(2) (GH-112642) (#112644)
Examine and update spec -- callable pairs.
Revise run method.
(cherry picked from commit 3855b45874)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-03 11:34:37 -05:00
Miss Islington (bot)
3d87a988a6
[3.11] Fix link to 'The Perils of Floating Point', on the tutorial (GH-112499) (GH-112663)
Use author link to 'The Perils of Floating Point'.
(cherry picked from commit c27b09c813)

Co-authored-by: Marco Aurélio A. Barbosa <aureliobarbosa@gmail.com>
2023-12-03 15:20:51 +00:00
Alex Waygood
999ff4f94a
[3.11] Run more inspect.rst code snippets in CI (#112654) (#112656)
(cherry-picked from commit 4ed46d2244)
2023-12-03 12:01:33 +00:00
Miss Islington (bot)
6ab6c8579c
[3.11] [3.12] gh-112316: improve docs for inspect.signature and inspect.Signature (GH-112631) (GH-112649) (#112652)
[3.12] gh-112316: improve docs for `inspect.signature` and `inspect.Signature` (GH-112631) (GH-112649)

(cherry-picked from commit fc9e24b01f)
(cherry picked from commit 6221482f0c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-03 11:35:21 +00:00
Miss Islington (bot)
db537702e4
[3.11] [3.12] gh-112618: Make Annotated cache typed (GH-112619) (GH-112628) (#112633)
[3.12] gh-112618: Make Annotated cache typed (GH-112619) (GH-112628)
(cherry picked from commit 2a378ca2ef)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-03 00:58:13 +00:00
Alex Waygood
8d8efe7e71
[3.11] gh-112316: Improve docs of inspect.signature and Signature.from_callable (#112317) (#112630)
(cherry-picked from commit a74daba7ca)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-02 22:50:16 +00:00
Miss Islington (bot)
720f5bf1ac
[3.11] [3.12] gh-109413: libregrtest: Backport .py-file changes from GH-112558 (GH-112605) (#112607)
[3.12] gh-109413: libregrtest: Backport `.py`-file changes from GH-112558 (GH-112605)
(cherry picked from commit acc62db8af)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-01 19:09:00 +00:00
Miss Islington (bot)
da33204430
[3.11] [3.12] gh-109413: libregrtest: enable mypy's --strict-optional check on most files (GH-112586) (GH-112602) (#112603)
[3.12] gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (GH-112586) (GH-112602)

gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (GH-112586)

(cherry picked from commit 36dbebed44)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-01 17:28:09 +00:00
Alexey Izbyshev
0443f926be
[3.11] bpo-35191: Fix unexpected integer truncation in socket.setblocking() (GH-10415)
On platforms with 64-bit long, socket.setblocking(x) treated all x
which lower 32 bits are zero as False due to integer truncation.

Reported by ubsan.
2023-12-01 17:44:03 +02:00
Miss Islington (bot)
eb3c0dc667
[3.11] gh-109413: regrtest: add WorkerRunTests class (GH-112588) (#112594)
gh-109413: regrtest: add WorkerRunTests class (GH-112588)
(cherry picked from commit f8ff80f635)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-12-01 14:43:09 +00:00
Miss Islington (bot)
d838c7aa8a
[3.11] gh-82565: Add tests for pickle and unpickle with bad files (GH-16606) (GH-112592)
(cherry picked from commit 058444308a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-12-01 14:18:09 +00:00
Serhiy Storchaka
fc11280a02
[3.11] gh-104231: Add more tests for str(), repr(), ascii(), and bytes() (GH-112551) (GH-112556)
(cherry picked from commit 2223899adc)
2023-12-01 10:17:20 +02:00
Miss Islington (bot)
ddf6cfd456
[3.11] gh-66819: More IDLE htest updates (GH-112574) (#112576)
Revise htest.py docstring and move 2 specs to alphabetical position.
(cherry picked from commit e44f1940bd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-01 07:22:07 +00:00
Miss Islington (bot)
03ac9e6ee1
[3.11] IDLE: fix config_key htest (GH-112545) (#112547)
Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested.
(cherry picked from commit 81261fa67f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-30 03:29:23 -05:00
Miss Islington (bot)
f6edb83fe9
[3.11] gh-112509: Fix keys being present in both required_keys and optional_keys in TypedDict (GH-112512) (#112531)
(cherry picked from commit 4038869423)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-29 17:51:00 +00:00
Miss Islington (bot)
0a0cf45f1b
[3.11] gh-110930: Correct book title by Alan D. Moore (GH-112490) (#112524)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-29 15:56:20 +00:00
Miss Islington (bot)
3c0d963379
[3.11] gh-112431: Unconditionally call hash -r (GH-112432) (GH-112492)
gh-112431: Unconditionally call `hash -r` (GH-112432)

The `activate` script calls `hash -r` in two places to make sure the shell picks
up the environment changes the script makes. Before that, it checks to
see if the shell running the script is bash or zsh.

`hash -r` is specified by POSIX and is not exclusive to bash and zsh.
This guard prevents the script from calling `hash -r` in other
`GH-!/bin/sh`-compatible shells like dash.
(cherry picked from commit a194938f33)

Co-authored-by: James Morris <6653392+J-M0@users.noreply.github.com>
2023-11-28 15:13:38 +05:30
Miss Islington (bot)
42dd2613fe
[3.11] gh-112105: Make completer delims work on libedit (gh-112106) (gh-112488)
gh-112105: Make completer delims work on libedit (gh-112106)
(cherry picked from commit 2df26d8348)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-11-28 06:39:47 +00:00
Miss Islington (bot)
b85070ceaf
[3.11] Docs: fix markup for importlib.machinery.NamespaceLoader (GH-112479) (#112482)
Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479)
(cherry picked from commit 2e632fa07d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-28 00:21:18 +00:00
Gregory P. Smith
03b522d3ef
[3.11] Backport PR #112477: correct socket AF_PACKET docs (#112478)
Backport PR #112477: correct socket AF_PACKET docs

Network byte order is not involved in the `int` on the Python side.
That happens under the hood.

Correctly use the term addresses instead of packets.
2023-11-27 23:54:21 +00:00
Miss Islington (bot)
c3e5d0d936
[3.11] gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453) (GH-111858)
* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.

(cherry picked from commit 005d1e8fc8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-11-27 20:14:30 +00:00
Miss Islington (bot)
390a5b81a9
[3.11] gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409) (#112469)
gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409)
(cherry picked from commit 45d648597b)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-11-27 19:05:20 +00:00
Miss Islington (bot)
43b081bfc4
[3.11] gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors (GH-112410) (#112467)
gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors (GH-112410)
(cherry picked from commit 2c8b191742)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-11-27 18:56:27 +00:00
Serhiy Storchaka
054d18e883
[3.11] bpo-41422: Visit the Pickler's and Unpickler's memo in tp_traverse (GH-21664) (GH-112465)
(cherry picked from commit 967f2a3052)

Co-authored-by: kale-smoothie <34165060+kale-smoothie@users.noreply.github.com>
2023-11-27 18:46:34 +00:00
Serhiy Storchaka
581b244155
[3.11] gh-112438: Fix support of format units with the "e" prefix in nested tuples in PyArg_Parse (gh-112439) (GH-112461)
(cherry picked from commit 4eea1e8236)
2023-11-27 18:11:09 +00:00
Serhiy Storchaka
6d9b1819b8
[3.11] gh-84443: SSLSocket.recv_into() now support buffer protocol with itemsize != 1 (GH-20310) (GH-112459)
It is also no longer use __len__().

(cherry picked from commit 812360fddd)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-11-27 17:41:05 +00:00
Miss Islington (bot)
62e430af9e
[3.11] GH-101100: Fix reference warnings for `socket` methods (GH-110114) (#112456)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-11-27 17:03:45 +02:00
Miss Islington (bot)
faa1ef4893
[3.11] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112445)
Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442)
(cherry picked from commit fb79e1ed4a)

Co-authored-by: Tom Levy <tomlevy93@gmail.com>
2023-11-27 09:34:35 +00:00
Hugo van Kemenade
fc657d0c60
[3.11] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112422) 2023-11-26 05:22:17 -07:00
Miss Islington (bot)
49005e4d02
[3.11] gh-112331: Fix reference manual description of attribute lookup mechanics (gh-112375) (gh-112413) 2023-11-25 22:26:22 +00:00
Hugo van Kemenade
d9254f9f04
[3.11] gh-101100 : Fix Sphinx warnings in library/doctest.rst (GH-112399) (#112404)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-25 12:26:05 -07:00
Miss Islington (bot)
8c9f273760
[3.11] gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385) (#112401)
gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385)
(cherry picked from commit fbb9027a03)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-11-25 17:39:16 +00:00
Miss Islington (bot)
68db0ed903
[3.11] gh-101100: Define _tkinter module to fix references (GH-112382) (#112393)
gh-101100: Define `_tkinter` module to fix references (GH-112382)

Define _tkinter module to fix references
(cherry picked from commit 6b961b8cea)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-25 10:00:44 +02:00
Miss Islington (bot)
8b6068e555
[3.11] gh-101100: Define test.regrtest module to fix references (GH-112381) (#112391)
gh-101100: Define `test.regrtest` module to fix references (GH-112381)

Define test.regrtest module to fix references
(cherry picked from commit d525d01e27)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-25 09:59:28 +02:00
Miss Islington (bot)
669b8fab31
[3.11] gh-59254: mention in open() doc that line buffering is for writing (GH-112318) (#112379)
gh-59254: mention in open() doc that line buffering is for writing (GH-112318)
(cherry picked from commit fafae08cc7)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-11-24 18:15:42 +00:00
Miss Islington (bot)
d3c12144d3
[3.11] Remove bogus annotations from the descriptor howto guide (gh-112349) (gh-112350) 2023-11-23 21:21:49 +00:00
Miss Islington (bot)
640454fd32
[3.11] Fix docstring and var name of itertools recipe (GH-112113) (#112311)
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 6c47eaccfa)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-11-22 05:41:51 +00:00
Miss Islington (bot)
253ad788c6
[3.11] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041) (#112293)
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 d67f947c72)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Ned Deily <nad@python.org>
2023-11-21 08:29:34 +00:00
DPR
13975051b5
[3.11] gh-109538: Catch closed loop runtime error and issue warning (GH-111983) (#112141)
Issue a ResourceWarning instead.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit e0f5127975)
2023-11-20 15:12:17 -08:00
Nikita Sobolev
6c51c84b39
[3.11] gh-112266: Remove (if defined) part from __dict__ and __weakref__ docstrings (GH-112268) (#112276) 2023-11-20 09:04:38 +00:00
Miss Islington (bot)
f6e11eab49
[3.11] gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324) (#112273)
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 ce1096f974)


 [Google LLC]

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-11-19 15:25:40 -08:00
Miss Islington (bot)
11b91be55b
[3.11] gh-110383: Explained which error message is generated when there is an unhandled exception (GH-111574) (#112265)
Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-19 05:29:28 -07:00
Miss Islington (bot)
e9a97c3bf9
[3.11] gh-110383: Fix documentation profile cumtime fix (GH-112221) (#112263)
Co-authored-by: Alex Ptakhin <me@aptakhin.name>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-19 10:02:49 +00:00
Miss Islington (bot)
d065e30b00
[3.11] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112260)
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 14fd86a59d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-19 06:59:56 +00:00
Miss Islington (bot)
e19d75df76
[3.11] gh-79871: IDLE - Fix and test debugger module (GH-11451) (#112257)
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 adedcfa06b)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-19 04:34:54 +00:00
Nikita Sobolev
93fbcd6443
[3.11] gh-112155: Run typing.py doctests during tests (GH-112156) (#112231) 2023-11-18 11:13:55 +00:00
Miss Islington (bot)
e7aa40a341
[3.11] gh-112194: Convert more examples to doctests in typing.py (GH-112195) (#112209)
gh-112194: Convert more examples to doctests in `typing.py` (GH-112195)
(cherry picked from commit 949b2cc6ea)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-17 18:14:20 +00:00
Miss Islington (bot)
7e4b66b86f
[3.11] gh-112165: Fix typo in __main__.py (GH-112183) (#112185)
gh-112165: Fix typo in `__main__.py` (GH-112183)

Change '[2]' to '[1]' to get second argument.
(cherry picked from commit 8cd70eefc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-17 01:11:39 +00:00
Miss Islington (bot)
533da5ed67
[3.11] gh-111811: Fix test_recursive_repr for WASI (GH-112130) (#112132)
gh-111811: Fix test_recursive_repr for WASI (GH-112130)
(cherry picked from commit 7218bac8c8)

Co-authored-by: Kushal Das <mail@kushaldas.in>
2023-11-16 18:10:02 +01:00
Miss Islington (bot)
b4f3a62383
[3.11] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504) (GH-112147)
gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504)
(cherry picked from commit 985679f05d)

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>
2023-11-16 13:34:21 +01:00