Commit Graph

107415 Commits

Author SHA1 Message Date
Miss Islington (bot) 7f77ac463c
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.
(cherry picked from commit 7c30d12bd5)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
2020-05-22 14:35:22 -07:00
Miss Islington (bot) a08b7c3bb0
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
(cherry picked from commit 909b5714e1)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-22 11:22:30 -07:00
Miss Islington (bot) 983b17ca13
bpo-40730: Remove redundant 'to' (GH-20316) (GH-20318)
@ericvsmith I guess it is correct to merge it into master and not 3.9 directly?

Automerge-Triggered-By: @ericvsmith
(cherry picked from commit 30d5a7364d)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
2020-05-22 11:26:54 -04:00
Miss Islington (bot) 51025e0c86
Fix the URL to fishshell.com (GH-20251)
(cherry picked from commit da7d1f0408)

Co-authored-by: Jonathan Goble <jcgoble3@gmail.com>
2020-05-22 07:32:21 -07:00
Miss Islington (bot) 5c01ed6f93
bpo-40725: Restore missing column of digits (GH-20313) (GH-20315) 2020-05-22 07:18:01 -07:00
Miss Islington (bot) 427c696400
Fix debug output in PEG parser generator (GH-20308)
(cherry picked from commit b831129123)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-05-21 19:05:20 -07:00
Miss Islington (bot) 55c8923524
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.
(cherry picked from commit ae14583302)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2020-05-21 18:14:55 -07:00
Miss Islington (bot) b4d08f1eb5
[doc] Remove references to obsolete BuildApplet on macOS. (GH-20023) (GH-20304)
(cherry picked from commit 7864f11cdf)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-05-21 19:01:41 -04:00
Miss Islington (bot) d00aaf306a
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>
(cherry picked from commit b8a65ec1d3)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2020-05-21 15:58:16 -07:00
Pablo Galindo 7178b1bb68
[3.9] Fix typing problems reported by mypy in pegen (GH-20297) (GH-20300)
(cherry picked from commit d10fef35c6)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-05-21 22:09:43 +01:00
Pablo Galindo 275d7e1080
[3.9] bpo-40176: Improve error messages for trailing comma on from import (GH-20294) (GH-20302)
(cherry picked from commit 72e0aa2)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2020-05-21 22:04:54 +01:00
Miss Islington (bot) c817a1c4de
[3.9] bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291) (GH-20293)
(cherry picked from commit a487a39dca)


Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Automerge-Triggered-By: @corona10
2020-05-21 10:15:53 -07:00
Miss Islington (bot) 3e650545bf
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/20143GH-discussion_r427808225) in GH-20143 for context.

Automerge-Triggered-By: @aeros
(cherry picked from commit 0f56263e62)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-05-20 22:38:00 -07:00
Miss Islington (bot) 6387358939
Update whatsnew benchmark results for 3.9 (GH-20276) (GH-20277) 2020-05-20 19:11:28 -07:00
Miss Islington (bot) 4a1dba7bb8
s/wakup/wakeup (GH-20250)
(as title)

Automerge-Triggered-By: @Mariatta
(cherry picked from commit f2947e354c)

Co-authored-by: Kunal Bhalla <bhalla.kunal@gmail.com>
2020-05-20 10:58:47 -07:00
Miss Islington (bot) 412ed13171
Use v2 of GitHub Actions where available (GH-20232)
Automerge-Triggered-By: @Mariatta
(cherry picked from commit 7fbe65dbc4)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-05-20 09:59:25 -07:00
Miss Islington (bot) f541a371a5
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>
(cherry picked from commit e572c7f6db)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-20 07:57:08 -07:00
Miss Islington (bot) e7bf8684e2
bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255)
(cherry picked from commit bac170cd93)

