]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-40614: Respect feature version for f-string debug expressions (GH-20196)
Shantanu [Wed, 27 May 2020 20:30:38 +0000 (13:30 -0700)] 
bpo-40614: Respect feature version for f-string debug expressions (GH-20196)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
5 years agobpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456)
Christian Heimes [Wed, 27 May 2020 19:50:06 +0000 (21:50 +0200)] 
bpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456)

hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function
when OpenSSL is available.

Note: The _operator module is a builtin module. I don't want to add
libcrypto dependency to libpython. Therefore I duplicated the wrapper
function and added a copy to _hashopenssl.c.

5 years agobpo-30064: Fix asyncio loop.sock_* race condition issue (#20369)
Fantix King [Wed, 27 May 2020 19:47:30 +0000 (14:47 -0500)] 
bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369)

5 years agoRefactor error handling code in Parser/pegen/pegen.c (GH-20440)
Lysandros Nikolaou [Wed, 27 May 2020 16:04:11 +0000 (19:04 +0300)] 
Refactor error handling code in Parser/pegen/pegen.c (GH-20440)

Set p->error_indicator in various places, where it's needed, but it's
not done.

Automerge-Triggered-By: @gvanrossum
5 years agobpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)
Sean Gillespie [Wed, 27 May 2020 15:22:07 +0000 (08:22 -0700)] 
bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)

ctypes now raises an ArgumentError when a callback
is invoked with more than 1024 arguments.

The ctypes module allocates arguments on the stack in
ctypes_callproc() using alloca(), which is problematic
when large numbers of arguments are passed. Instead
of a stack overflow, this commit raises an ArgumentError
if more than 1024 parameters are passed.

5 years agobpo-39573: Convert Py_REFCNT and Py_SIZE to functions (GH-20429)
Victor Stinner [Wed, 27 May 2020 12:55:10 +0000 (14:55 +0200)] 
bpo-39573: Convert Py_REFCNT and Py_SIZE to functions (GH-20429)

Convert Py_REFCNT() and Py_SIZE() macros to static inline functions.
They cannot be used as l-value anymore: use Py_SET_REFCNT() and
Py_SET_SIZE() to set an object reference count and size.

Replace &Py_SIZE(self) with &((PyVarObject*)self)->ob_size
in arraymodule.c.

This change is backward incompatible on purpose, to prepare the C API
for an opaque PyObject structure.

5 years agobpo-37999: Fix outdated __int__ and nb_int references in comments (GH-20449)
Mark Dickinson [Wed, 27 May 2020 12:43:17 +0000 (13:43 +0100)] 
bpo-37999: Fix outdated __int__ and nb_int references in comments (GH-20449)

* Fix outdated __int__ and nb_int references in comments

* Also update C-API documentation

* Add back missing 'method' word

* Remove .. deprecated notices

5 years agoUpgrade bundled versions of pip & setuptools (#16782)
Xavier Fernandez [Wed, 27 May 2020 10:49:34 +0000 (12:49 +0200)] 
Upgrade bundled versions of pip & setuptools (#16782)

5 years agoFix the link to ncurses patch download in macos installer build script (GH-20421)
Oleg Höfling [Wed, 27 May 2020 10:07:15 +0000 (12:07 +0200)] 
Fix the link to ncurses patch download in macos installer build script (GH-20421)

Reason: the link `ftp://invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2` is dead, which prevents `Mac/BuildScript/build-installer.py` from completing. Looks like the host of the FTP server was changed to `ftp.invisible-island.net`, thus this proposal.

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
5 years agobpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types...
Pablo Galindo [Wed, 27 May 2020 09:03:38 +0000 (10:03 +0100)] 
bpo-40217:  Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264)

Heap types now always visit the type in tp_traverse. See added docs for details.

This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f.

Automerge-Triggered-By: @encukou
5 years agoFix lookahead of soft keywords in the PEG parser (GH-20436)
Pablo Galindo [Tue, 26 May 2020 23:15:52 +0000 (00:15 +0100)] 
Fix lookahead of soft keywords in the PEG parser (GH-20436)

Automerge-Triggered-By: @gvanrossum
5 years agobpo-40611: Adds MAP_POPULATE to the mmap module (GH-20061)
Ethan Steinberg [Tue, 26 May 2020 21:42:18 +0000 (14:42 -0700)] 
bpo-40611: Adds MAP_POPULATE to the mmap module (GH-20061)

MAP_POPULATE constant has now been added to the list of exported
mmap module flags.

5 years agoAdd soft keywords (GH-20370) 9362/head
Guido van Rossum [Tue, 26 May 2020 17:58:44 +0000 (10:58 -0700)] 
Add soft keywords (GH-20370)

These are like keywords but they only work in context; they are not reserved except when there is an exact match.

This would enable things like match statements without reserving `match` (which would be bad for the `re.match()` function and probably lots of other places).

Automerge-Triggered-By: @gvanrossum
5 years agobpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
Serhiy Storchaka [Tue, 26 May 2020 15:43:38 +0000 (18:43 +0300)] 
bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)

