| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The topological sort functionality that was introduced initially in the
functools module has been moved to a new graphlib module to
better accommodate the new tools and keep the original scope of the
functools module.
(cherry picked from commit 2f172d8f1525defe9bba4d49e967fdfc69151731)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
| |
Automerge-Triggered-By: @pablogsal
(cherry picked from commit cf88871d6a9c12e7b7e5f4d65abc2ec6e2fe952e)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
|
|
| |
When I wrote the documentation for `asyncio.to_thread()`, I mistakenly assumed that `return await loop.run_in_executor(...)` within an async def function would return a Future. In reality, it returns a coroutine.
This likely won't affect typical usage of `asyncio.to_thread()`, but it's important for the documentation to be correct here. In general, we also tend to avoid returning futures from high-level APIs in asyncio.
(cherry picked from commit 2b201369b435a4266bda5b895e3b615dbe28ea6e)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
| |
Leave selection when right click within. This exception to clearing selections when right-clicking was omitted from the previous commit, 4ca060d. I did not realize that this completely disabled the context menu entries, and I should have merged a minimal fix immediately. An automated test should follow.
(cherry picked from commit 97e4e0f53d6690db6b942678489716a30925b8af)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
| |
* Remove unused imports in zoneinfo
* Remove unused variables in zoneinfo
* Remove else after raise
(cherry picked from commit 364b5ead1584583db91ef7f9d9f87f01bfbb5774)
Co-authored-by: Paul Ganssle <paul@ganssle.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20514)
* Fix failure of _Py_dg_dtoa to remove trailing zeros
* Add regression test and news entry
* Add explanation about why it's safe to strip trailing zeros
* Make code safer, clean up comments, add change note at top of file
* Nitpick: avoid implicit int-to-float conversion in tests
(cherry picked from commit 895c9c1d438367722f74f437fda96767d770662b)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
| |
(cherry picked from commit c610d970f5373b143bf5f5900d4645e6a90fb460)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
encoded-words. (gh-17620)
* bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.
It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes. The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding). This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed904f734be9f195ae1274eb81426a9e776)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit dc4eee9e266267498a6b783a0abccc23c06f2b87)
Co-authored-by: Fantix King <fantix.king@gmail.com>
|
|
|
|
|
|
|
|
| |
Skip new "racing" socket tests which fail randomly until someone fix
them, to ease analysis of buildbot failures (skip tests which are
known to be broken/unstable).
(cherry picked from commit 84ee7e1573d166fe7a9be676813e12523b62ab24)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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..
(cherry picked from commit db5aed931f8a617f7b63e773f62db468fe9c5ca1)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
| |
If ctypes fails to convert the result of a callback or if a ctypes
callback function raises an exception, sys.unraisablehook is now
called with an exception set. Previously, the error was logged into
stderr by PyErr_Print().
(cherry picked from commit 10228bad0452d94e66c964b625a0b61befa08e59)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
| |
(GH-20196) (GH-20464)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit c116c94)
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 210a137396979d747c2602eeef46c34fc4955448)
Co-authored-by: Fantix King <fantix.king@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 29a1384c040d39659e7d01f1fd7b6eb71ef2634e)
Co-authored-by: Sean Gillespie <sean@swgillespie.me>
|
|
|
|
|
| |
(cherry picked from commit db098bc1f05bd0773943e59f83489f05f28dedf8)
Co-authored-by: idomic <michael.ido@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit be63019ed726b2da045bf232782062830bb6c27d)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
| |
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316f4c6ab451997902579aa69020b537c)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20399) (GH-20404)
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 f7b1e461567e5e3fa3ba46f589d9edc1b45b2dd0)
|
| |
|
|
|
|
|
|
|
|
| |
(GH-19611)
Co-authored-by: Sadhana Srinivasan <rotuna@Sadhanas-MBP.fritz.box>
(cherry picked from commit 448325369ff73011d34d6c3a493014fe3ead8843)
Co-authored-by: Rotuna <sadhanasrinivasan@protonmail.com>
|
|
|
|
|
| |
(cherry picked from commit ef16958d17e83723334a51428f410f726d6492a7)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
|
|
|
|
|
|
|
|
|
| |
: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 4cc2f9348c6e899b76af811fa3bb6c60de642a28)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit c73914a562580ae72048876cb42ed8e76e2c83f9)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
|
|
|
|
|
| |
(cherry picked from commit 3436f5f899f272d7164add072beb18eebd46d777)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 16ef3241939a3a64a447e5d7aabaf2e29deca621)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
| |
This was the only failure running unittest.main(test.test_idle) after imports.
(cherry picked from commit 905b3cd05f8d2c29e1605d109900e3e9d07af4d3)
Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
|
|
|
|
|
|
|
|
|
|
| |
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 7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e)
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 909b5714e1303357868bc5e281c1cf508d5d5a17)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit da7d1f04086598a29f77bd452beefe847d038344)
Co-authored-by: Jonathan Goble <jcgoble3@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(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 ae145833025b0156ee2a28219e3370f3b27b2a36)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
| |
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
|
|
|
|
|
|
| |
(GH-20294) (GH-20302)
(cherry picked from commit 72e0aa2)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@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 0f56263e62ba91d0baae40fb98947a3a98034a73)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
|
|
| |
(as title)
Automerge-Triggered-By: @Mariatta
(cherry picked from commit f2947e354c95d246b1836ac78d4c820c420e259b)
Co-authored-by: Kunal Bhalla <bhalla.kunal@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 e572c7f6dbe5397153803eab256e4a4ca3384f80)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
`/home/isidentical/cpython/cpython/Lib/test/test_unparse.py:333: DeprecationWarning: invalid escape sequence \X`
Automerge-Triggered-By: @pablogsal
(cherry picked from commit dd74b6fde31aff9aa46c4fc2a830c569764e1b63)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
|
|
|
|
|
|
|
|
| |
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 cc2bbc2227c3f5ed9d8f6b3bd052e6f9e68279d2)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()".
|
|
|
|
| |
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).
|
|
|
|
| |
parser (GH-20151)
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
(GH-20156)
|
|
|
|
|
| |
location information (GH-20157)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|