]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-39041: Add GitHub Actions badge to README.rst (GH-17628)
Steve Dower [Mon, 16 Dec 2019 19:15:08 +0000 (11:15 -0800)] 
bpo-39041: Add GitHub Actions badge to README.rst (GH-17628)

Also skip build for doc-only changes and enable on push

5 years agobpo-39041: Add GitHub Actions support (GH-17594)
Steve Dower [Mon, 16 Dec 2019 18:35:22 +0000 (10:35 -0800)] 
bpo-39041: Add GitHub Actions support (GH-17594)

5 years agobpo-38348: Extend command line options of ast parsing tool (GH-16540)
Batuhan Taşkaya [Mon, 16 Dec 2019 18:23:27 +0000 (21:23 +0300)] 
bpo-38348: Extend command line options of ast parsing tool (GH-16540)

Add -i and --indent (indentation level), and --no-type-comments
(type comments) command line options to ast parsing tool.

5 years agobpo-38870: Remove dead code related with argument unparsing (GH-17613)
Batuhan Taşkaya [Mon, 16 Dec 2019 12:26:58 +0000 (15:26 +0300)] 
bpo-38870: Remove dead code related with argument unparsing (GH-17613)

5 years agobpo-38811: Check for presence of os.link method in pathlib (GH-17225)
Toke Høiland-Jørgensen [Mon, 16 Dec 2019 12:23:55 +0000 (13:23 +0100)] 
bpo-38811: Check for presence of os.link method in pathlib (GH-17225)

Commit 6b5b013bcc22 ("bpo-26978: Implement pathlib.Path.link_to (Using
os.link) (GH-12990)") introduced a new link_to method in pathlib. However,
this makes pathlib crash when the 'os' module is missing a 'link' method.

Fix this by checking for the presence of the 'link' method on pathlib
module import, and if it's not present, turn it into a runtime error like
those emitted when there is no lchmod() or symlink().

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
5 years agoAdd tests and design notes for Counter subset/superset operations. (GH-17625)
Raymond Hettinger [Mon, 16 Dec 2019 09:54:14 +0000 (01:54 -0800)] 
Add tests and design notes for Counter subset/superset operations. (GH-17625)

5 years agobpo-39033: Fix NameError in zipimport during hash validation (GH-17588)
Xtreak [Sun, 15 Dec 2019 23:34:12 +0000 (05:04 +0530)] 
bpo-39033: Fix NameError in zipimport during hash validation (GH-17588)

Patch by Karthikeyan Singaravelan.

5 years ago bpo-38316: Fix co_stacksize documentation (GH-16983)
Batuhan Taşkaya [Sun, 15 Dec 2019 22:02:47 +0000 (01:02 +0300)] 
 bpo-38316: Fix co_stacksize documentation (GH-16983)

5 years agobpo-38629: implement __floor__ and __ceil__ for float type (GH-16985)
Batuhan Taşkaya [Sun, 15 Dec 2019 22:00:28 +0000 (01:00 +0300)] 
bpo-38629: implement __floor__ and __ceil__ for float type (GH-16985)

5 years agoThe comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586)
Guido van Rossum [Sun, 15 Dec 2019 18:00:33 +0000 (10:00 -0800)] 
The comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586)

Automerge-Triggered-By: @gvanrossum
5 years agobpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)
Michael Felt [Sun, 15 Dec 2019 14:17:53 +0000 (15:17 +0100)] 
bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)

Provides a richer platform tag for AIX that we expect to be sufficient for PEP 425
binary distribution identification. Any backports to earlier Python versions will be
handled via setuptools.

Patch by Michael Felt.

5 years agobpo-39035: travis: Don't use beta group (GH-17602)
Inada Naoki [Sat, 14 Dec 2019 11:10:15 +0000 (20:10 +0900)] 
bpo-39035: travis: Don't use beta group (GH-17602)

5 years agoFix typo in site module (GH-17597)
Daniel Andersson [Sat, 14 Dec 2019 10:37:58 +0000 (11:37 +0100)] 
Fix typo in site module (GH-17597)