Only __index__ should be used to make integer conversions lossless.

5 years agobpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362)
Arturo Escaip [Tue, 26 May 2020 14:55:21 +0000 (07:55 -0700)] 
bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362)

The 'extra' argument is not always used by custom logger adapters. For
example:

```python
class IndentAdapter(logging.LoggerAdapter):
    def process(self, msg, kwargs):
        indent = kwargs.pop(indent, 1)
        return ' ' * indent + msg, kwargs
```

It is cleaner and friendlier to default the 'extra' argument to None
instead of either forcing the subclasses of LoggerAdapter to pass a None
value directly or to override the constructor.

This change is backward compatible because existing calls to
`LoggerAdapter.__init__` are already passing a value for the second
argument.

Automerge-Triggered-By: @vsajip
5 years agobpo-39244: multiprocessing return default start method first on macOS (GH-18625)
idomic [Tue, 26 May 2020 14:54:21 +0000 (10:54 -0400)] 
bpo-39244: multiprocessing return default start method first on macOS (GH-18625)

5 years agobpo-40737: Fix possible reference leak for sqlite3 initialization (GH-20323)
Erlend Egeberg Aasland [Tue, 26 May 2020 12:18:19 +0000 (14:18 +0200)] 
bpo-40737: Fix possible reference leak for sqlite3 initialization (GH-20323)

5 years agobpo-40637: Fix test_pbkdf2_hmac_py for missing sha1 (#20422)
Christian Heimes [Tue, 26 May 2020 10:26:29 +0000 (12:26 +0200)] 
bpo-40637: Fix test_pbkdf2_hmac_py for missing sha1 (#20422)

5 years agobpo-39301: State that floor division is used for right shift operations (GH-20347)
Zackery Spytz [Tue, 26 May 2020 08:16:34 +0000 (02:16 -0600)] 
bpo-39301: State that floor division is used for right shift operations (GH-20347)

* bpo-39301: State that floor division is used for right shift operations

* Remove "without overflow check"

5 years agoRemove duplicated words words (GH-20413)
Serhiy Storchaka [Tue, 26 May 2020 08:04:14 +0000 (11:04 +0300)] 
Remove duplicated words words (GH-20413)

5 years agobpo-40745: Fix typos in NewType docs (GH-20379)
ziheng [Tue, 26 May 2020 04:45:35 +0000 (12:45 +0800)] 
bpo-40745: Fix typos in NewType docs (GH-20379)

5 years agoSimplify creation of the __new__ method in namedtuple() (GH-20361)
Raymond Hettinger [Tue, 26 May 2020 04:39:00 +0000 (21:39 -0700)] 
Simplify creation of the __new__ method in namedtuple() (GH-20361)

5 years agoFix peg_generator compiler warnings under MSVC (GH-20405)
Ammar Askar [Tue, 26 May 2020 04:33:35 +0000 (04:33 +0000)] 
Fix peg_generator compiler warnings under MSVC (GH-20405)

5 years agocloses bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() (GH...
sth [Tue, 26 May 2020 04:08:40 +0000 (06:08 +0200)] 
closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() (GH-20403)

5 years agobpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399)
Lysandros Nikolaou [Tue, 26 May 2020 00:32:18 +0000 (03:32 +0300)] 
bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399)

When a `SyntaxError` in the expression part of a fstring is found,
the filename attribute of the `SyntaxError` is always `<fstring>`.
With this commit, it gets changed to always have the name of the file
the fstring resides in.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years ago[workflow] Use Sphinx problem matcher on GitHub docs builds (GH-20325)
Ammar Askar [Mon, 25 May 2020 21:32:24 +0000 (21:32 +0000)] 
[workflow] Use Sphinx problem matcher on GitHub docs builds (GH-20325)

5 years agobpo-40688: Use the correct parser in the peg_generator scripts (GH-20235)
Lysandros Nikolaou [Mon, 25 May 2020 19:51:58 +0000 (22:51 +0300)] 
bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235)

