summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42095: plistlib: Add tests that compare with plutil(1) (#27173)Hasan2021-07-172-0/+76
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43425: Remove test2to3 from Tools (#26981)Dong-hee Na2021-07-179-74/+3
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* Replace @ilevkivskyi with @Fidget-Spinner as typing code owner (#27210)Łukasz Langa2021-07-171-1/+1
|
* bpo-41249: Fix postponed annotations for TypedDict (GH-27017)Germán Méndez Bravo2021-07-174-7/+43
| | | | | | | | This fixes TypedDict to work with get_type_hints and postponed evaluation of annotations across modules. This is done by adding the module name to ForwardRef at the time the object is created and using that to resolve the globals during the evaluation. Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-44490: Improve typing module compatibility with types.Union (GH-27048)Yurii Karabas2021-07-175-7/+40
|
* bpo-44655: Include the name of the type in unset __slots__ attribute errors ↵Pablo Galindo Salgado2021-07-163-4/+17
| | | | (GH-27199)
* bpo-44655: Don't include suggestions for attributes that are the same as the ↵Pablo Galindo Salgado2021-07-163-0/+17
| | | | missing one (GH-27197)
* Revert "bpo-44645: Check for interrupts on any potentially backwards edge. ↵Pablo Galindo Salgado2021-07-162-31/+1
| | | | | (GH-27167)" (#27194) This reverts commit 000e70ad5246732fcbd27cf59268185cbd5ad734.
* Remove legacy opcache structs (GH-27164)Ken Jin2021-07-163-26/+1
|
* bpo-20201: variadic arguments support for AC (GH-18609)Batuhan Taskaya2021-07-168-100/+664
| | | Implement support for `*args` in AC, and port `print()` to use it.
* bpo-44647: Add a permanent Unicode-valued env var to regrtest (#27187)Łukasz Langa2021-07-163-1/+23
|
* bpo-44638: Add a reference to the zipp project and hint as to how to use it. ↵Jason R. Coombs2021-07-162-0/+5
| | | | | (GH-27188) Automerge-Triggered-By: GH:jaraco
* bpo-44652: Preserve natural order of args in the union type. (GH-27185)Serhiy Storchaka2021-07-163-11/+39
|
* bpo-40897:Give priority to using the current class constructor in ↵Weipeng Hong2021-07-163-8/+59
| | | | | `inspect.signature` (#27177) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44569: Decouple frame formatting in traceback.py (GH-27038)Ammar Askar2021-07-164-34/+70
|
* Remove unnecessary 'invalid_primary' rule in the parser (GH-27186)Pablo Galindo Salgado2021-07-164-309/+239
|
* bpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167)Mark Shannon2021-07-162-1/+31
|
* bpo-44636: Collapse union of equal types (GH-27178)Serhiy Storchaka2021-07-163-9/+23
| | | | | | The result of `int | int` is now `int`. Fix comparison of the union type with non-hashable objects. `int | str == {}` no longer raises a TypeError.
* bpo-44646: Fix the hash of the union type. (#27179)Serhiy Storchaka2021-07-163-4/+12
| | | | | | It no longer depends on the order of arguments. hash(int | str) == hash(str | int) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
* bpo-43950: make BinOp specializations more reliable (GH-27126)Batuhan Taskaya2021-07-153-2/+40
|
* bpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc ↵T. Wouters2021-07-151-3/+11
| | | | | | | | (GH-27165) The non-GC-type branch of subtype_dealloc is using the type of an object after freeing in the same unsafe way as GH-26274 fixes. (I believe the old news entry covers this change well enough.) https://bugs.python.org/issue44184
* bpo-44647: Fix test_httpservers failing on Unicode characters in os.environ ↵Łukasz Langa2021-07-151-4/+13
| | | | | on Windows (GH-27161) GH-23638 introduced a new test for Accept: headers in CGI HTTP servers. This test serializes all of os.environ on the server side. For non-UTF8 locales this can fail for some Unicode characters found in environment variables. This change fixes the HTTP_ACCEPT test.
* bpo-44626: Merge basic blocks earlier to enable better handling of exit ↵Mark Shannon2021-07-155-4337/+4411
| | | | blocks without line numbers (GH-27138)
* bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)Erlend Egeberg Aasland2021-07-151-3/+3
|
* Remove sys._deactivate_opcache() now that is not needed (GH-27154)Pablo Galindo Salgado2021-07-154-50/+1
|
* bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. ↵Mark Shannon2021-07-152-2/+14
| | | | (GH-27160)
* bpo-42073: allow classmethod to wrap other classmethod-like descriptors (#27115)Łukasz Langa2021-07-153-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Erik Welch. bpo-19072 (#8405) allows `classmethod` to wrap other descriptors, but this does not work when the wrapped descriptor mimics classmethod. The current PR fixes this. In Python 3.8 and before, one could create a callable descriptor such that this works as expected (see Lib/test/test_decorators.py for examples): ```python class A: @myclassmethod def f1(cls): return cls @classmethod @myclassmethod def f2(cls): return cls ``` In Python 3.8 and before, `A.f2()` return `A`. Currently in Python 3.9, it returns `type(A)`. This PR make `A.f2()` return `A` again. As of #8405, classmethod calls `obj.__get__(type)` if `obj` has `__get__`. This allows one to chain `@classmethod` and `@property` together. When using classmethod-like descriptors, it's the second argument to `__get__`--the owner or the type--that is important, but this argument is currently missing. Since it is None, the "owner" argument is assumed to be the type of the first argument, which, in this case, is wrong (we want `A`, not `type(A)`). This PR updates classmethod to call `obj.__get__(type, type)` if `obj` has `__get__`. Co-authored-by: Erik Welch <erik.n.welch@gmail.com>
* bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)Irit Katriel2021-07-157-23/+203
|
* Remove unnecessary pass statement in msvccompiler.py (GH-27123)Leonardo Freua2021-07-151-1/+0
|
* bpo-42799: fnmatch module: bump up size of lru_cache for patterns (GH-27084)andrei kulakov2021-07-153-1/+8
|
* Remove unnecessary test for `xc == 1` in _pydecimal (GH-27102)Elisha Hollander2021-07-151-2/+2
| | | | - if `xc == 1` then the function returns on line 2140; - other assignments to `xc` are inside the `y.sign == 1` condition block which always returns early
* Fix osx_framework_user include to match distutils (#27093)Tzu-ping Chung2021-07-152-1/+3
|
* bpo-44589: raise a SyntaxError when mapping patterns have duplicate literal ↵Jack DeVries2021-07-154-19/+82
| | | | keys (GH-27131)
* bpo-44473: Update docstring and documentation for QueueHandler.prepar… ↵Vinay Sajip2021-07-152-6/+13
| | | | | (GH-27140) …e().
* bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)Shane Harvey2021-07-144-0/+14
|
* Add release highlights for the 3.10 what's new document (GH-27150)Pablo Galindo Salgado2021-07-141-1/+29
|
* Fix docstring typo in ↵Erlend Egeberg Aasland2021-07-144-8/+8
| | | | | | | | sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147) Both `executescript` methods contain the same docstring typo: _"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_ Automerge-Triggered-By: GH:pablogsal
* bpo-44639: fix typo in sqlite.rst (transation => transaction) (GH-27145)Jack DeVries2021-07-141-1/+1
| | | | | | | To my understanding, this is supposed to say "transaction". See the relevant source: https://github.com/python/cpython/blob/a158b20019b50e3ece6e4743ec4e6ae8d818b690/Modules/_sqlite/connection.c#L1434-L1467
* bpo-44632: Fix support of TypeVar in the union type (GH-27139)Serhiy Storchaka2021-07-142-2/+8
| | | | int | TypeVar('T') returns now an instance of types.Union instead of typing.Union.
* bpo-44635: Convert None to NoneType in the union type constructor (GH-27136)Serhiy Storchaka2021-07-143-9/+21
|
* bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)Erlend Egeberg Aasland2021-07-148-92/+90
| | | Automerge-Triggered-By: GH:encukou
* bpo-44616: Mark all clean up instructions at end of named exception block as ↵Mark Shannon2021-07-143-5/+27
| | | | artificial (GH-27109)
* bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)Serhiy Storchaka2021-07-143-2/+12
| | | | if it is called with a sequence or set, but not list or tuple.
* bpo-44606: Fix __instancecheck__ and __subclasscheck__ for the union type. ↵Serhiy Storchaka2021-07-143-6/+55
| | | | | | | | | | (GH-27120) * Fix issubclass() for None. E.g. issubclass(type(None), int | None) returns now True. * Fix issubclass() for virtual subclasses. E.g. issubclass(dict, int | collections.abc.Mapping) returns now True. * Fix crash in isinstance() if the check for one of items raises exception.
* bpo-44630: Fix assertion errors in csv module (GH-27127)T. Wouters2021-07-132-4/+14
| | | | | | | | | | | | | Fix incorrect handling of exceptions when interpreting dialect objects in the csv module. Not clearing exceptions between calls to PyObject_GetAttrString() causes assertion failures in pydebug mode (or with assertions enabled). Add a minimal test that would've caught this (passing None as dialect, or any object that isn't a csv.Dialect subclass, which the csv module allows and caters to, even though it is not documented.) In pydebug mode, the test triggers the assertion failure in the old code. Contributed-By: T. Wouters [Google]
* bpo-33346: Allow async comprehensions inside implicit async comprehensions ↵Serhiy Storchaka2021-07-136-17/+109
| | | | | (GH-6766) Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent ↵Konstantin-Glukhov2021-07-132-0/+2
| | | | erroneous STDIN consumption (GH-27092)
* Fix typos in Mac/README.rst (#27108)Clemens Brunner2021-07-131-3/+3
|
* bpo-43126: Expand docs on io.IOBase.readlines() method (#27061)andrei kulakov2021-07-131-0/+3
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44514: Add doctest testcleanup for configparser and bz2 (#26909)Kevin Follstad2021-07-132-0/+10
| | | | | Add testcleanup section to configparser and bz2 documentation which removes temporary files created in the filesystem when 'make doctest' is run.