5 years agoFix elif start column offset when there is an else following (GH-17596)
Lysandros Nikolaou [Sat, 14 Dec 2019 10:24:57 +0000 (11:24 +0100)] 
Fix elif start column offset when there is an else following (GH-17596)

5 years agoAdd PYTHONUTF8 to commandline usage. (GH-17587)
Inada Naoki [Sat, 14 Dec 2019 05:27:32 +0000 (14:27 +0900)] 
Add PYTHONUTF8 to commandline usage. (GH-17587)

Co-Authored-By: Victor Stinner <vstinner@python.org>
5 years agobpo-36406: Handle namespace packages in doctest (GH-12520)
Xtreak [Fri, 13 Dec 2019 18:06:53 +0000 (23:36 +0530)] 
bpo-36406: Handle namespace packages in doctest (GH-12520)

5 years agobpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt...
Lysandros Nikolaou [Thu, 12 Dec 2019 21:40:21 +0000 (22:40 +0100)] 
bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt (GH-17582)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal
5 years agoFix warnings in test_asyncio.test_base_events (#17577)
Kyle Stanley [Thu, 12 Dec 2019 13:48:20 +0000 (08:48 -0500)] 
Fix warnings in test_asyncio.test_base_events (#17577)

Co-authored-by: tirkarthi
5 years agobpo-38614: Use support timeout constants (GH-17572)
Victor Stinner [Wed, 11 Dec 2019 21:17:04 +0000 (22:17 +0100)] 
bpo-38614: Use support timeout constants (GH-17572)

5 years agobpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)
Victor Stinner [Wed, 11 Dec 2019 10:30:03 +0000 (11:30 +0100)] 
bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)

Replace hardcoded timeout constants in tests with SHORT_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

SHORT_TIMEOUT is 30 seconds by default, but it can be longer
depending on --timeout command line option.

The change makes almost all timeouts longer, except
test_reap_children() of test_support which is made 2x shorter:
SHORT_TIMEOUT should be enough. If this test starts to fail,
LONG_TIMEOUT should be used instead.

Uniformize also "from test import support" import in some test files.

5 years agobpo-39022, bpo-38594: Sync with importlib_metadata 1.3 (GH-17568)
Jason R. Coombs [Wed, 11 Dec 2019 01:05:10 +0000 (20:05 -0500)] 
bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 (GH-17568)

* bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 including improved docs for custom finders and better serialization support in EntryPoints.

* 📜🤖 Added by blurb_it.

* Correct module reference

5 years agobpo-39012: Fix RC version suffix for nuget release files (GH-17564)
Steve Dower [Tue, 10 Dec 2019 23:19:03 +0000 (15:19 -0800)] 
bpo-39012: Fix RC version suffix for nuget release files (GH-17564)

5 years agobpo-38614: Use test.support.INTERNET_TIMEOUT constant (GH-17565)
Victor Stinner [Tue, 10 Dec 2019 21:09:23 +0000 (22:09 +0100)] 
bpo-38614: Use test.support.INTERNET_TIMEOUT constant (GH-17565)

Replace hardcoded timeout constants in tests with INTERNET_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

5 years agobpo-38614: Use test.support.LONG_TIMEOUT constant (GH-17562)
Victor Stinner [Tue, 10 Dec 2019 20:12:26 +0000 (21:12 +0100)] 
bpo-38614: Use test.support.LONG_TIMEOUT constant (GH-17562)

Replace hardcoded timeout constants in tests with LONG_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

LONG_TIMEOUT is 5 minutes by default, but it can be longer depending
on --timeout command line option.

5 years agobpo-38614: Use default join_thread() timeout in tests (GH-17559)
Victor Stinner [Tue, 10 Dec 2019 19:41:23 +0000 (20:41 +0100)] 
bpo-38614: Use default join_thread() timeout in tests (GH-17559)

Tests no longer pass a timeout value to join_thread() of
test.support: use the default join_thread() timeout instead
(SHORT_TIMEOUT constant of test.support).