Co-authored-by: Ned Deily <nad@python.org>
2020-05-20 02:47:07 -07:00
Miss Islington (bot) 12fa658d05
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
(cherry picked from commit 550f30c8f3)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
2020-05-19 19:37:17 -07:00
Miss Islington (bot) 6ed37430d3
bpo-40645: restrict HMAC key len to INT_MAX (GH-20238)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
(cherry picked from commit aca4670ad6)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-19 15:52:54 -07:00
Miss Islington (bot) 059279d870
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
(cherry picked from commit dd74b6fde3)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2020-05-19 15:33:45 -07:00
Victor Stinner 9512ad74b0
[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 (GH-20228)
Remove --with-experimental-isolated-subinterpreters configure option
in Python 3.9: the experiment continues in the master branch, but
it's no longer needed in 3.9.
2020-05-20 00:27:46 +02:00
Miss Islington (bot) b008445a7b
Enable GitHub Actions for 3.9 branch (GH-20231)
(cherry picked from commit c105f7d895)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-05-19 10:24:52 -07:00
Miss Islington (bot) b5bd4358fc
bpo-40683: Add zoneinfo to LIBSUBDIRS (GH-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.
(cherry picked from commit 2abededbc4)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
2020-05-19 09:13:15 -07:00
Miss Islington (bot) 20736b35b7
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
```
(cherry picked from commit 9095f76613)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2020-05-19 07:02:32 -07:00
Miss Islington (bot) 76d9a9cdc1
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.
(cherry picked from commit 711f9e180a)

Co-authored-by: Minmin Gong <gongminmin@msn.com>
2020-05-19 05:40:21 -07:00
Miss Islington (bot) c06983bc30
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.
(cherry picked from commit 8c862e5124)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-05-19 05:39:16 -07:00
Miss Islington (bot) 73812a4994
[3.9] Doc: Python 3.10 in sidebar and version switcher. (GH-20209) (GH-20221)
(cherry picked from commit 19e3e00264)


Co-authored-by: Julien Palard <julien@palard.fr>
2020-05-19 05:31:57 -07:00
Miss Islington (bot) e2991308c9
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/18410GH-issuecomment-628930973) in GH-18410 for context.

Automerge-Triggered-By: @aeros
(cherry picked from commit cc2bbc2227)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-05-19 03:03:25 -07:00
Miss Islington (bot) 3d062829de
bpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194)
(cherry picked from commit 3764069f3b)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-05-18 19:31:28 -07:00
Miss Islington (bot) f02c3048dc
Use _PyErr_ChainStackItem() inside gen_send_ex(). (GH-20173) (#20202)
_PyErr_ChainStackItem was just added in GH-19951 (for bpo-31033).
(cherry picked from commit ff7a8b03c4)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
2020-05-19 04:14:13 +02:00
Łukasz Langa 1bf757884a
Update README links to point to 3.9 and not master 2020-05-19 02:31:31 +02:00
Łukasz Langa 5e6f198bdb
Post 3.9.0b1 2020-05-19 02:12:30 +02:00
Łukasz Langa 97fe9cfd9f
Python 3.9.0b1 2020-05-19 01:07:09 +02:00
Hai Shi a3ec3ad9e2
bpo-40275: More lazy imports in test.support (GH-20131)
Make the the following imports lazy in test.support:

* bz2
* gzip
* lzma
* resource
* zlib

The following test.support decorators now need to be called
with parenthesis:

* @support.requires_bz2
* @support.requires_gzip
* @support.requires_lzma
* @support.requires_zlib

For example, "@requires_zlib" becomes "@requires_zlib()".
2020-05-19 00:02:57 +02:00
Pablo Galindo ced4e5c227
Regenerate the parser (#20195) 2020-05-18 23:47:51 +02:00
Batuhan Taskaya c102a14825
bpo-38870: Don't omit parenthesis when unparsing a slice in ast.unparse
When unparsing a non-empty tuple, the parentheses can be safely
omitted if there aren't any elements that explicitly require them (such as starred expressions).
2020-05-18 21:48:49 +01:00
Lysandros Nikolaou 75b863aa97
bpo-40334: Reproduce error message for type comments on bare '*' in the new parser (GH-20151) 2020-05-18 20:14:47 +01:00
CyberSaxosTiGER d71a6492db
bpo-38870: correctly escape unprintable characters on ast.unparse (GH-20166)
Unprintable characters such as `\x00` weren't correctly roundtripped
due to not using default string repr when generating docstrings. This
patch correctly encodes all unprintable characters (except `\n` and `\t`, which
are commonly used for formatting, and found unescaped).

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2020-05-18 19:41:35 +01:00
Lysandros Nikolaou dc31800f86
bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183)
Create a `make venv` target, that creates a virtual environment
and installs the dependency in that venv. `make time` and all
the related targets are changed to use the virtual environment
python.

Automerge-Triggered-By: @pablogsal
2020-05-18 11:27:40 -07:00
Batuhan Taskaya 2135e10dc7
bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156) 2020-05-18 19:23:48 +01:00
Irit Katriel e6578a226d
bpo-40662: Fixed ast.get_source_segment for ast nodes that have incomplete location information (GH-20157)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-05-18 19:14:12 +01:00
Batuhan Taskaya 63b8e0cba3
bpo-40528: Improve AST generation script to do builds simultaneously (GH-19968)
- Switch from getopt to argparse.
- Removed the limitation of not being able to produce both C and H simultaneously.

This will make it run faster since it parses the asdl definition once and uses the generated tree to generate both the header and the C source.
2020-05-18 18:42:10 +01:00
Lysandros Nikolaou 7b7a21bc4f
bpo-40661: Fix segfault when parsing invalid input (GH-20165)
Fix segfaults when parsing very complex invalid input, like `import äˆ ð£„¯ð¢·žð±‹á”€ð””ð‘©±å®ä±¬ð©¾\n𗶽`.

Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2020-05-18 18:32:03 +01:00
Serhiy Storchaka 08b47c367a
bpo-40257: Revert changes to inspect.getdoc() (GH-20073) 2020-05-18 20:25:07 +03:00
Minmin Gong 98e42d1f88
bpo-35890: Use RegQueryInfoKeyW and CryptAcquireContextW explicitly (GH-19974) 2020-05-18 17:50:03 +01:00
Minmin Gong f660567937
bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) 2020-05-18 17:22:53 +01:00
Minmin Gong 7f21c9ac87
bpo-40653: Move _dirnameW out of #ifdef HAVE_SYMLINK/#endif (GH-20144) 2020-05-18 17:17:19 +01:00
Ned Deily 951ab58024
Revert "bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)" (GH-20182)
This reverts commit 0da5466650.

The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
2020-05-18 11:31:21 -04:00
Lumír 'Frenzy' Balhar adc72bb2f9
bpo-38112: Document that compileall.compile_[dir,file] also accept multiple opt levels (GH-20174) 2020-05-18 15:23:37 +02:00