Docs: Migrate entirely to PSF hosted plausible for analytics (GH-132648)
(cherry picked from commit 1d529cbc89)
Co-authored-by: Ee Durbin <ewdurbin@gmail.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>
* 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: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
* gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192)
(cherry picked from commit c0de650024)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
* make regen-sbom
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-130521: Add Open Graph meta tags to template pages (GH-130523)
(cherry picked from commit f5639d87f5)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit ad6a032ceb)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.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-107674: Avoid allocating boxed ints for `sys.settrace` line events (GH-107780)
(cherry picked from commit 37d8b904f8)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Fix numbered list syntax in programming.rst (GH-130158)
(cherry picked from commit 376631829a)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911)
(cherry picked from commit a126cefc17)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
gh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (GH-131909)
(cherry picked from commit 16a6270aa6)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
gh-130655: Add tests for `gettext.find()` (GH-130691)
(cherry picked from commit 3118693a1a)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Now all structure members are initialized with zeroes by default.
(cherry picked from commit 345baa77ba)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
When replace() method is called on a subclass of datetime, date or time,
properly call derived constructor. Previously, only the base class's
constructor was called.
Also, make sure to pass non-zero fold values when creating subclasses in
various methods. Previously, fold was silently ignored.
(cherry picked from commit 46190d9ea8)
Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668) (GH-131977)
gh-111178: Fix getsockaddrarg() undefined behavior (GH-131668)
Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.
On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.
(cherry picked from commit c318a03b17)
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 8cd29c2b53)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-131736: only apply `security_level` workaround in `test_ssl` for security levels greater than 1 (GH-131739)
(cherry picked from commit 3b3720f1a2)
Co-authored-by: Will Childs-Klein <willck93@gmail.com>
Minor improvements to the programming FAQ (GH-127261)
(cherry picked from commit 23a658b9af)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@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-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (GH-131866)
When using --with-dtrace the resulting object file could be missing
specific CFLAGS exported by the build system due to the systemtap
script using specific defaults.
Exporting the CC and CFLAGS variables before the dtrace invocation
allows us to properly apply CFLAGS exported by the build system
even when cross-compiling.
The fix does not affect the dtrace invocation on Solaris/macOS.
(cherry picked from commit 0cd4befb02)
Co-authored-by: stratakis <cstratak@redhat.com>
gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when concurrent mutations happen (#127964)
We fix a use-after-free in the `find`, `findtext` and `findall` methods of `xml.etree.ElementTree.Element`
objects that can be triggered when the tag to find implements an `__eq__` method that mutates the
element being queried.
(cherry picked from commit c57623c221)
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-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>