| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
|
|
|
|
| |
(GH-6032)
|
|
|
|
|
|
|
|
| |
(GH-1559) (GH-5954)
(cherry picked from commit 9ba3aa4d02a110d1a1ea464a8aff3be7dd9c63c3)
Co-authored-by: Erik Bray <erik.m.bray@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit bc3f2289b9007396bfb7f986bee477b6176c1822)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
|
|
|
|
|
|
|
| |
(GH-6004)
(cherry picked from commit 8a387219bdfb6ee34928d6168ac42ca559f11c9a)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like Python, IDLE optionally runs one startup file in the Shell window
before presenting the first interactive input prompt. For IDLE,
option -s runs a file named in environmental variable IDLESTARTUP or
PYTHONSTARTUP; -r file runs file. Python sets __file__ to the startup
file name before running the file and unsets it before the first
prompt. IDLE now does the same when run normally, without the -n
option.
(cherry picked from commit 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
| |
(GH-5701)
(cherry picked from commit 74382a3f175ac285cc924a73fd758e8dc3cc41bb)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Prevent low-grade poplib REDOS (CVE-2018-1060)
The regex to test a mail server's timestamp is susceptible to
catastrophic backtracking on long evil responses from the server.
Happily, the maximum length of malicious inputs is 2K thanks
to a limit introduced in the fix for CVE-2013-1752.
A 2KB evil response from the mail server would result in small slowdowns
(milliseconds vs. microseconds) accumulated over many apop calls.
This is a potential DOS vector via accumulated slowdowns.
Replace it with a similar non-vulnerable regex.
The new regex is RFC compliant.
The old regex was non-compliant in edge cases.
* Prevent difflib REDOS (CVE-2018-1061)
The default regex for IS_LINE_JUNK is susceptible to
catastrophic backtracking.
This is a potential DOS vector.
Replace it with an equivalent non-vulnerable regex.
Also introduce unit and REDOS tests for difflib.
Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)
|
|
|
|
|
| |
(cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
|
|
|
|
|
| |
The new code also runs faster.
(cherry picked from commit f0daa880a405c8de6743e44fa46006754aa145c9)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
encoding. (GH-5832). (GH-5906)
(cherry picked from commit 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 72d9b2be36f091793ae7ffc5ad751f040c6e6ad3)
Co-authored-by: Joffrey F <f.joffrey@gmail.com>
|
|
|
|
|
|
|
| |
(GH-4745)
(cherry picked from commit eee72d4778a5513038edd5236cdd87ccce2bc60a)
Co-authored-by: Tobotimus <Tobotimus@users.noreply.github.com>
|
|
|
|
|
| |
(#5504)" (#5911)
This reverts commit a71397fb6603d0fe673acd7765c74699cd28fe7b.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check
for recursion, and produce "..." if so.
test_recursive_repr(): Check for the string rather than a
RecursionError. (Test cannot be any tighter as contents are
implementation-dependent.)
test_deeply_nested_repr(): Add new test, replacing the original
test_recursive_repr(). It checks that a RecursionError is raised in
the case of a non-recursive but deeply nested structure. (Very
similar to what test_repr_deep() in test/test_dict.py does for a
normal dict.)
OrderedDictTests: Add new test case, to test behavior on OrderedDict
instances containing their own values() or items().
(cherry picked from commit d7773d92bd11640a8c950d6c36a9cef1cee36f96)
|
|
|
|
|
|
|
|
|
| |
The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
| |
The ssl module now detects missing NPN support in LibreSSL.
Co-Authored-By: Bernard Spil <brnrd@FreeBSD.org>
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 6cdb7954b0a578d899e4b78b868ea59eef08480a)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
| |
The SSL module no longer sends IP addresses in SNI TLS extension on
platforms with OpenSSL 1.0.2+ or inet_pton.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
| |
The 'optimization' is for space in the executable file, not for run time.
(cherry picked from commit 186b606d8a2ea4fd51b7286813302c8e8c7006cc)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change
TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to
make them pass on Debian.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
Adjust tests and user modules to match.
(cherry picked from commit c29c03a34a9f3c82704b66f323ce5ea9dc89c8af)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)
Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
|
|
|
|
| |
Python (GH-5756) (#5818)
|
|
|
|
|
|
| |
dump is similar to print but less flexible. lastopenbracketpos is now always initialized in _study2, as was stmt_bracketing, so the class settings are not needed. get_last_open_bracket_pos is never called.
(cherry picked from commit 451d1edaf4d27c4e632d81246d308e8dd6ea945f)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
| |
There are no code changes other than comments and docstrings.
(cherry picked from commit c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
Py_ADDRESS_IN_RANGE was renamed address_in_range in 3.6
(commit 3924f93794fd740c547b44884f73303196475cd5).
(cherry picked from commit ba518804bf4c1ea01df5e622b333d3116cbaa3bd)
Co-authored-by: Paul Price <price@astro.princeton.edu>
|
|
|
|
|
|
|
|
|
|
|
| |
os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.
Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
chunk is not found (GH-5240)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 6240917b773b52f8883387b9e3a5f327a4372068)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
|
|
|
|
| |
(cherry picked from commit 08a6926b2584040fe3c3f06263b0b5f1fbbdc24c)
Co-authored-by: Éric Araujo <merwok@netwok.org>
|
|
|
|
|
| |
(cherry picked from commit dfa015cf77a148d229ddc0a5b063562c9f9664f2)
Co-authored-by: chason <chason@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 9f4223261fd129ad7b9a09b2b0d625d1bb90b22b)
Co-authored-by: Kyle Altendorf <sda@fstab.net>
|
|
|
|
|
| |
(cherry picked from commit 5746510b7aef423fa4afc92b2abb919307b1dbb9)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
|
|
|
| |
(cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)
|
|
|
|
|
|
|
|
| |
module. (GH-5608). (#5654)
(cherry picked from commit da6c3da6c33c6bf794f741e348b9c6d86cc43ec5)
Co-authored-by: Segev Finer <segev208@gmail.com>
|
|
|
|
|
|
|
| |
Using the system and place-dependent default encoding for open()
is a bad idea for IDLE's system and location-independent files.
(cherry picked from commit 688722cedd6437910ff185ecf94fb3b749ad37f2)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-5639)
GUI test test_file_buttons() only looks at initial ascii-only lines,
but failed on systems where open() defaults to 'ascii' because
readline() internally reads and decodes far enough ahead to encounter
a non-ascii character in CREDITS.txt.
(cherry picked from commit f34e03ec0ea6a4cef8d966087c77e616c4a5893b)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
| |
The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.
(cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7)
Co-authored-by: SSE4 <tomskside@gmail.com>
|
|
|
|
|
|
| |
The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f40389c476d9240ec87a33da0373597c6af)
Co-authored-by: sblondon <sblondon@users.noreply.github.com>
|
|
|
|
|
| |
Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-5563)
Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process. This bug appears to have been introduced in 3.4 with the inheritable file descriptors support.
This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions). `ioctl` is not a POSIX async-signal-safe approved function.
ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
(cherry picked from commit c1e46e94de38a92f98736af9a42d89c3975a9919)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
property (GH-5542)
When `__getattr__` is implemented, attribute lookup will always fall back to that,
even if the initial failure comes from `__getattribute__` or a descriptor's `__get__`
method (including property methods).
(cherry picked from commit d1f318105b8781b01f3507d5cb0fd841b977d5f2)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-5538)
Add new entries to the widget list.
(cherry picked from commit 845d86485e35a26478aedb3dc127d632fdc65759)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.
https://bugs.python.org/issue32303
https://bugs.python.org/issue32305.
(cherry picked from commit bbbcf8693b876daae4469765aa62f8924f39a7d2)
Co-authored-by: Barry Warsaw <barry@python.org>
|
|
|
|
|
|
|
| |
(#5502)
(cherry picked from commit d41e9e0952393e64f2f9756d778553d704191086)
|
|
|
|
|
|
|
|
|
| |
…rning (GH-5265) (GH-5500)
Modify RE examples in documentation to use raw strings to prevent DeprecationWarning.
Add text to REGEX HOWTO to highlight the deprecation. Approved by Serhiy Storchaka.
(cherry picked from commit 66771422d0541289d0b1287bc3c28e8b5609f6b4)
|
|
|
|
|
|
|
|
| |
(GH-4570) (GH-4689)
instead of crashing due to a stack overflow.
This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad243c965d4432b4e93884064001a2607)
|