The previous test_spawn_doesnt_hang test had a few problems:
* It would cause ENV CHANGED failures if other tests were running
concurrently due to stty changes
* Typing while the test was running could cause it to fail
(cherry picked from commit c0c65141b3)
Co-authored-by: Sam Gross <colesbury@gmail.com>
The CGI server on Windows could consume the amount of memory specified
in the Content-Length header of the request even if the client does not
send such much data. Now it reads the POST request body by chunks,
therefore the memory consumption is proportional to the amount of sent
data.
(cherry picked from commit 4172644d78)
Difference from the original commit: the default in 3.14 is to use
the simpler original protocol (except for filenames with newlines).
Co-authored-by: Petr Viktorin <encukou@gmail.com>
The initialization during `mod_exec` wasn't thread-safe with multiple interpreters.
(cherry picked from commit 2dac9e6016)
Co-authored-by: Alper <alperyoney@fb.com>
gh-129483: Make `TestLocalTimeDisambiguation`'s time format locale independent (GH-142193)
* Change to update %c to the exact time format.
---------
(cherry picked from commit 8392095bf9)
Co-authored-by: Kir Chou <148194051+gkirchou@users.noreply.github.com>
Co-authored-by: Kir Chou <note351@hotmail.com>
* gh-141004: Add a CI job ensuring that new C APIs include documentation (GH-142102)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 1a7824a927)
---------
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Much of the information was duplicated in stdtypes.rst; this PR keeps
lexical/syntactical details in Lexical Analysis and the evaluation & runtime
behaviour in Standard types, with cross-references between the two.
Since the t-string section only listed differences from f-strings, and the
grammar for the two is equivalent, that section was moved to Standard types
almost entirely.
(cherry picked from commit aea5531583)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242)
(cherry picked from commit c5252045d3)
Co-authored-by: Brett Cannon <brett@python.org>
This fixes a regression introduced in gh-140558. The interpreter would
crash if we inserted a non `str` key into a split table that matches an
existing key.
(cherry picked from commit 547d8daf78)
Co-authored-by: Sam Gross <colesbury@gmail.com>
gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146)
* Remove quadratic behavior in node ID cache clearing
* Add news fragment
---------
(cherry picked from commit 08d8e18ad8)
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
This simplifies the Lexical Analysis section on Names (but keeps it technically correct) by putting all the info about non-ASCII characters in a separate (and very technical) section.
It uses a mental model where the parser doesn't handle Unicode complexity “immediately”, but:
- parses any non-ASCII character (outside strings/comments) as part of a name, since these can't (yet) be e.g. operators
- normalizes the name
- validates the name, using the xid_start/xid_continue sets
(cherry picked from commit 2ff8608b4d)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
gh-59000: Fix pdb breakpoint resolution for class methods when module not imported (GH-141949)
(cherry picked from commit 5e58548ebe)
Co-authored-by: LloydZ <35182391+cocolato@users.noreply.github.com>
The GC for the free threaded build would get slower with each collection due
to effectively double counting objects freed by the GC.
(cherry picked from commit eb892868b3)
Co-authored-by: Kevin Wang <kevmo314@gmail.com>
gh-141004: Document descriptor and dict proxy type objects (GH-141803)
(cherry picked from commit 52f9b5f580)
Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Reading a specially prepared small Plist file could cause OOM because file's
read(n) preallocates a bytes object for reading the specified amount of
data. Now plistlib reads large data by chunks, therefore the upper limit of
consumed memory is proportional to the size of the input file.
(cherry picked from commit 694922cf40)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
The CGI server on Windows could consume the amount of memory specified
in the Content-Length header of the request even if the client does not
send such much data. Now it reads the POST request body by chunks,
so that the memory consumption is proportional to the amount of sent
data.
gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101)
Document not calling Popen.wait after Popen.communicate times out.
Closes GH-141473
(cherry picked from commit 3e2c557493)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
gh-142067: Add missing default value for param in `multiprocessing.Pipe`'s doc (GH-142109)
(cherry picked from commit 229ed3dd1f)
Co-authored-by: flovent <flbven@protonmail.com>
GH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows. (GH-142043)
* do not build the jit stencils twice in case of PGO builds on Windows
* blurb it
(cherry picked from commit f2ca1581ca)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
GH-91636: Clear weakrefs created by finalizers. (GH-136401)
Weakrefs to unreachable garbage that are created during running of
finalizers need to be cleared. This avoids exposing objects that
have `tp_clear` called on them to Python-level code.
(cherry picked from commit b6b99bf7f1)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Docs: multi-disk ZIP files -> multipart ZIP files (GH-141962)
* Remove some old currentlies
* multi-disk -> multipart
* Sentence case headings
(cherry picked from commit 890fe5aad5)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-141994: Warn of XXE vulnerability in documentation of SAX feature `xml.sax.handler.feature_external_ges` (GH-141996)
Doc/library/xml.sax.handler.rst: Warn of XXE with feature_external_ges
Related to commit baa9f33897
(cherry picked from commit 440bcb9456)
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>