| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
The GDB provided by HPE on HP-UX contains a modified version string. Therefore
the tests fail. Adapt the regex to match that string.
Patch by Michael Osipov.
Co-Authored-by: Michael Osipov <michael.osipov@siemens.com>
(cherry picked from commit b2dca49ca3769cb60713f5c2b43e5d5bbdc1f9c7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20787)
test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.
* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
test.support. Make its verbose parameter optional: verbose=False by
default.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().
(cherry picked from commit f6e58aefde2e57e4cb11ea7743955da53a3f1e80)
(cherry picked from commit 4a4f660cfde8b683634c53e6214a6baa51de43b1)
|
|
|
|
|
| |
precisions (GH-20747)
This reverts commit b6271025c640c228505dc9f194362a0c2ab81c61.
|
|
|
|
|
| |
(cherry picked from commit 68874a8502da440a1dc4746cf73262648b870aee)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
|
|
|
|
|
|
| |
(GH-20466)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit c116c94ff119485761460f1033cdee425bed0310)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-40807: Show warnings once from codeop._maybe_compile
* Move catch_warnings
* news
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 052d3fc0907be253cfd64b2c737a0b0aca586011)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
| |
A tiny sliver of a 3.9 PEG parser patch needed to backport the test added by #20486.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579)
Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception.
Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup
these functions.
(cherry picked from commit c353764fd564e401cf47a5d9efab18c72c60014e)
* bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)
my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for
pending signals, rather calling PyOS_InterruptOccurred().
my_fgets() is called with the GIL released, whereas
PyOS_InterruptOccurred() must be called with the GIL held.
test_repl: use text=True and avoid SuppressCrashReport in
test_multiline_string_parsing().
Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.
(cherry picked from commit fa7ab6aa0f9a4f695e5525db5a113cd21fa93787)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
encoded-words. (gh-17620)
* bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.
It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes. The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding). This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed904f734be9f195ae1274eb81426a9e776)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
|
|
|
| |
require `_generate_next_value_` to be defined before members
|
|
|
|
|
|
| |
Disallow CR or LF in email.headerregistry.Address arguments to guard against header injection attacks.
(cherry picked from commit 614f17211c5fc0e5b828be1d3320661d1038fe8f)
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit 574547a75c79b506261520c5773ae08a1dcea1b9)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
| |
(cherry picked from commit db098bc1f05bd0773943e59f83489f05f28dedf8)
Co-authored-by: idomic <michael.ido@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-20419)
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316f4c6ab451997902579aa69020b537c)
|
|
|
|
|
| |
(cherry picked from commit c73914a562580ae72048876cb42ed8e76e2c83f9)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
|
|
|
|
|
|
|
| |
ast_unparse.c (GH-20156). (GH-20191)
(cherry picked from commit 2135e10dc717c00d10d899d232bebfc59bb25032)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Ifdef is not necessary, as AF_INET6 is supported from Windows Vista, and other code in overlapped.c uses AF_INET6 and is not ifdef'd.
Change the raised exception so users are not fooled to think it comes from Windows API.
Automerge-Triggered-By: @njsmith
(cherry picked from commit 442634c42fcaf31c636f693951a97734042c3e7b)
Co-authored-by: Kjell Braden <afflux@pentabarf.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
consistently (gh-20038) (gh-20084)
raw_data_manager (default for EmailPolicy, EmailMessage)
does correct wrapping of 'text' parts as long as the message contains
characters outside of 7bit US-ASCII set: base64 or qp
Content-Transfer-Encoding is applied if the lines would be too long
without it. It did not, however, do this for ascii-only text,
which could result in lines that were longer than
policy.max_line_length or even the rfc 998 maximum.
This changeset fixes the heuristic so that if lines are longer than
policy.max_line_length, it will always apply a
content-transfer-encoding so that the lines are wrapped correctly.
(cherry picked from commit 6f2f475d5a2cd7675dce844f3af436ba919ef92b)
Co-authored-by: Arkadiusz Hiler <arek.l1@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clarify the zip built-in docstring.
This puts much simpler text up front along with an example.
As it was, the zip built-in docstring was technically correct. But too
technical for the reader who shouldn't _need_ to know about `__next__` and
`StopIteration` as most people do not need to understand the internal
implementation details of the iterator protocol in their daily life.
This is a documentation only change, intended to be backported to 3.8; it is
only tangentially related to PEP-618 which might offer new behavior options
in the future.
Wording based a bit more on enumerate per Brandt's suggestion.
This gets rid of the legacy wording paragraph which seems too tied to
implementation details of the iterator protocol which isn't relevant here.
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 6a5d3ff67644af42b1a781be2eacb2e82913441c)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
| |
(cherry picked from commit 2668a9a5aa506a048aef7b4881c8dcf6b81c6870)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
nodes (GH-19868)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit c21c51235aa8061da6b0593d6f857f42fd92fd8b)
Co-authored-by: Curtis Bucher <cpbucher5@gmail.com>
|
|
|
|
|
|
|
| |
Don't define shared memory block's name in test_shared_memory_across_processes():
use SharedMemory(create=True) instead.
(cherry picked from commit caa3ef284a2e5e5b9bdd6a9e619804122c842d80)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
|
|
|
|
|
| |
(GH-19720) (GH-19857)
(cherry picked from commit 6292be7adf247589bbf03524f8883cb4cb61f3e9)
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-19835)
The constant values of future flags in the __future__ module
is updated in order to prevent collision with compiler flags.
Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing
with CO_FUTURE_DIVISION..
(cherry picked from commit 4454057269b995341b04d13f0bf97f96080f27d0)
Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
| |
test_gdb and test.pythoninfo now check gdb command exit code.
(cherry picked from commit ec9bea4a3766bd815148a27f61eb24e7dd459ac7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
| |
Log "Warning -- ..." test warnings into sys.__stderr__ rather than
sys.stderr, to ensure to display them even if sys.stderr is captured.
test.libregrtest.utils.print_warning() now calls
test.support.print_warning().
(cherry picked from commit d663d34685e18588748569468c672763f4c73b3e)
|
|
|
|
|
|
|
|
|
|
| |
It is possible to use either '-isysroot /some/path' (with a space) or
'-isysroot/some/path' (no space in between). Support both forms in
places where special handling of -isysroot is done, rather than just
the first form.
Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit b310700976524b4b99ee319c947ca40468716fc9)
Co-authored-by: Joshua Root <jmr@macports.org>
|
|
|
|
|
| |
Fix the Windows implementation of os.waitpid() for exit code
larger than "INT_MAX >> 8". The exit status is now interpreted as an
unsigned number.
|
|
|
|
|
|
| |
https://bugs.python.org/issue39942
(cherry picked from commit a25a04fea5446b1712cde0cff556574be139285a)
Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
|
|
|
|
|
|
|
|
| |
The item size must be checked after encoding to bytes, not before.
Automerge-Triggered-By: @pitrou.
(cherry picked from commit eba9f6155df59c9beed97fb5764c9f01dd941af0)
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
|
|
|
|
| |
(cherry picked from commit 9b0b5d2baebd0b6a545317200c313a6a7408731e)
Co-authored-by: Barry <barry@barrys-emacs.org>
|
|
|
|
|
|
|
| |
(GH-19583)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
(cherry picked from commit 12446e6a605f066d837d3a595d0a73e4f3b43b65)
|
|
|
|
|
|
| |
It has not returned the file position after the seek.
(cherry picked from commit 485e715cb1ff92bc9882cd51ec32589f9cb30503)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
| |
(cherry picked from commit 5565c30f0b25996a0e73477fc0e1e1aced52b926)
Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-39667: Sync zipp 3.0 (GH-18540)
* bpo-39667: Improve pathlib.Path compatibility on zipfile.Path and correct performance degradation as found in zipp 3.0
* 📜🤖 Added by blurb_it.
* Update docs for new zipfile.Path.open
* Rely on dict, faster than OrderedDict.
* Syntax edits on docs
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0aeab5c4381f0cc11479362af2533b3a391312ac)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Clarify the change in behavior with a couple of workaround options.
* Restore API compatibility while backporting performance improvements.
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
| |
comments (GH-19488)
(cherry picked from commit d42e5820631cd66ee1eab8f610d4b58f3dfdd81c)
Co-authored-by: Barry <barry@barrys-emacs.org>
|
|
|
|
|
| |
(cherry picked from commit 96515e9f6785328c52ebc5d4ce60e0087a9adc2d)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-37531: regrtest now catchs ProcessLookupError (GH-16827)
Fix a warning on a race condition on TestWorkerProcess.kill(): ignore
silently ProcessLookupError rather than logging an useless warning.
(cherry picked from commit a661392f8fb5ac4fc095aa1845d1eb7a25c4e9be)
* bpo-38502: regrtest uses process groups if available (GH-16829)
test.regrtest now uses process groups in the multiprocessing mode
(-jN command line option) if process groups are available: if
os.setsid() and os.killpg() functions are available.
(cherry picked from commit ecb035cd14c11521276343397151929a94018a22)
* bpo-37957: Allow regrtest to receive a file with test (and subtests) to ignore (GH-16989)
When building Python in some uncommon platforms there are some known tests that will fail. Right now, the test suite has the ability to ignore entire tests using the -x option and to receive a filter file using the --matchfile filter. The problem with the --matchfile option is that it receives a file with patterns to accept and when you want to ignore a couple of tests and subtests, is too cumbersome to lists ALL tests that are not the ones that you want to accept and he problem with -x is that is not easy to ignore just a subtests that fail and the whole test needs to be ignored.
For these reasons, add a new option to allow to ignore a list of test and subtests for these situations.
(cherry picked from commit e0cd8aa70a3ce19c3d3712568940aa0cbd9aa97b)
* regrtest: log timeout at startup (GH-19514)
Reduce also worker timeout.
(cherry picked from commit 4cf65a630a8d45bad3fe5cdc4c2632ec64e7ba27)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
_elementtree.XMLParser object (GH-3997) (GH-19485)
(cherry picked from commit 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527)
|
|
|
|
|
|
|
| |
variables (GH-19391) (GH-19394)
(cherry picked from commit 799d7d61a91eb0ad3256ef9a45a90029cef93b7c)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
test_builtin.PtyTests now registers an handler for SIGHUP signal.
Closing the PTY file descriptor can emit a SIGHUP signal: just ignore
it.
run_child() now also closes the PTY file descriptor before waiting
for the process completition, otherwise the test hangs on AIX.
(cherry picked from commit 7a51a7e19f0143f75f8fc9ff68f93ed40937aec6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.
AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 0b297d4ff1c0e4480ad33acae793fbaf4bf015b4)
|
|
|
|
|
| |
(cherry picked from commit 3ef4a7e5a7c29e17d5152d1fa6ceeb1fee269699)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
|
|
| |
Running `test_socket` or anything that depends on it (like python -m
test.pythoninfo) crashes if IOCTL_VM_SOCKETS_GET_LOCAL_CID does not
exist in the socket module.
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 6eb9619c88612565b424be14196a8adae6d51978)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
test_gdb now skips tests if it detects that gdb failed to read debug
information because the Python binary is optimized.
(cherry picked from commit 7bf069b6110278102c8f4719975a5eb5a5af25f9)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 63ba5cccf484b9ec23dfbf4cf7ffdc833eda98c3)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
| |
whose loader has a get_data method (GH-17385)
This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
(cherry picked from commit e0b8101492f6c61dee831425b4d3dae39a953599)
Co-authored-by: Peter Donis <peterdonis@alum.mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-9516) (GH-19110)
* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS
This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.
Leaving the environment variable present may lead to misbehaviour when
launching other scripts.
* Actually commit the changes for issue 22490...
* Correct typo
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
* Run make patchcheck
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
(cherry picked from commit 044cf94f610e831464a69a8e713dad89878824ce)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
|
|
|
|
|
|
|
|
| |
(GH-19060) (GH-19090)
test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.
Sort test_site imports.
|
|
|
|
|
|
|
|
| |
(GH-18968)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 9052f7a41b90f2d34011c8da68f9a4facebc8a97)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
|