5 years agobpo-38614: Use test.support.LOOPBACK_TIMEOUT constant (GH-17554)
Victor Stinner [Tue, 10 Dec 2019 19:32:59 +0000 (20:32 +0100)] 
bpo-38614: Use test.support.LOOPBACK_TIMEOUT constant (GH-17554)

Replace hardcoded timeout constants in tests with LOOPBACK_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

5 years agoMinor fixes to the NEWS entries (GH-17556)
Pablo Galindo [Tue, 10 Dec 2019 16:09:58 +0000 (16:09 +0000)] 
Minor fixes to the NEWS entries (GH-17556)

5 years agobpo-39004: increment large sendfile() test timeout (GH-17552)
Giampaolo Rodola [Tue, 10 Dec 2019 09:31:06 +0000 (17:31 +0800)] 
bpo-39004: increment large sendfile() test timeout (GH-17552)

5 years agoFix Windows release builds (GH-17550)
Steve Dower [Tue, 10 Dec 2019 05:10:22 +0000 (21:10 -0800)] 
Fix Windows release builds (GH-17550)

5 years agoClean imports in test_unparse (GH-17545)
Pablo Galindo [Tue, 10 Dec 2019 00:37:47 +0000 (00:37 +0000)] 
Clean imports in test_unparse (GH-17545)

5 years agobpo-38943: Fix IDLE autocomplete window not always appearing (GH-17416)
JohnnyNajera [Tue, 10 Dec 2019 00:30:01 +0000 (02:30 +0200)] 
bpo-38943: Fix IDLE autocomplete window not always appearing (GH-17416)

This has happened on some versions of Ubuntu.

5 years agobpo-38944: Escape key now closes IDLE completion windows. (GH-17419)
JohnnyNajera [Mon, 9 Dec 2019 23:22:16 +0000 (01:22 +0200)] 
bpo-38944: Escape key now closes IDLE completion windows. (GH-17419)

5 years agobpo-39009: Fix typo in test__locale (GH-17544)
Tim Gates [Mon, 9 Dec 2019 22:16:01 +0000 (09:16 +1100)] 
bpo-39009: Fix typo in test__locale (GH-17544)

5 years agobpo-27961: Replace PY_ULLONG_MAX with ULLONG_MAX (GH-17539)
Sergey Fedoseev [Mon, 9 Dec 2019 20:22:19 +0000 (01:22 +0500)] 
bpo-27961: Replace PY_ULLONG_MAX with ULLONG_MAX (GH-17539)

5 years agobpo-39007: Add auditing events to functions in winreg (GH-17541)
Steve Dower [Mon, 9 Dec 2019 19:18:12 +0000 (11:18 -0800)] 
bpo-39007: Add auditing events to functions in winreg (GH-17541)

Also allows winreg.CloseKey() to accept same types as other functions.

5 years agobpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a deprecation...
Steve Dower [Mon, 9 Dec 2019 19:05:39 +0000 (11:05 -0800)] 
bpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a deprecation warning (GH-17540)

5 years agobpo-39003: Make sure all test are the same when using -R in test_unparse (GH-17537)
Pablo Galindo [Mon, 9 Dec 2019 17:57:50 +0000 (17:57 +0000)] 
bpo-39003: Make sure all test are the same when using -R in test_unparse (GH-17537)

5 years agobpo-39002: Fix simple typo: tranlation -> translation (GH-17517)
Tim Gates [Mon, 9 Dec 2019 17:42:17 +0000 (04:42 +1100)] 
bpo-39002: Fix simple typo: tranlation -> translation (GH-17517)

5 years agoFix APPX registry key generation (GH-17489)
Steve Dower [Mon, 9 Dec 2019 16:43:13 +0000 (08:43 -0800)] 
Fix APPX registry key generation (GH-17489)

5 years agobpo-20443: No longer make sys.argv[0] absolute for script (GH-17534)
Victor Stinner [Mon, 9 Dec 2019 16:34:02 +0000 (17:34 +0100)] 
bpo-20443: No longer make sys.argv[0] absolute for script (GH-17534)

