gh-118359: Improve docs for Bdb.user_call (GH-118368)
The `argument_list` parameter of bdb.Bdb.user_call has been useless for 25 years. It is retained for backwards compatibility, but it will always be None.
(cherry picked from commit 8e4fb5d260)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)
The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).
This patch updates the ranges with what was missing or otherwise
incorrect.
100.64.0.0/10 is left alone, for now, as it's been made special in [1].
The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.
[1] https://github.com/python/cpython/issues/61602
* GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)
It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).
(cherry picked from commit 2a4cbf17af)
(cherry picked from commit 40d75c2b7f)
---------
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)
(cherry picked from commit fc5f68e58e)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Docs: replace Harry Potter reference with Monty Python (GH-118130)
(cherry picked from commit 1446024124)
Co-authored-by: Clément Robert <cr52@protonmail.com>
gh-118100: Improve links in `ast.rst` (GH-118101)
(cherry picked from commit 2aa11cca11)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384)
The implementation uses 'ptr' for the name of the first parameter of
ctypes.string_at() and ctypes.wstring_at(). Align docs and docstrings
with the naming used in the implementation.
(cherry picked from commit 81a926bd20)
Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333)
Thanks Davin Potts for the clarification idea.
(cherry picked from commit fefd5d9711)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
gh-114539: Clarify implicit launching of shells by subprocess (GH-117996)
(cherry picked from commit a4b44d39cd)
Co-authored-by: Steve Dower <steve.dower@python.org>
Simpler example of shallow dict export of a dataclass (GH-117812)
(cherry picked from commit f303651b45)
Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
I think the choice of wording in these docs is great and doesn't
need to change. However, it could be useful to explicitly define
this term / the cost of doing so seems relatively low.
(cherry picked from commit 37a4cbd872)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns (GH-105406)
(cherry picked from commit c06be6bbb8)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* remove load extension doctest since we cannot skip it conditionally
* remove sys.unraisablehook example; using unraisable hooks is not "an
improved debug experience"
(cherry picked from commit e338e1a4ec)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.
(cherry picked from commit a453f5ef9d)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-117074: Update Traversable.joinpath docs to the 3.11+ protocol (GH-117113)
(cherry picked from commit e569f9132b)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-75988: Fix issues with autospec ignoring wrapped object (#115223)
* set default return value of functional types as _mock_return_value
* added test of wrapping child attributes
* added backward compatibility with explicit return
* added docs on the order of precedence
* added test to check default return_value
(cherry picked from commit 735fc2cbbc)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit 744c077795)
Co-authored-by: jnchen <caojingchen@live.com>