* bpo-39301: State that floor division is used for right shift operations
* Remove "without overflow check"
(cherry picked from commit af7553ac95)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
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>.
(cherry picked from commit f7b1e46156)
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.
(cherry picked from commit 9645930b5b)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
: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>
(cherry picked from commit 4cc2f9348c)
Co-authored-by: Christian Heimes <christian@python.org>
This was the only failure running unittest.main(test.test_idle) after imports.
(cherry picked from commit 905b3cd05f)
Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
* 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>
(cherry picked from commit 13206b52d1)
Co-authored-by: Bar Harel <bzvi7919@gmail.com>
This is more informative and avoids the question of whether the period should go inside or outside the quotation marks.
See also GH-20007.
(cherry picked from commit 2e76820a50)
Co-authored-by: Mathieu Dupuy <mathieu.dupuy@doctolib.com>
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>
@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>
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>
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>
- 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>
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>