In Python 3.9.0a1, sys.argv[0] was made an asolute path if a filename
was specified on the command line. Revert this change, since most
users expect sys.argv to be unmodified.

5 years agobpo-34776: Fix dataclasses to support __future__ "annotations" mode (#9518)
Yury Selivanov [Mon, 9 Dec 2019 14:54:20 +0000 (09:54 -0500)] 
bpo-34776: Fix dataclasses to support __future__ "annotations" mode (#9518)

5 years agobpo-38992: avoid fsum test failure from constant-folding (GH-17513)
Mark Dickinson [Mon, 9 Dec 2019 14:36:34 +0000 (08:36 -0600)] 
bpo-38992: avoid fsum test failure from constant-folding (GH-17513)

* Issue 38992: avoid fsum test failure

* Add NEWS entry

5 years agobpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR (#17311)
Kyle Stanley [Mon, 9 Dec 2019 14:21:10 +0000 (09:21 -0500)] 
bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR (#17311)

5 years agobpo-39006: Fix asyncio when the ssl module is missing (GH-17524)
Victor Stinner [Mon, 9 Dec 2019 14:02:03 +0000 (15:02 +0100)] 
bpo-39006: Fix asyncio when the ssl module is missing (GH-17524)

Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.

5 years agobpo-38916: array.array: remove fromstring() and tostring() (GH-17487)
Victor Stinner [Mon, 9 Dec 2019 13:09:14 +0000 (14:09 +0100)] 
bpo-38916: array.array: remove fromstring() and tostring() (GH-17487)

array.array: Remove tostring() and fromstring() methods.  They were
aliases to tobytes() and frombytes(), deprecated since Python 3.2.

5 years agobpo-38547: Fix test_pty if the process is the session leader (GH-17519)
Victor Stinner [Mon, 9 Dec 2019 10:57:05 +0000 (11:57 +0100)] 
bpo-38547: Fix test_pty if the process is the session leader (GH-17519)

Fix test_pty: if the process is the session leader, closing the
master file descriptor raises a SIGHUP signal: simply ignore SIGHUP
when running the tests.

5 years agobpo-38673: dont switch to ps2 if the line starts with comment or whitespace (GH-17421)
Batuhan Taşkaya [Mon, 9 Dec 2019 04:36:27 +0000 (07:36 +0300)] 
bpo-38673: dont switch to ps2 if the line starts with comment or whitespace (GH-17421)

https://bugs.python.org/issue38673

5 years agobpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)
Abhilash Raj [Mon, 9 Dec 2019 01:37:34 +0000 (17:37 -0800)] 
bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)

Fix a potential IndexError when passing an empty value to the message-id
parser. Instead, HeaderParseError should be raised.

5 years agobpo-38698: Add a new InvalidMessageID token to email header parser. (GH-17503)
Abhilash Raj [Mon, 9 Dec 2019 01:35:38 +0000 (17:35 -0800)] 
bpo-38698: Add a new InvalidMessageID token to email header parser. (GH-17503)

This adds a new InvalidMessageID token to the email header parser which can be
used to represent invalid message-id headers in the parse tree.

5 years agobpo-38858: Fix ref leak in pycore_interp_init() (GH-17512)
Victor Stinner [Sun, 8 Dec 2019 20:55:58 +0000 (21:55 +0100)] 
bpo-38858: Fix ref leak in pycore_interp_init() (GH-17512)

bpo-38858, bpo-38997: _PySys_Create() returns a strong reference to
the sys module: Py_DECREF() is needed when we are done with the
module.

5 years agobpo-38994: Implement __class_getitem__ for PathLike (GH-17498)
Batuhan Taşkaya [Sun, 8 Dec 2019 20:31:15 +0000 (23:31 +0300)] 
bpo-38994: Implement __class_getitem__ for PathLike (GH-17498)

https://bugs.python.org/issue38994

5 years agobpo-38669: patch.object now raises a helpful error (GH17034)
Elena Oat [Sun, 8 Dec 2019 20:14:38 +0000 (12:14 -0800)] 
bpo-38669: patch.object now raises a helpful error (GH17034)

This means a clearer message is now shown when patch.object is called with two string arguments, rather than a class and a string argument.

5 years agobpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)
AMIR [Sun, 8 Dec 2019 11:35:59 +0000 (15:05 +0330)] 
bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)