The scripts in `Tools/peg_generator/scripts` mostly assume that
`ast.parse` and `compile` use the old parser, since this was the
state of things, while we were developing them. They need to be
updated to always use the correct parser. `_peg_parser` is being
extended to support both parsing and compiling with both parsers.

5 years agobpo-23082: Better error message for PurePath.relative_to() from pathlib (GH-19611)
Rotuna [Mon, 25 May 2020 19:42:28 +0000 (21:42 +0200)] 
bpo-23082: Better error message for PurePath.relative_to() from pathlib (GH-19611)

Co-authored-by: Sadhana Srinivasan <rotuna@Sadhanas-MBP.fritz.box>
5 years agoCloses bpo-40558: update CONTRIBUTING.rst to reflect current branches (GH-19989)
Hai Shi [Mon, 25 May 2020 19:19:42 +0000 (03:19 +0800)] 
Closes bpo-40558: update CONTRIBUTING.rst to reflect current branches (GH-19989)

5 years agobpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined...
Pablo Galindo [Mon, 25 May 2020 19:17:12 +0000 (20:17 +0100)] 
bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined (GH-20393)

5 years agobpo-40750: Support -d flag in the new parser (GH-20340)
Pablo Galindo [Mon, 25 May 2020 17:38:45 +0000 (18:38 +0100)] 
bpo-40750: Support -d flag in the new parser (GH-20340)

5 years agobpo-39573: Fix buildbot failure for tupleobject.c (GH-20391)
Dong-hee Na [Mon, 25 May 2020 17:25:28 +0000 (02:25 +0900)] 
bpo-39573: Fix buildbot failure for tupleobject.c (GH-20391)

5 years agobpo-39573: Convert Py_TYPE() to a static inline function (GH-20290)
Dong-hee Na [Mon, 25 May 2020 16:52:54 +0000 (01:52 +0900)] 
bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290)

5 years agobpo-39245: Fix docs links to the stable ABI (GH-20388)
Miro Hrončok [Mon, 25 May 2020 15:42:48 +0000 (17:42 +0200)] 
bpo-39245: Fix docs links to the stable ABI (GH-20388)

Automerge-Triggered-By: @vstinner
5 years agobpo-34397: Remove redundant overflow checks in list and tuple implementation. (GH...
Sergey Fedoseev [Mon, 25 May 2020 14:54:40 +0000 (19:54 +0500)] 
bpo-34397: Remove redundant overflow checks in list and tuple implementation. (GH-8757)

5 years agobpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383)
Miro Hrončok [Mon, 25 May 2020 14:54:14 +0000 (16:54 +0200)] 
bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383)

5 years agobpo-40671: Prepare _hashlib for PEP 489 (GH-20180)
Christian Heimes [Mon, 25 May 2020 08:44:51 +0000 (10:44 +0200)] 
bpo-40671: Prepare _hashlib for PEP 489 (GH-20180)

