| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
(GH-26852)
(cherry picked from commit adfa1ba398c74720b42f16f06fd3ec0353599fa5)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
correctly (GH-26764) (GH-26845)
No longer use len() to get the length of the input data. For some buffer protocol objects,
the length obtained by using len() is wrong.
(cherry picked from commit bc6c12c72a9536acc96e7b9355fd69d1083a43c1)
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.
WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb3214d09d4bf0288bc45f3c1f167f67e4514)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 30f7a77f359a0fc6e37988b0f317a77a15d66b7b)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
| |
The faulthandler module now detects if a fatal error occurs during a
garbage collector collection (only if all_threads is true).
(cherry picked from commit d19163912bfc790283724f05328bd31e4e65003d)
|
|
|
|
|
| |
* Make sure that line number is set when entering comprehension scope in compiler.
(cherry picked from commit 82e5c28af7049c4f5343c808f172cbe2e145f49b)
|
|
|
|
|
|
|
| |
Test for execution of the body was null. It would pass
even if the code which should be skipped was executed.
(cherry picked from commit 5d2b3a0d688cf8a33db3d266c9e7049c13766a4c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [Enum] reduce scope of new format behavior
Instead of treating all Enums the same for format(), only user mixed-in
enums will be affected. In other words, IntEnum and IntFlag will not be
changing the format() behavior, due to the requirement that they be
drop-in replacements of existing integer constants.
If a user creates their own integer-based enum, then the new behavior
will apply:
class Grades(int, Enum):
A = 5
B = 4
C = 3
D = 2
F = 0
Now: format(Grades.B) -> DeprecationWarning and '4'
3.12: -> no warning, and 'B'.
(cherry picked from commit f60b07ab6c943fce084772c3c7731ab3bbd213ff)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
| |
(GH-26632) (GH-26792)
(cherry picked from commit 05073036dcecefc00b0c3e7397601809da41e2f1)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_importlib.test_entry_points_by_index (GH-26784)
This avoids the following error if DeprecationWarnings are ignored.
======================================================================
ERROR: test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests)
Prior versions of Distribution.entry_points would return a
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.10.0b3/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index
expected = next(iter(caught))
StopIteration
----------------------------------------------------------------------
Ran 1402 tests in 2.125s
FAILED (errors=1, skipped=18, expected failures=1)
(cherry picked from commit df1502e47fc1e0cf1e7d460ae04530c3e2e4a7c6)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
|
|
|
|
|
|
|
| |
(cherry picked from commit c106cf31f816f719de0a83ff31b9f4d0bea3519b)
Co-authored-by: Brandt Bucher <brandt@python.org>
Automerge-Triggered-By: GH:brandtbucher
|
|
|
|
|
|
|
|
| |
(GH-24331) (GH-26773)
…inel defaults
(cherry picked from commit f73377d57c5272390de63cccc3c292c44689310a)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
| |
`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.
(cherry picked from commit c544393b89f9b3e2b1a22588fc9ae58019314879)
Co-authored-by: Joe <nigelchiang@outlook.com>
|
|
|
|
|
|
| |
* [3.10] [Enum] improve test, add andrei kulakov to ACKS (GH-26726).
(cherry picked from commit cb2014f2077c92c35486bf0db7e646a68478a7a5)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In an inheritance chain of
int -> my_int -> final_int
the data type is now final_int (not my_int)
(cherry picked from commit 3a7cccfd6cd3693e1a2ab65ee05d7f45f8501dfa)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
| |
initialization (GH-26712)
(cherry picked from commit 507ed6fa1d6661e0f8e6d3282764aa9625a99594)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 736ed6f7a9f465ba728198e8bca81e5fbe71bc37)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
| |
(cherry picked from commit 9f1c5f6e8af6ba3f659b2aea1e221ac9695828ba)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit bf527277d4e4907e32d76ca7ba667ab3149fe258)
Co-authored-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
|
|
|
|
|
|
| |
buffers (GH-26676) (GH-26695)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit a342cc5891dbd8a08d40e9444f2e2c9e93258721)
|
|
|
|
|
|
|
| |
(GH-24646) (GH-26674)
(cherry picked from commit 4cb6ba14325cff98589c2660d1d2c65f4aacfee4)
Co-authored-by: huzhaojie <hu.zj@foxmail.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit c956734d7af83ad31f847d31d0d26df087add9a4)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e26014f1c47d26d6097ff7a0f25384bfbde714a9)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26660)
by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;
by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
(cherry picked from commit 62f1d2b3d7dda99598d053e10b785c463fdcf591)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26649) (GH-26653)
This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:
class Str1Enum(str, Enum):
GH- some behavior here
class Str2Enum(str, Enum):
GH- some more behavior here
class FinalStrEnum(Str1Enum, Str2Enum):
GH- this now works
(cherry picked from commit 8a4f0850d75747af8c96ca0e7eef1f5c1abfba25)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
|
| |
repr (GH-18180) (GH-26650)
(cherry picked from commit 6544b2532df82d137b71323445a07a6e29bcdec0)
Co-authored-by: Daniel Hahler <git@thequod.de>
|
|
|
|
|
|
|
|
|
|
| |
(GH-26586) (GH-26635)
Move the check for missing named flags in flag aliases from Flag creation
to a new *verify* decorator..
(cherry picked from commit eea8148b7dff5ffc7b84433859ac819b1d92a74d)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
| |
keywords (GH-26630)
(cherry picked from commit 457ce60fc70f1c9290023f46fb82b6a490dff32e)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
| |
syntax errors (GH-26611) (GH-26616)
(cherry picked from commit 9fd21f649d66dcb10108ee395fd68ed32c8239cd)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 2ea6d890281c415e0a2f00e63526e592da8ce3d9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit e58d762c1fb4ad5e021d016c80c2bc4513632d2f)
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
|
|
|
|
|
|
|
| |
errors (GH-26589)
(cherry picked from commit d334c73b56756e90c33ce06e3a6ec23271aa099d)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit ffd87b7093109c279caf8e3ca060f408a102388a)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
|
|
|
| |
suite (GH-26542) (GH-26544)
(cherry picked from commit f171877ebe276749f31386baed5841ce37cbee2e)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
test_disallow_instantiation and test_readonly_types try to test all the available
digests, however under FIPS mode, while the algorithms are available, trying to use
them will fail with a ValueError.
(cherry picked from commit a46c220edc5cf716d0b71eb80ac29ecdb4ebb430)
Co-authored-by: stratakis <cstratak@redhat.com>
Co-authored-by: stratakis <cstratak@redhat.com>
|
|
|
|
|
|
|
| |
finally (GH-26523) (GH-26524)
(cherry picked from commit b250f89bb7e05e72a4641d44b988866b919575db)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-26477) (GH-26478)
Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.
(cherry picked from commit 39dd141)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError.
(cherry picked from commit f3491242e41933aa9529add7102edb68b80a25e9)
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
|
|
|
|
|
|
|
| |
Fix test_ssl.test_wrong_cert_tls13(): use suppress_ragged_eofs=False,
since read() can raise ssl.SSLEOFError on Windows.
(cherry picked from commit ea0210fa8ccca769896847f25fc6fadfe9a717bc)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
* Backport 937cebc93 to 3.10
* Update importlib
|
|
|
|
|
|
|
| |
It wasn't actually detecting the regression due to the
assertion being too lenient.
(cherry picked from commit e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
| |
Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).
(cherry picked from commit 320eaa7f42b413cd5e5436ec92d4dc5ba150395f)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [bpo-44246](): Entry points performance improvements.
From importlib_metadata 4.3.1.
* [bpo-44246](): Sync with importlib_metadata 4.4
(cherry picked from commit c34ed08d975fb7daa7b329f7c631647782290393)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
|
|
|
|
|
|
| |
From importlib_metadata 4.3.1.
(cherry picked from commit 410b70d39d9d77384f8b8597560f6731530149ca)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
|
|
|
| |
5.0.6). (GH-26387) (#26389)
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit f6fbdb90ee450ad693f7a7809035d0dc968f98b7)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
|
|
| |
Fix a regression in type() when a metaclass raises an exception. The
C function type_new() must properly report the exception when a
metaclass constructor raises an exception and the winner class is not
the metaclass.
(cherry picked from commit bd199e72fb60a8ff001a023f23925092a290be91)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.
Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.
_PyMem_IsPtrFreed() argument is now constant.
(cherry picked from commit 615069eb08494d089bf24e43547fbc482ed699b8)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The invalid assignment rules are very delicate since the parser can
easily raise an invalid assignment when a keyword argument is provided.
As they are very deep into the grammar tree, is very difficult to
specify in which contexts these rules can be used and in which don't.
For that, we need to use a different version of the rule that doesn't do
error checking in those situations where we don't want the rule to raise
(keyword arguments and generator expressions).
We also need to check if we are in left-recursive rule, as those can try
to eagerly advance the parser even if the parse will fail at the end of
the expression. Failing to do this allows the parser to start parsing a
call as a tuple and incorrectly identify a keyword argument as an
invalid assignment, before it realizes that it was not a tuple after all.
(cherry picked from commit c878a9796841c1f4726e6dd5ac49a478af4c8504)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26284) (GH-26286)
* [bpo-43643](): Sync with python/importlib_resources@c17a610aad.
* Sync with python/importlib_resources@89fd5e961a.
(cherry picked from commit 875b3d84b3072b2d3c352ad9f0ff52c441fbd12e)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
|