* 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>
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-116935: Document that heap types need to support garbage collection (GH-118021)
(cherry picked from commit 5d54436574)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920)
(cherry picked from commit 4605a197bd)
Co-authored-by: Victor Stinner <vstinner@python.org>
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>
Use "Contributed by" in a couple of occurrences of 3.12 whatsnew (GH-118070)
(cherry picked from commit 398abdd6fa)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
gh-116932: Add note on how to report python documentation theme bugs (GH-117989)
(cherry picked from commit 468b9aeb92)
Co-authored-by: lyc8503 <me@lyc8503.site>
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>
Docs: Add classes to C API return value annotations (GH-117926)
(cherry picked from commit 3284b84c43)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
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>