now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None.

https://bugs.python.org/issue38979

Automerge-Triggered-By: @asvetlov
5 years agobpo-38852: Set thread stack size to 8 Mb for debug builds on android platforms (GH...
xdegaye [Sun, 8 Dec 2019 07:40:14 +0000 (08:40 +0100)] 
bpo-38852: Set thread stack size to 8 Mb for debug builds on android platforms (GH-17337)

5 years agobpo-38991: Remove test.support.strip_python_stderr() (GH-17490)
Victor Stinner [Sun, 8 Dec 2019 07:38:16 +0000 (08:38 +0100)] 
bpo-38991: Remove test.support.strip_python_stderr() (GH-17490)

test.support: run_python_until_end(), assert_python_ok() and
assert_python_failure() functions no longer strip whitespaces from
stderr.

5 years agobpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190)
Christian Heimes [Sat, 7 Dec 2019 16:59:36 +0000 (17:59 +0100)] 
bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190)

test_openssl_version now accepts version 3.0.0.

getpeercert() no longer returns IPv6 addresses with a trailing new line.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820

5 years agobpo-29636: json.tool: Add document for indentation options. (GH-17482)
Daniel Himmelstein [Sat, 7 Dec 2019 14:14:40 +0000 (07:14 -0700)] 
bpo-29636: json.tool: Add document for indentation options. (GH-17482)

And updated test to use subprocess.run

5 years agobpo-38652: Remove provisional note for asyncio.BufferedProtocol (GH-17047)
Anj-A [Sat, 7 Dec 2019 12:53:13 +0000 (12:53 +0000)] 
bpo-38652: Remove provisional note for asyncio.BufferedProtocol (GH-17047)

https://bugs.python.org/issue38652

5 years ago bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions (GH...
idomic [Sat, 7 Dec 2019 11:52:36 +0000 (06:52 -0500)] 
 bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions (GH-16457)

https://bugs.python.org/issue37404

5 years agoMake repr of C accelerated TaskWakeupMethWrapper the same as of pure Python version...
Andrew Svetlov [Sat, 7 Dec 2019 11:23:21 +0000 (13:23 +0200)] 
Make repr of C accelerated TaskWakeupMethWrapper the same as of pure Python version (GH-17484)

5 years agobpo-38529: Fix asyncio stream warning (GH-17474)
Andrew Svetlov [Sat, 7 Dec 2019 11:22:00 +0000 (13:22 +0200)] 
bpo-38529: Fix asyncio stream warning (GH-17474)

5 years agobpo-38978: Implement __class_getitem__ for asyncio objects (GH-17491)
Batuhan Taşkaya [Sat, 7 Dec 2019 11:05:07 +0000 (14:05 +0300)] 
bpo-38978: Implement __class_getitem__ for asyncio objects (GH-17491)

https://bugs.python.org/issue38978

5 years agobpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)
Benoit Hudson [Fri, 6 Dec 2019 19:15:03 +0000 (14:15 -0500)] 
bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)

On most platforms, the `environ` symbol is accessible everywhere.

In a dylib on OSX, it's not easily accessible, you need to find it with
_NSGetEnviron.

The code was caching the *value* of environ. But a setenv() can change the value,
leaving garbage at the old value. Fix: don't cache the value of environ, just
read it every time.

5 years agobpo-38982: Fix asyncio PidfdChildWatcher on waitpid() error (GH-17477)
Victor Stinner [Fri, 6 Dec 2019 15:32:41 +0000 (16:32 +0100)] 
bpo-38982: Fix asyncio PidfdChildWatcher on waitpid() error (GH-17477)