5 years agobpo-40695: Limit hashlib builtin hash fallback (GH-20259)
Christian Heimes [Mon, 25 May 2020 08:43:10 +0000 (10:43 +0200)] 
bpo-40695: Limit hashlib builtin hash fallback (GH-20259)

:mod:`hashlib` no longer falls back to builtin hash implementations when
OpenSSL provides a hash digest and the algorithm is blocked by security
policy.

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-35714: Reject null characters in struct format strings (GH-16928)
Zackery Spytz [Mon, 25 May 2020 07:55:09 +0000 (01:55 -0600)] 
bpo-35714: Reject null characters in struct format strings (GH-16928)

struct.error is now raised if there is a null character in a struct
format string.

5 years agobpo-38580: Document that select() accepts iterables, not just sequences (GH-16832)
Jakub Stasiak [Mon, 25 May 2020 07:03:48 +0000 (09:03 +0200)] 
bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832)

5 years agobpo-40334: Support suppressing of multiple optional variables in Pegen (GH-20367)
Batuhan Taskaya [Sun, 24 May 2020 22:20:18 +0000 (01:20 +0300)] 
bpo-40334: Support suppressing of multiple optional variables in Pegen (GH-20367)

5 years agobpo-36290: Fix keytword collision handling in AST node constructors (GH-12382)
Rémi Lapeyre [Sun, 24 May 2020 21:12:57 +0000 (23:12 +0200)] 
bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382)

5 years agobpo-17050: Remove documentation on argparse.REMAINDER (GH-18661)
Albert [Sun, 24 May 2020 18:57:40 +0000 (20:57 +0200)] 
bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661)

Closes [Issue 17050]() by removing argparse.REMAINDER from the documentation, as discussed on the issue.

Automerge-Triggered-By: @rhettinger
5 years agobpo-40443: Remove unused imports in the zoneinfo (GH-20354)
Dong-hee Na [Sun, 24 May 2020 14:37:08 +0000 (23:37 +0900)] 
bpo-40443: Remove unused imports in the zoneinfo (GH-20354)

5 years agobpo-37309: Update IDLE NEWS.txt (GH-20356)
Terry Jan Reedy [Sun, 24 May 2020 13:57:55 +0000 (09:57 -0400)] 
bpo-37309: Update IDLE NEWS.txt (GH-20356)

5 years agobpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)
Florian Dahlitz [Sun, 24 May 2020 10:53:44 +0000 (12:53 +0200)] 
bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)

This was the only failure running unittest.main(test.test_idle) after imports.

5 years agobpo-37973: Improve the docstrings of sys.float_info (GH-19218)
Zackery Spytz [Sun, 24 May 2020 10:03:52 +0000 (04:03 -0600)] 
bpo-37973: Improve the docstrings of sys.float_info (GH-19218)

Taken from https://docs.python.org/3/library/sys.html#sys.float_info

5 years agoRemove spurious NULL in descrobject.c (GH-20344)
Hai Shi [Sun, 24 May 2020 05:03:50 +0000 (13:03 +0800)] 
Remove spurious NULL in descrobject.c (GH-20344)

Co-authored-by: hai shi <shihai1991@126.com>
5 years agoUse Py_ssize_t for the column number in the PEG support code (GH-20341)
Pablo Galindo [Sun, 24 May 2020 05:01:34 +0000 (06:01 +0100)] 
Use Py_ssize_t for the column number in the PEG support code (GH-20341)

5 years agobpo-40405: Fix asyncio.as_completed docs (GH-19753)
Bar Harel [Sat, 23 May 2020 23:14:31 +0000 (02:14 +0300)] 
bpo-40405: Fix asyncio.as_completed docs (GH-19753)

* Fix as_completed docs to correctly state the function return value.
* Also, improves the general wording of the as_completed documentation.

Co-Authored-By: Rémi Lapeyre <remi.lapeyre@henki.fr>
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
Co-Authored-By: Yury Selivanov <yury@edgedb.com>
5 years agobpo-34556: Document addition of upgrade_deps to venv.create (GH-20135)
Shantanu [Sat, 23 May 2020 09:58:50 +0000 (02:58 -0700)] 
bpo-34556: Document addition of upgrade_deps to venv.create (GH-20135)

