Some missing words; some odd word choices.
(cherry picked from commit ee8e7c2fa9)
Co-authored-by: Scott Noyes <snoyes@gmail.com>
Co-authored-by: Scott Noyes <snoyes@gmail.com>
* clearly document that ":GH-X" string formatting results in "0X..."
* put back the "serial comma"
(cherry picked from commit 92ceb1c840)
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
* Set content-length for simple http server 301s
When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.
* Test Content-Length on simple http server redirect
When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.
* Add news entry for SimpleHTTPRequestHandler fix
* Clarify the specific kind of 301
Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
(cherry picked from commit fb42725561)
Co-authored-by: Stephen Rosen <sirosen@globus.org>
Contributed-By: Matthias Klose
Automerge-Triggered-By: GH:tiran
(cherry picked from commit da5c808fb5)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 47895e31b6)
Co-authored-by: Gen Xu <xgbarry@gmail.com>
The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d45ac. However,
updating test_socket.CANTest.testSendFrame was missed as part of the
change, so the test incorrectly attempts to index past the last tuple
item to retrieve the address family.
This removes the now-redundant check for equality against socket.AF_CAN,
as the tuple will not contain the address family.
(cherry picked from commit 355bae8882)
Co-authored-by: karl ding <karlding@users.noreply.github.com>
This documents in the tutorial docs the behavior of a finally clause in
case it should re-raise an exception but contains a
return/break/continue statement.
(cherry picked from commit a0b9915a8b)
Co-authored-by: Roberto Hueso <robertohueso96@gmail.com>
This adds IO, TextIO, BinaryIO, Match, and Pattern.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit b115579734)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Since WPAR and LPAR both have a builddate for teh fileset bos.rte
The name of the fileset checked is modified.
To prevent a similiar situation (no builddate in ODM) a value
sufficient for pep425 activity if retrieved buildate is zero or NULL
Patch by M Felt.
(cherry picked from commit 5017cde20e)
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
The code was updated in
0ec88b33d0
but the docstring was left untouched.
=> updated the docstring to reflect the code changes
(cherry picked from commit d4222ea6b0)
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
Accessing the following attributes will now fire PEP 578 style audit hooks as (object.__getattr__, obj, name):
* PyTracebackObject: tb_frame
* PyFrameObject: f_code
* PyGenObject: gi_code, gi_frame
* PyCoroObject: cr_code, cr_frame
* PyAsyncGenObject: ag_code, ag_frame
Narrow search to match contents of SDKs, namely only files in ``/System/Library``,
``/System/IOSSupport``, and ``/usr`` other than ``/usr/local``. Previously,
anything under ``/System`` was assumed to be in an SDK which causes problems
with the new file system layout in 10.15+ where user file systems may appear
to be mounted under ``/System``. Paths in ``/Library`` were also
incorrectly treated as SDK locations.
Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit d52bbde942)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Reverts commit e653d4d8e8 and makes
parsing even more strict. Like socket.inet_pton() any leading zero
is now treated as invalid input.
Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 60ce8f0be6)
Embedded nulls would cause a ValueError to be raised. Thanks go to Eryk Sun for their analysis.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 73766b0341)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This allows reliably forcing macOS universal2 framework builds
to run under Rosetta 2 Intel-64 emulation on Apple Silicon Macs
if needed for testing or when universal2 wheels are not yet
available.
(cherry picked from commit 0cb33da1cc)
Co-authored-by: Ned Deily <nad@python.org>
Automerge-Triggered-By: GH:ned-deily
Fixing callback for lambda when no return value is provided
(cherry picked from commit 50c21ad353)
Co-authored-by: Shreyash Sharma <shreyash.sharma@philips.com>
Co-authored-by: Shreyash Sharma <shreyash.sharma@philips.com>
Links for 'raise Exception from x' target to 'The raise statement' (7.8) section instead of 'The import statement' (7.11) section.
There are more modified links than in the bug report because I searched some other ones which can get the same improvement.
(cherry picked from commit 2fd928c8c1)
Co-authored-by: sblondon <sblondon@users.noreply.github.com>
Fix test_logging.test_namer_rotator_inheritance() on Windows: use
os.replace() rather than os.rename().
(cherry picked from commit fe52eb6219)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>