If waitpid() is called elsewhere, waitpid() call fails with
ChildProcessError: use return code 255 in this case, and log a
warning. It ensure that the pidfd file descriptor is closed if this
error occurs.

5 years agobpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py (GH-13135)
Mario Corchero [Fri, 6 Dec 2019 14:27:38 +0000 (14:27 +0000)] 
bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py (GH-13135)

Break cycle generated when saving an exception in socket.py, codeop.py and dyld.py as they keep alive not only the exception but user objects through the ``__traceback__`` attribute.

https://bugs.python.org/issue36820

Automerge-Triggered-By: @pablogsal
5 years agobpo-27413: json.tool: Add --no-ensure-ascii option. (GH-17472)
wim glenn [Fri, 6 Dec 2019 06:44:01 +0000 (00:44 -0600)] 
bpo-27413: json.tool: Add --no-ensure-ascii option. (GH-17472)

5 years agobpo-38858: Add pycore_interp_init() code to factorize code (GH-17483)
Victor Stinner [Fri, 6 Dec 2019 02:37:07 +0000 (03:37 +0100)] 
bpo-38858: Add pycore_interp_init() code to factorize code (GH-17483)

Add a new pycore_interp_init() function called by new_interpreter()
and pyinit_config().

5 years agobpo-38858: new_interpreter() reuses _PySys_Create() (GH-17481)
Victor Stinner [Fri, 6 Dec 2019 01:43:30 +0000 (02:43 +0100)] 
bpo-38858: new_interpreter() reuses _PySys_Create() (GH-17481)

new_interpreter() now calls _PySys_Create() to create a new sys
module isolated from the main interpreter. It now calls
_PySys_InitCore() and _PyImport_FixupBuiltin().

init_interp_main() now calls _PySys_InitMain().

5 years agoFix unquoted YAML in Windows release build (GH-17479)
Steve Dower [Thu, 5 Dec 2019 23:32:04 +0000 (15:32 -0800)] 
Fix unquoted YAML in Windows release build (GH-17479)

5 years agoRemove unused variable in Python/pylifecycle.c (GH-17475)
Pablo Galindo [Thu, 5 Dec 2019 16:18:27 +0000 (16:18 +0000)] 
Remove unused variable in Python/pylifecycle.c (GH-17475)

5 years agobpo-27961: Replace PY_LLONG_MAX, PY_LLONG_MIN and PY_ULLONG_MAX with standard macros...
Sergey Fedoseev [Thu, 5 Dec 2019 14:55:28 +0000 (19:55 +0500)] 
bpo-27961: Replace PY_LLONG_MAX, PY_LLONG_MIN and PY_ULLONG_MAX with standard macros (GH-15385)

Use standard constants LLONG_MIN, LLONG_MAX and ULLONG_MAX.

5 years agobpo-38951: Use threading.main_thread() check in asyncio (GH-17433)
Hill Ma [Thu, 5 Dec 2019 12:40:12 +0000 (04:40 -0800)] 
bpo-38951: Use threading.main_thread() check in asyncio (GH-17433)

https://bugs.python.org/issue38951

5 years agobpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)
Claudiu Popa [Thu, 5 Dec 2019 03:14:26 +0000 (04:14 +0100)] 
bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)

parse_message_id() was improperly using a token defined inside an exception
handler, which was raising `UnboundLocalError` on parsing an invalid value.

https://bugs.python.org/issue38698

5 years agobpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)
Victor Stinner [Wed, 4 Dec 2019 20:10:06 +0000 (21:10 +0100)] 
bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)

Use the "volatile" keyword to prevent tail call optimization
on any compiler, rather than relying on compiler specific pragma.

5 years ago bpo-38634: Allow non-apple build to cope with libedit (GH-16986)
serge-sans-paille [Wed, 4 Dec 2019 16:02:57 +0000 (17:02 +0100)] 
 bpo-38634: Allow non-apple build to cope with libedit (GH-16986)