5 years agobpo-40439: Update broken link in lexical analysis docs (GH-20184)
Matteo Bertucci [Sat, 23 May 2020 01:12:09 +0000 (03:12 +0200)] 
bpo-40439: Update broken link in lexical analysis docs (GH-20184)

Automerge-Triggered-By: @csabella
5 years ago[doc] Add missing space in urllib.request.rst (GH-19860)
Sardorbek Imomaliev [Sat, 23 May 2020 01:05:05 +0000 (08:05 +0700)] 
[doc] Add missing space in urllib.request.rst (GH-19860)

This is just a typo fix, should I still provide news file?

5 years agoCosmetic smtplib changes (GH-8718)
Ville Skyttä [Sat, 23 May 2020 00:50:58 +0000 (03:50 +0300)] 
Cosmetic smtplib changes (GH-8718)

Some cosmetic smtplib changes here. Let me know if you'd like a bpo/news entry or splitting this PR into two.

Automerge-Triggered-By: @maxking
5 years agobpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)
Antoine [Sat, 23 May 2020 00:29:34 +0000 (02:29 +0200)] 
bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)

* Add 'users' variable in code sample.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agobpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)
Dennis Sweeney [Fri, 22 May 2020 20:40:17 +0000 (16:40 -0400)] 
bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)

Patch by Dennis Sweeney.

5 years agobpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
Chris Jerdonek [Fri, 22 May 2020 20:33:27 +0000 (13:33 -0700)] 
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)

This updates _PyErr_ChainStackItem() to use _PyErr_SetObject()
instead of _PyErr_ChainExceptions(). This prevents a hang in
certain circumstances because _PyErr_SetObject() performs checks
to prevent cycles in the exception context chain while
_PyErr_ChainExceptions() doesn't.

5 years agobpo-9216: hashlib usedforsecurity fixes (GH-20258)
Christian Heimes [Fri, 22 May 2020 18:04:33 +0000 (20:04 +0200)] 
bpo-9216: hashlib usedforsecurity fixes (GH-20258)

func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
``_hashlib.new()``. test_hashlib and test_smtplib handle strict security
policy better.

Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: @tiran
5 years agobpo-40705: Fix use-after-free in _zoneinfo's module_free (GH-20280)
Ammar Askar [Fri, 22 May 2020 16:10:55 +0000 (16:10 +0000)] 
bpo-40705: Fix use-after-free in _zoneinfo's module_free (GH-20280)

5 years agobpo-40730: Remove redundant 'to' (GH-20316)
Florian Dahlitz [Fri, 22 May 2020 15:19:18 +0000 (17:19 +0200)] 
bpo-40730: Remove redundant 'to' (GH-20316)

@ericvsmith I guess it is correct to merge it into master and not 3.9 directly?

Automerge-Triggered-By: @ericvsmith
5 years agoLet the argument clinic do the type checking for heapq (GH-20284)
Raymond Hettinger [Fri, 22 May 2020 14:28:57 +0000 (07:28 -0700)] 
Let the argument clinic do the type checking for heapq (GH-20284)

5 years agobpo-40630: Add tracemalloc.reset_peak (GH-20102)
Huon Wilson [Fri, 22 May 2020 14:18:51 +0000 (00:18 +1000)] 
bpo-40630: Add tracemalloc.reset_peak (GH-20102)

