Now all protocols always accept the Bluetooth address as string and
getsockname() always returns the Bluetooth address as string.
* BTPROTO_SCO now accepts not only bytes, but str.
* BTPROTO_SCO now checks address for embedded null.
* On *BSD, BTPROTO_HCI now accepts str instead of bytes.
* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.
* On NetBSD and DragonFly BSD, BTPROTO_HCI now checks address for embedded null.
(cherry picked from commit 1fc1df8dcc)
gh-132354: document return value for `asyncio.Task.cancel` (GH-132374)
(cherry picked from commit 64b066ad29)
Co-authored-by: Felix Scherz <felixwscherz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: 180909 <wjh180909@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
gh-106670: Fix a typo in doc of pdb's exceptions command (GH-132277)
(cherry picked from commit efd8aca62c)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
gh-132021: Add bool type to the list of allowed JSON key types (GH-132048)
(cherry picked from commit 403886c28d)
Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
gh-115684: Clarify datetime `replace` documentation (GH-116519)
* Clarify datetime `replace` documentation
In GH-115684, HopedForLuck noted that `datetime.date.replace()`
documentation was confusing because it looked like it would be changing
immutable objects.
This documentation change specifies that the `replace()` methods in
`datetime` return new objects. This uses similar wording to the
documentation for `datetime.combine()`, which specifies that a new
datetime is returned. This is also similar to wording for
`string.replace()`, except `string.replace()` emphasizes that a "copy"
is returned.
Resolves GH-115684.
* Include reviewer comments
Thanks Privat33r-dev for the comments!
---------
(cherry picked from commit d2d886215c)
Co-authored-by: David Lowry-Duda <david@lowryduda.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Docs: Add a single table summary for ``cmath`` (GH-131887)
(cherry picked from commit 6eaa4aeef2)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
gh-125957: sync argument naming in sphinx docs of the cmath and help() (GH-125958)
(cherry picked from commit 0a3eb8855c)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gh-129994: update docs when using `dualstack_ipv6` in `socket.create_server` (GH-129996)
(cherry picked from commit 044a1e13d5)
Co-authored-by: Alexander Ershov <150328014+AEErshov@users.noreply.github.com>
gh-131885: Document that `dict.setdefault` and `dict.get` take no keyword arguments (GH-128208)
(cherry picked from commit edfbd8c062)
Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
gh-127541: Update os.walk example (GH-127765)
Update os.walk example to be more modern, skip `__pycache__` dirs rather than `CVS` dirs.
(cherry picked from commit a5949986d6)
Co-authored-by: Totosuki <116938397+totosuki@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
document that `sys._is_gil_enabled` is CPython-specific (GH-131748)
(cherry picked from commit ac12de2e6a)
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
gh-131417: Mention asyncio Future and Task in docs for generic classes list (GH-131422)
Mention asyncio Future and Task in docs for generic classes list
(cherry picked from commit 61b4b2c57c)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
gh-80421: Correct definitions of time (GH-130984)
Based on the Wikipedia article, UTC is better said to be a successor than a renaming of GTC and language agnostic rather than an English-French compromise.
(cherry picked from commit 98fa4a49fe)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
gh-123726: Document caveats of zipfile.Path around name sanitization (GH-130537)
Add a note to the `zipfile.Path` class documentation clarifying that it does not sanitize filenames. This emphasizes the caller's responsibility to validate or sanitize inputs, especially when handling untrusted ZIP archives, to prevent path traversal vulnerabilities. The note also references the `extract` and `extractall` methods for comparison and suggests using `os.path.abspath` and `os.path.commonpath` for safe filename resolution.
(cherry picked from commit a3990df612)
Co-authored-by: Affan Shaikhsurab <51104750+AffanShaikhsurab@users.noreply.github.com>
Update links from typing.readthedocs.io to typing.python.org (GH-130877)
(cherry picked from commit 4f6218959e)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
gh-129567: Add a note to `typing.TypedDict` docs about name mangling (GH-130233)
(cherry picked from commit 63ffb406bb)
Co-authored-by: sobolevn <mail@sobolevn.me>
Docs: Fix a misplaced statement in the document for `ServerProxy` (GH-130616)
The sentence "If an HTTPS URL ..." explains what the parameter means,
so moved it to the paragraph explaining what the other parameters mean.
(cherry picked from commit b26286ca49)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
gh-128481: indicate that the default value for `FrameSummary.end_lineno` changed in 3.13 (GH-130755)
The value taken by `FrameSummary.end_lineno` when passing `end_lineno=None` changed in gh-112097.
Previously, a `end_lineno` could be specified to be `None` directly but since 939fc6d, passing None makes
the constructor use the value of `lineno` instead.
(cherry picked from commit c6513f7a62)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Add link in the `importlib.metadata.version()` docs (GH-130739)
Link the specification for the returned data makes it clearer what this is
and what the format of the version string can be.
(cherry picked from commit c71e55869e)
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>