The readline module now detects if Python is linked to libedit at runtime
on all platforms.  Previously, the check was only done on macOS.

If Python is used as a library by a binary linking to libedit, the linker
resolves the rl_initialize symbol required by the readline module against
libedit instead of libreadline, which leads to a segfault.

Take advantage of the existing supporting code to have readline module being
compatible with both situations.

5 years agobpo-38962: Fix reference leak in the per-subinterpreter gc (GH-17457)
Pablo Galindo [Wed, 4 Dec 2019 11:51:03 +0000 (11:51 +0000)] 
bpo-38962: Fix reference leak in the per-subinterpreter gc (GH-17457)

https://bugs.python.org/issue38962

Automerge-Triggered-By: @pablogsal
5 years agobpo-38962: Fix reference leak in new_interpreter() (GH-17453)
Pablo Galindo [Wed, 4 Dec 2019 11:19:59 +0000 (11:19 +0000)] 
bpo-38962: Fix reference leak in new_interpreter() (GH-17453)

https://bugs.python.org/issue38962

Automerge-Triggered-By: @pablogsal
5 years agobpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
Inada Naoki [Wed, 4 Dec 2019 09:39:31 +0000 (18:39 +0900)] 
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)

5 years agobpo-38962: Fix reference leak in test_httpservers (GH-17454)
Pablo Galindo [Wed, 4 Dec 2019 09:29:10 +0000 (09:29 +0000)] 
bpo-38962: Fix reference leak in test_httpservers (GH-17454)

5 years agoAdd setobject.c (GH-17463)
Raymond Hettinger [Wed, 4 Dec 2019 09:07:02 +0000 (04:07 -0500)] 
Add setobject.c (GH-17463)

5 years agoadd @ethanfurman for tarfile (GH-17461)
Ethan Furman [Wed, 4 Dec 2019 08:18:31 +0000 (00:18 -0800)] 
add @ethanfurman for tarfile (GH-17461)

5 years agobpo-29636: Add --(no-)indent arguments to json.tool (GH-345)
Daniel Himmelstein [Wed, 4 Dec 2019 06:15:19 +0000 (01:15 -0500)] 
bpo-29636: Add --(no-)indent arguments to json.tool (GH-345)

5 years agobpo-27873: Update docstring for multiprocessing.Pool.map (GH-17436)
An Long [Tue, 3 Dec 2019 23:30:53 +0000 (07:30 +0800)] 
bpo-27873: Update docstring for multiprocessing.Pool.map (GH-17436)

Update docstring for `multiprocessing.Pool.map` to mention `pool.starmap()`.

Prev PR: https://github.com/python/cpython/pull/17367  @aeros

https://bugs.python.org/issue27873

5 years agobpo-38270: Fix indentation of test_hmac assertions (GH-17446)
stratakis [Tue, 3 Dec 2019 15:35:54 +0000 (16:35 +0100)] 
bpo-38270: Fix indentation of test_hmac assertions (GH-17446)

Since https://github.com/python/cpython/commit/c64a1a61e6fc542cada40eb069a239317e1af36e two assertions were indented and thus ignored when running test_hmac.

This PR fixes it. As the change is quite trivial I didn't add a NEWS entry.

https://bugs.python.org/issue38270

5 years agobpo-38945: UU Encoding: Don't let newline in filename corrupt the output format ...
Matthew Rollings [Mon, 2 Dec 2019 22:25:21 +0000 (22:25 +0000)] 
bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (#17418)

5 years agoFix compiler warning in Objects/unicodeobject.c (GH-17440)
Pablo Galindo [Mon, 2 Dec 2019 18:09:43 +0000 (18:09 +0000)] 
Fix compiler warning in Objects/unicodeobject.c (GH-17440)

5 years agobpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)
torsava [Mon, 2 Dec 2019 16:15:42 +0000 (17:15 +0100)] 
bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)

Make ssl tests less strict and also accept TLSv3 as the default maximum
version. This change unbreaks test_min_max_version on Fedora 32.