The reset_peak function sets the peak memory size to the current size,
representing a resetting of that metric. This allows for recording the
peak of specific sections of code, ignoring other code that may have
had a higher peak (since the most recent `tracemalloc.start()` or
tracemalloc.clear_traces()` call).

5 years agoRestore missing column of digits (GH-20313)
Raymond Hettinger [Fri, 22 May 2020 13:54:42 +0000 (06:54 -0700)] 
Restore missing column of digits (GH-20313)

5 years agoFix debug output in PEG parser generator (GH-20308)
Pablo Galindo [Fri, 22 May 2020 01:48:09 +0000 (02:48 +0100)] 
Fix debug output in PEG parser generator (GH-20308)

5 years agobpo-40334: Produce better error messages for non-parenthesized genexps (GH-20153)
Lysandros Nikolaou [Fri, 22 May 2020 00:56:52 +0000 (03:56 +0300)] 
bpo-40334: Produce better error messages for non-parenthesized genexps (GH-20153)

The error message, generated for a non-parenthesized generator expression
in function calls, was still the generic `invalid syntax`, when the generator expression wasn't appearing as the first argument in the call. With this patch, even on input like `f(a, b, c for c in d, e)`, the correct error message gets produced.

5 years ago[doc] Remove references to obsolete BuildApplet on macOS. (GH-20023)
Andre Delfino [Thu, 21 May 2020 22:45:23 +0000 (19:45 -0300)] 
[doc] Remove references to obsolete BuildApplet on macOS. (GH-20023)

5 years agobpo-40715: Reject dict unpacking on dict comprehensions (GH-20292)
Batuhan Taskaya [Thu, 21 May 2020 22:39:56 +0000 (01:39 +0300)] 
bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
5 years agobpo-40176: Improve error messages for trailing comma on from import (GH-20294)
Batuhan Taskaya [Thu, 21 May 2020 20:41:58 +0000 (23:41 +0300)] 
bpo-40176: Improve error messages for trailing comma on from import (GH-20294)

5 years agoFix typing problems reported by mypy in pegen (GH-20297)
Pablo Galindo [Thu, 21 May 2020 20:39:44 +0000 (21:39 +0100)] 
Fix typing problems reported by mypy in pegen (GH-20297)

5 years agoReword aware/naive introduction sentence (GH-20175)
Mathieu Dupuy [Thu, 21 May 2020 20:26:27 +0000 (20:26 +0000)] 
Reword aware/naive introduction sentence (GH-20175)

This is more informative and avoids the question of whether the period should go inside or outside the quotation marks.

See also GH-20007.

5 years agobpo-40334: Correctly generate C parser when assigned var is None (GH-20296)
Batuhan Taskaya [Thu, 21 May 2020 19:57:52 +0000 (22:57 +0300)] 
bpo-40334: Correctly generate C parser when assigned var is None (GH-20296)

When there are 2 negative lookaheads in the same rule, let's say `!"(" blabla "," !")"`, there will the 2 `FunctionCall`'s where assigned value is None. Currently when the `add_var` is called
the first one will be ignored but when the second lookahead's var is sent to dedupe it
will be returned as `None_1` and this won't be ignored by the declaration generator in the `visit_Alt`. This patch adds an explicit check to `add_var` to distinguish whether if there is a variable or not.

5 years agobpo-40714: Remove compile warning from _zoneinfo.c (GH-20291)
Dong-hee Na [Thu, 21 May 2020 16:56:03 +0000 (01:56 +0900)] 
bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291)

5 years agoImprove output summary in the examples and recipes section (GH-20285)
Raymond Hettinger [Thu, 21 May 2020 08:37:38 +0000 (01:37 -0700)] 
Improve output summary in the examples and recipes section (GH-20285)

5 years agobpo-32309: Add support for contextvars in asyncio.to_thread() (GH-20278)
Kyle Stanley [Thu, 21 May 2020 05:20:43 +0000 (01:20 -0400)] 
bpo-32309: Add support for contextvars in asyncio.to_thread() (GH-20278)

Allows contextvars from the main thread to be accessed in the separate thread used in `asyncio.to_thread()`. See the [discussion](https://github.com/python/cpython/pull/20143#discussion_r427808225) in GH-20143 for context.

Automerge-Triggered-By: @aeros
5 years agoUse f-strings in argparse HOWTO (GH-20070)
Rémi Lapeyre [Thu, 21 May 2020 04:22:59 +0000 (06:22 +0200)] 
Use f-strings in argparse HOWTO (GH-20070)

5 years agoUpdate whatsnew benchmark results for 3.9 (GH-20276)
Raymond Hettinger [Thu, 21 May 2020 01:43:51 +0000 (18:43 -0700)] 
Update whatsnew benchmark results for 3.9 (GH-20276)

5 years agos/wakup/wakeup (GH-20250)
Kunal Bhalla [Wed, 20 May 2020 17:12:37 +0000 (13:12 -0400)] 
s/wakup/wakeup (GH-20250)

(as title)

Automerge-Triggered-By: @Mariatta
5 years agoUse v2 of GitHub Actions where available (GH-20232)
Hugo van Kemenade [Wed, 20 May 2020 16:38:41 +0000 (19:38 +0300)] 
Use v2 of GitHub Actions where available (GH-20232)

Automerge-Triggered-By: @Mariatta
5 years agobpo-40698: Improve distutils upload hash digests (GH-20260)
Christian Heimes [Wed, 20 May 2020 14:37:25 +0000 (16:37 +0200)] 
bpo-40698: Improve distutils upload hash digests (GH-20260)

- Fix upload test on systems that blocks MD5
- Add SHA2-256 and Blake2b-256 digests based on new Warehous and twine
  specs.

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255)
Ned Deily [Wed, 20 May 2020 09:41:26 +0000 (05:41 -0400)] 
bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255)

5 years agoFix the URL to fishshell.com (GH-20251)
Jonathan Goble [Wed, 20 May 2020 04:59:46 +0000 (00:59 -0400)] 
Fix the URL to fishshell.com (GH-20251)

5 years agobpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
karl ding [Wed, 20 May 2020 02:31:49 +0000 (19:31 -0700)] 
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)

This mentions the new CAN_J1939 implementation in the What's New
documentation for Python 3.9

Automerge-Triggered-By: @gvanrossum
5 years agobpo-40521: Fix update_slot() when INTERN_NAME_STRINGS is not defined (#20246)
Victor Stinner [Tue, 19 May 2020 23:57:17 +0000 (01:57 +0200)] 
bpo-40521: Fix update_slot() when INTERN_NAME_STRINGS is not defined (#20246)

Fix type update_slot() function when the macro INTERN_NAME_STRINGS is
not defined: use _PyUnicode_EQ() in this case.

5 years agobpo-40645: restrict HMAC key len to INT_MAX (GH-20238)
Christian Heimes [Tue, 19 May 2020 22:35:51 +0000 (00:35 +0200)] 
bpo-40645: restrict HMAC key len to INT_MAX (GH-20238)

Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: @tiran
5 years agobpo-38870: invalid escape sequence (GH-20240)
Batuhan Taskaya [Tue, 19 May 2020 22:14:14 +0000 (01:14 +0300)] 
bpo-38870: invalid escape sequence (GH-20240)

`/home/isidentical/cpython/cpython/Lib/test/test_unparse.py:333: DeprecationWarning: invalid escape sequence \X`

Automerge-Triggered-By: @pablogsal
5 years agobpo-39631: Adds NEWS entry (GH-20227)
Steve Dower [Tue, 19 May 2020 22:10:03 +0000 (23:10 +0100)] 
bpo-39631: Adds NEWS entry (GH-20227)

5 years agobpo-32604: PEP 554 for use in test suite (GH-19985)
Joannah Nanjekye [Tue, 19 May 2020 17:20:38 +0000 (14:20 -0300)] 
bpo-32604: PEP 554 for use in test suite (GH-19985)

* PEP 554 for use in test suite

* 📜🤖 Added by blurb_it.

* Fix space

* Add doc to doc tree

* Move to modules doc tree

* Fix suspicious doc errors

* Fix test__all

* Docs docs docs

* Support isolated and fix wait

* Fix white space

* Remove undefined from __all__

* Fix recv and add exceptions

* Remove unused exceptions, fix pep 8 formatting errors and fix _NOT_SET in recv_nowait()

Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agoEnable GitHub Actions for 3.9 branch (GH-20231)
Hugo van Kemenade [Tue, 19 May 2020 17:01:32 +0000 (20:01 +0300)] 
Enable GitHub Actions for 3.9 branch (GH-20231)

5 years agobpo-37616: Handle version information more gracefully in getpath.c (GH-20214)
Pablo Galindo [Tue, 19 May 2020 16:28:05 +0000 (17:28 +0100)] 
bpo-37616: Handle version information more gracefully in getpath.c (GH-20214)

5 years agobpo-40683: Add zoneinfo to LIBSUBDIRS (#20229)
Paul Ganssle [Tue, 19 May 2020 15:55:18 +0000 (11:55 -0400)] 
bpo-40683: Add zoneinfo to LIBSUBDIRS (#20229)

Without this, only the _zoneinfo module is getting installed, not the
zoneinfo module. I believe this was not noticed earlier because
test.test_zoneinfo was also not being installed.

5 years agoFix typo in multiprocessing documentation (GH-20016)
Joe DeCapo [Tue, 19 May 2020 14:37:09 +0000 (09:37 -0500)] 
Fix typo in multiprocessing documentation (GH-20016)

5 years agoDoc: Python 3.10 in sidebar and version switcher. (GH-20209)
Julien Palard [Tue, 19 May 2020 12:26:43 +0000 (14:26 +0200)] 
Doc: Python 3.10 in sidebar and version switcher. (GH-20209)

5 years agobpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206)
Minmin Gong [Tue, 19 May 2020 12:22:16 +0000 (05:22 -0700)] 
bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206)

This allows building with older versions of the Windows SDK where the value is not defined.

5 years agobpo-39631: Fix file association MIME type in the Windows installer (GH-20205)
Zackery Spytz [Tue, 19 May 2020 12:20:39 +0000 (06:20 -0600)] 
bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)

Use text/x-python instead of text/plain to avoid issues with tools assuming that "ShellExecute(script)" is a non-executable operation.

5 years ago3.10 whatsnew needs to use blurb-produced changelog (GH-20213)
Ned Deily [Tue, 19 May 2020 11:39:29 +0000 (07:39 -0400)] 
3.10 whatsnew needs to use blurb-produced changelog (GH-20213)

5 years agoConsolidate 3.9.0b1 NEWS in the master branch
Łukasz Langa [Tue, 19 May 2020 11:30:07 +0000 (13:30 +0200)] 
Consolidate 3.9.0b1 NEWS in the master branch

5 years agobpo-32309: Implement asyncio.to_thread() (GH-20143)
Kyle Stanley [Tue, 19 May 2020 03:03:28 +0000 (23:03 -0400)] 
bpo-32309: Implement asyncio.to_thread() (GH-20143)

Implements `asyncio.to_thread`, a coroutine for asynchronously running IO-bound functions in a separate thread without blocking the event loop. See the discussion starting from [here](https://github.com/python/cpython/pull/18410#issuecomment-628930973) in GH-18410 for context.

Automerge-Triggered-By: @aeros
5 years agoPython 3.10.0a0 (GH-20198)
Pablo Galindo [Tue, 19 May 2020 02:33:01 +0000 (03:33 +0100)] 
Python 3.10.0a0 (GH-20198)

5 years agoFix code-block in zoneinfo (GH-20201)
Anthony Sottile [Tue, 19 May 2020 02:02:54 +0000 (19:02 -0700)] 
Fix code-block in zoneinfo (GH-20201)

```
Warning, treated as error:
/tmp/code/Doc/library/zoneinfo.rst:303:Error in "code-block" directive:
1 argument(s) required, 0 supplied.

.. code-block::

    >>> a = ZoneInfo("Europe/Berlin")
    >>> b = pickle.loads(europe_berlin_pkl)
    >>> a is b
    True
```

5 years agobpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194)
Pablo Galindo [Mon, 18 May 2020 22:37:06 +0000 (23:37 +0100)] 
bpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194)