Examine and update spec -- callable pairs.
Revise run method.
(cherry picked from commit 3855b45874)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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>
[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>
[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>
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>
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>
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>
gh-112105: Make completer delims work on libedit (gh-112106)
(cherry picked from commit 2df26d8348)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479)
(cherry picked from commit 2e632fa07d)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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.
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>