https://bugs.python.org/issue38815

5 years agobpo-38449: Add URL delimiters test cases (#16729)
Dong-hee Na [Sun, 1 Dec 2019 23:06:28 +0000 (08:06 +0900)] 
bpo-38449: Add URL delimiters test cases (#16729)

* bpo-38449: Add tricky test cases

* bpo-38449: Reflect codereview

5 years agodocument threading.Lock.locked() (GH-17427)
idomic [Sun, 1 Dec 2019 20:07:39 +0000 (15:07 -0500)] 
document threading.Lock.locked() (GH-17427)

5 years agoFix typos (GH-17423)
Ofek Lev [Sun, 1 Dec 2019 05:44:21 +0000 (00:44 -0500)] 
Fix typos (GH-17423)

5 years agobpo-37523: Raise ValueError for I/O operations on a closed zipfile.ZipExtFile. (GH...
Daniel Hillier [Sat, 30 Nov 2019 08:30:47 +0000 (19:30 +1100)] 
bpo-37523: Raise ValueError for I/O operations on a closed zipfile.ZipExtFile. (GH-14658)

Raises ValueError when calling the following on a closed zipfile.ZipExtFile: read, readable, seek, seekable, tell.

5 years agoFix old mention of virtualenv (GH-17417)
Brett Cannon [Fri, 29 Nov 2019 23:37:08 +0000 (15:37 -0800)] 
Fix old mention of virtualenv (GH-17417)

Automerge-Triggered-By: @brettcannon
5 years agobpo-38920: Add audit hooks for when sys.excepthook and sys.unraisable hooks are invok...
Steve Dower [Thu, 28 Nov 2019 16:46:11 +0000 (08:46 -0800)] 
bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisable hooks are invoked (GH-17392)

Also fixes some potential segfaults in unraisable hook handling.

5 years agobpo-38524: clarify example a bit and improve formatting (GH-17406)
Tal Einat [Thu, 28 Nov 2019 05:22:09 +0000 (07:22 +0200)] 
bpo-38524: clarify example a bit and improve formatting (GH-17406)

5 years agobpo-38927: Use python -m pip to upgrade venv deps (GH-17403)
Tzu-ping Chung [Wed, 27 Nov 2019 20:25:23 +0000 (04:25 +0800)] 
bpo-38927: Use python -m pip to upgrade venv deps (GH-17403)

I suggest you add `bpo-NNNNN: ` as a prefix for the first commit for future PRs. Thanks!

5 years agobpo-38928: Fix versionadded for venv's upgrade_deps function (GH-17404)
Tzu-ping Chung [Wed, 27 Nov 2019 20:21:48 +0000 (04:21 +0800)] 
bpo-38928: Fix versionadded for venv's upgrade_deps function (GH-17404)

5 years agobpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)
Inada Naoki [Wed, 27 Nov 2019 13:22:06 +0000 (22:22 +0900)] 
bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)

SpooledTemporaryFile.rollback() might cause data corruption
when it is in text mode.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-38524: document implicit and explicit calling of descriptors' __set_name__ (GH...
Florian Dahlitz [Wed, 27 Nov 2019 08:46:40 +0000 (09:46 +0100)] 
bpo-38524: document implicit and explicit calling of descriptors' __set_name__ (GH-17364)

5 years agoShow the differing module names for readlink() (GH-17395)
Yoni Lavi [Wed, 27 Nov 2019 05:08:50 +0000 (05:08 +0000)] 
Show the differing module names for readlink() (GH-17395)

This was very confusing with the text for both being just `readlink()`.

5 years agoBe more specific about the `.so` gitignore patterns (GH-17328)
Anthony Sottile [Wed, 27 Nov 2019 04:54:46 +0000 (20:54 -0800)] 
Be more specific about the `.so` gitignore patterns (GH-17328)

In GH-15823 the pattern was changed from `libpython*.so*` to `*.so*` which
matches a bit too greedily for some packagers.  For instance this trips up
`debian/README.source`.  A more specific pattern fixes this issue.