]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-42095: plistlib: Add tests that compare with plutil(1) (#27173)
Hasan [Sat, 17 Jul 2021 10:11:04 +0000 (14:11 +0400)] 
bpo-42095: plistlib: Add tests that compare with plutil(1) (#27173)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-43425: Remove test2to3 from Tools (#26981)
Dong-hee Na [Sat, 17 Jul 2021 10:10:43 +0000 (19:10 +0900)] 
bpo-43425: Remove test2to3 from Tools (#26981)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoReplace @ilevkivskyi with @Fidget-Spinner as typing code owner (#27210)
Łukasz Langa [Sat, 17 Jul 2021 09:21:31 +0000 (11:21 +0200)] 
Replace @ilevkivskyi with @Fidget-Spinner as typing code owner (#27210)

4 years agobpo-41249: Fix postponed annotations for TypedDict (GH-27017)
Germán Méndez Bravo [Sat, 17 Jul 2021 03:49:30 +0000 (20:49 -0700)] 
bpo-41249: Fix postponed annotations for TypedDict (GH-27017)

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>
4 years agobpo-44490: Improve typing module compatibility with types.Union (GH-27048)
Yurii Karabas [Sat, 17 Jul 2021 03:33:40 +0000 (06:33 +0300)] 
bpo-44490: Improve typing module compatibility with types.Union (GH-27048)

4 years agobpo-44655: Include the name of the type in unset __slots__ attribute errors (GH-27199)
Pablo Galindo Salgado [Fri, 16 Jul 2021 23:34:46 +0000 (00:34 +0100)] 
bpo-44655: Include the name of the type in unset __slots__ attribute errors (GH-27199)

4 years agobpo-44655: Don't include suggestions for attributes that are the same as the missing...
Pablo Galindo Salgado [Fri, 16 Jul 2021 20:58:21 +0000 (21:58 +0100)] 
bpo-44655: Don't include suggestions for attributes that are the same as the missing one (GH-27197)

4 years agoRevert "bpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167...
Pablo Galindo Salgado [Fri, 16 Jul 2021 17:05:47 +0000 (18:05 +0100)] 
Revert "bpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167)" (#27194)

This reverts commit 000e70ad5246732fcbd27cf59268185cbd5ad734.

4 years agoRemove legacy opcache structs (GH-27164)
Ken Jin [Fri, 16 Jul 2021 15:49:35 +0000 (23:49 +0800)] 
Remove legacy opcache structs (GH-27164)

4 years agobpo-20201: variadic arguments support for AC (GH-18609)
Batuhan Taskaya [Fri, 16 Jul 2021 15:43:02 +0000 (18:43 +0300)] 
bpo-20201: variadic arguments support for AC (GH-18609)

Implement support for `*args` in AC, and port `print()` to use it.

4 years ago bpo-44647: Add a permanent Unicode-valued env var to regrtest (#27187)
Łukasz Langa [Fri, 16 Jul 2021 13:24:02 +0000 (15:24 +0200)] 
 bpo-44647: Add a permanent Unicode-valued env var to regrtest  (#27187)

4 years agobpo-44638: Add a reference to the zipp project and hint as to how to use it. (GH...
Jason R. Coombs [Fri, 16 Jul 2021 13:14:54 +0000 (09:14 -0400)] 
bpo-44638: Add a reference to the zipp project and hint as to how to use it. (GH-27188)

Automerge-Triggered-By: GH:jaraco
4 years agobpo-44652: Preserve natural order of args in the union type. (GH-27185)
Serhiy Storchaka [Fri, 16 Jul 2021 13:11:30 +0000 (16:11 +0300)] 
bpo-44652: Preserve natural order of args in the union type. (GH-27185)

4 years agobpo-40897:Give priority to using the current class constructor in `inspect.signature...
Weipeng Hong [Fri, 16 Jul 2021 13:04:27 +0000 (21:04 +0800)] 
bpo-40897:Give priority to using the current class constructor in `inspect.signature` (#27177)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44569: Decouple frame formatting in traceback.py (GH-27038)
Ammar Askar [Fri, 16 Jul 2021 12:21:16 +0000 (08:21 -0400)] 
bpo-44569: Decouple frame formatting in traceback.py (GH-27038)

4 years agoRemove unnecessary 'invalid_primary' rule in the parser (GH-27186)
Pablo Galindo Salgado [Fri, 16 Jul 2021 12:20:09 +0000 (13:20 +0100)] 
Remove unnecessary 'invalid_primary' rule in the parser (GH-27186)

4 years agobpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167)
Mark Shannon [Fri, 16 Jul 2021 09:59:31 +0000 (10:59 +0100)] 
bpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167)

4 years agobpo-44636: Collapse union of equal types (GH-27178)
Serhiy Storchaka [Fri, 16 Jul 2021 09:49:33 +0000 (12:49 +0300)] 
bpo-44636: Collapse union of equal types (GH-27178)

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.

4 years agobpo-44646: Fix the hash of the union type. (#27179)
Serhiy Storchaka [Fri, 16 Jul 2021 08:34:56 +0000 (11:34 +0300)] 
bpo-44646: Fix the hash of the union type. (#27179)

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>
4 years agobpo-43950: make BinOp specializations more reliable (GH-27126)
Batuhan Taskaya [Thu, 15 Jul 2021 23:38:11 +0000 (02:38 +0300)] 
bpo-43950: make BinOp specializations more reliable (GH-27126)

4 years agobpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc (GH-27165)
T. Wouters [Thu, 15 Jul 2021 22:40:57 +0000 (00:40 +0200)] 
bpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc (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

4 years agobpo-44647: Fix test_httpservers failing on Unicode characters in os.environ on Window...
Łukasz Langa [Thu, 15 Jul 2021 19:14:24 +0000 (21:14 +0200)] 
bpo-44647: Fix test_httpservers failing on Unicode characters in os.environ 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.

4 years agobpo-44626: Merge basic blocks earlier to enable better handling of exit blocks withou...
Mark Shannon [Thu, 15 Jul 2021 16:46:55 +0000 (17:46 +0100)] 
bpo-44626: Merge basic blocks earlier to enable better handling of exit blocks without line numbers (GH-27138)

4 years agobpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)
Erlend Egeberg Aasland [Thu, 15 Jul 2021 15:49:14 +0000 (17:49 +0200)] 
bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)

4 years agoRemove sys._deactivate_opcache() now that is not needed (GH-27154)
Pablo Galindo Salgado [Thu, 15 Jul 2021 13:43:59 +0000 (14:43 +0100)] 
Remove sys._deactivate_opcache() now that is not needed (GH-27154)

4 years agobpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. (GH-27160)
Mark Shannon [Thu, 15 Jul 2021 13:37:57 +0000 (14:37 +0100)] 
bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. (GH-27160)

4 years agobpo-42073: allow classmethod to wrap other classmethod-like descriptors (#27115)
Łukasz Langa [Thu, 15 Jul 2021 13:16:19 +0000 (15:16 +0200)] 
bpo-42073: allow classmethod to wrap other classmethod-like descriptors (#27115)

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>
4 years agobpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)
Irit Katriel [Thu, 15 Jul 2021 12:13:12 +0000 (13:13 +0100)] 
bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)

4 years agoRemove unnecessary pass statement in msvccompiler.py (GH-27123)
Leonardo Freua [Thu, 15 Jul 2021 10:59:01 +0000 (07:59 -0300)] 
Remove unnecessary pass statement in msvccompiler.py (GH-27123)

4 years agobpo-42799: fnmatch module: bump up size of lru_cache for patterns (GH-27084)
andrei kulakov [Thu, 15 Jul 2021 10:53:26 +0000 (06:53 -0400)] 
bpo-42799: fnmatch module: bump up size of lru_cache for patterns (GH-27084)

4 years agoRemove unnecessary test for `xc == 1` in _pydecimal (GH-27102)
Elisha Hollander [Thu, 15 Jul 2021 10:48:46 +0000 (13:48 +0300)] 
Remove unnecessary test for `xc == 1` in _pydecimal (GH-27102)

- 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

4 years agoFix osx_framework_user include to match distutils (#27093)
Tzu-ping Chung [Thu, 15 Jul 2021 09:44:04 +0000 (17:44 +0800)] 
Fix osx_framework_user include to match distutils (#27093)

4 years agobpo-44589: raise a SyntaxError when mapping patterns have duplicate literal keys...
Jack DeVries [Thu, 15 Jul 2021 00:38:42 +0000 (20:38 -0400)] 
bpo-44589: raise a SyntaxError when mapping patterns have duplicate literal keys (GH-27131)

4 years agobpo-44473: Update docstring and documentation for QueueHandler.prepar… (GH-27140)
Vinay Sajip [Thu, 15 Jul 2021 00:06:48 +0000 (01:06 +0100)] 
bpo-44473: Update docstring and documentation for QueueHandler.prepar… (GH-27140)

…e().

4 years agobpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)
Shane Harvey [Wed, 14 Jul 2021 22:53:15 +0000 (15:53 -0700)] 
bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)

4 years agoAdd release highlights for the 3.10 what's new document (GH-27150)
Pablo Galindo Salgado [Wed, 14 Jul 2021 22:19:55 +0000 (23:19 +0100)] 
Add release highlights for the 3.10 what's new document (GH-27150)

4 years agoFix docstring typo in sqlite3.Connection.executescript/sqlite3.Cursor.executescript...
Erlend Egeberg Aasland [Wed, 14 Jul 2021 21:54:37 +0000 (23:54 +0200)] 
Fix docstring typo in 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
4 years agobpo-44639: fix typo in sqlite.rst (transation => transaction) (GH-27145)
Jack DeVries [Wed, 14 Jul 2021 21:39:54 +0000 (17:39 -0400)] 
bpo-44639: fix typo in sqlite.rst (transation => transaction) (GH-27145)

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

4 years agobpo-44632: Fix support of TypeVar in the union type (GH-27139)
Serhiy Storchaka [Wed, 14 Jul 2021 17:09:15 +0000 (20:09 +0300)] 
bpo-44632: Fix support of TypeVar in the union type (GH-27139)

int | TypeVar('T') returns now an instance of types.Union
instead of typing.Union.

4 years agobpo-44635: Convert None to NoneType in the union type constructor (GH-27136)
Serhiy Storchaka [Wed, 14 Jul 2021 16:54:54 +0000 (19:54 +0300)] 
bpo-44635: Convert None to NoneType in the union type constructor (GH-27136)

4 years agobpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)
Erlend Egeberg Aasland [Wed, 14 Jul 2021 11:26:44 +0000 (13:26 +0200)] 
bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)

Automerge-Triggered-By: GH:encukou
4 years agobpo-44616: Mark all clean up instructions at end of named exception block as artifici...
Mark Shannon [Wed, 14 Jul 2021 09:08:38 +0000 (10:08 +0100)] 
bpo-44616: Mark all clean up instructions at end of named exception block as artificial (GH-27109)

4 years agobpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)
Serhiy Storchaka [Wed, 14 Jul 2021 05:19:18 +0000 (08:19 +0300)] 
bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)

if it is called with a sequence or set, but not list or tuple.

4 years agobpo-44606: Fix __instancecheck__ and __subclasscheck__ for the union type. (GH-27120)
Serhiy Storchaka [Wed, 14 Jul 2021 04:35:39 +0000 (07:35 +0300)] 
bpo-44606: Fix __instancecheck__ and __subclasscheck__ for the union type. (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.

4 years agobpo-44630: Fix assertion errors in csv module (GH-27127)
T. Wouters [Tue, 13 Jul 2021 22:56:45 +0000 (00:56 +0200)] 
bpo-44630: Fix assertion errors in csv module (GH-27127)

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]
4 years agobpo-33346: Allow async comprehensions inside implicit async comprehensions (GH-6766)
Serhiy Storchaka [Tue, 13 Jul 2021 21:27:50 +0000 (00:27 +0300)] 
bpo-33346: Allow async comprehensions inside implicit async comprehensions (GH-6766)

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
4 years agobpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneou...
Konstantin-Glukhov [Tue, 13 Jul 2021 19:21:48 +0000 (04:21 +0900)] 
bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092)

4 years agoFix typos in Mac/README.rst (#27108)
Clemens Brunner [Tue, 13 Jul 2021 16:25:12 +0000 (18:25 +0200)] 
Fix typos in Mac/README.rst (#27108)

4 years agobpo-43126: Expand docs on io.IOBase.readlines() method (#27061)
andrei kulakov [Tue, 13 Jul 2021 14:07:56 +0000 (10:07 -0400)] 
bpo-43126: Expand docs on io.IOBase.readlines() method (#27061)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44514: Add doctest testcleanup for configparser and bz2 (#26909)
Kevin Follstad [Tue, 13 Jul 2021 13:57:05 +0000 (06:57 -0700)] 
bpo-44514: Add doctest testcleanup for configparser and bz2 (#26909)

Add testcleanup section to configparser and bz2 documentation which
removes temporary files created in the filesystem when 'make doctest'
is run.

4 years agobpo-38741: Definition of multiple ']' in header configparser (GH-17129)
jsnklln [Tue, 13 Jul 2021 13:54:06 +0000 (09:54 -0400)] 
bpo-38741: Definition of multiple ']' in header configparser (GH-17129)

Co-authored-by: Jason Killen <jason.killen@windsorcircle.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 years agobpo-35113: clean up duplicate import and comment (#27073)
andrei kulakov [Tue, 13 Jul 2021 13:42:56 +0000 (09:42 -0400)] 
bpo-35113: clean up duplicate import and comment (#27073)

4 years agoRemove unnecessary pass statements (GH-27103)
Elisha Hollander [Tue, 13 Jul 2021 13:02:30 +0000 (16:02 +0300)] 
Remove unnecessary pass statements (GH-27103)

4 years agobpo-43950: Add documentation for PEP-657 (GH-27047)
Ammar Askar [Tue, 13 Jul 2021 00:29:39 +0000 (20:29 -0400)] 
bpo-43950: Add documentation for PEP-657 (GH-27047)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
4 years agobpo-44613: Make importlib.metadata non-provisional (#27101)
Barry Warsaw [Mon, 12 Jul 2021 23:56:40 +0000 (16:56 -0700)] 
bpo-44613: Make importlib.metadata non-provisional (#27101)

* importlib.metadata is no longer provisional as of 3.10
* Add NEWS entry

4 years agobpo-43950: Specialize tracebacks for subscripts/binary ops (GH-27037)
Batuhan Taskaya [Mon, 12 Jul 2021 19:32:33 +0000 (22:32 +0300)] 
bpo-43950: Specialize tracebacks for subscripts/binary ops (GH-27037)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
4 years agobpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026)
David Sanders [Mon, 12 Jul 2021 15:19:54 +0000 (01:19 +1000)] 
bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026)

4 years agobpo-26329: update os.path.normpath documentation (GH-20138)
Furkan Onder [Mon, 12 Jul 2021 12:48:01 +0000 (15:48 +0300)] 
bpo-26329: update os.path.normpath documentation (GH-20138)

* bpo-26329: update os.path.normpath documentation

* Update os.path.rst

* Update posixpath.py

* update Pathname Resolution note

4 years agobuild(deps): bump actions/upload-artifact from 2.2.3 to 2.2.4 (#26979)
dependabot[bot] [Mon, 12 Jul 2021 11:29:13 +0000 (13:29 +0200)] 
build(deps): bump actions/upload-artifact from 2.2.3 to 2.2.4 (#26979)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.3...v2.2.4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agobpo-44207: Add an internal version number to function objects. (GH-27078)
Mark Shannon [Mon, 12 Jul 2021 09:01:01 +0000 (10:01 +0100)] 
bpo-44207: Add an internal version number to function objects. (GH-27078)

4 years agobpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)
Filipe Laíns [Sun, 11 Jul 2021 16:43:50 +0000 (17:43 +0100)] 
bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)

This reverts commit 0d7ad9fb38c041c46094087b0cf2c8ce44916b11 as it has a regression.

See https://github.com/python/cpython/pull/19850#issuecomment-869410686

4 years agobpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryE...
andrei kulakov [Sat, 10 Jul 2021 03:47:41 +0000 (23:47 -0400)] 
bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049)

Fixes the misleading IsADirectoryError to be FileNotFoundError.

4 years agobpo-44317: Improve tokenizer errors with more informative locations (GH-26555)
Pablo Galindo Salgado [Sat, 10 Jul 2021 00:29:29 +0000 (01:29 +0100)] 
bpo-44317: Improve tokenizer errors with more informative locations (GH-26555)

4 years agoRemove irrelevant comment which was added in 2a70a3a (GH-27044)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Fri, 9 Jul 2021 04:57:25 +0000 (10:27 +0530)] 
Remove irrelevant comment which was added in 2a70a3a (GH-27044)

4 years agobpo-44570: Fix line tracing for forwards jumps to duplicated tails (GH-27068)
Mark Shannon [Thu, 8 Jul 2021 18:21:09 +0000 (19:21 +0100)] 
bpo-44570: Fix line tracing for forwards jumps to duplicated tails (GH-27068)

4 years agobpo-44446: support lineno being None in traceback.FrameSummary (GH-26781)
Filipe Laíns [Thu, 8 Jul 2021 16:28:01 +0000 (17:28 +0100)] 
bpo-44446: support lineno being None in traceback.FrameSummary (GH-26781)

As of 088a15c49d99ecb4c3bef93f8f40dd513c6cae3b, lineno is None instead
of -1 if there is no line number.

Signed-off-by: Filipe Laíns <lains@riseup.net>
4 years agobpo-44582: Accelerate mimetypes.init on Windows with a native accelerator (GH-27059)
Steve Dower [Thu, 8 Jul 2021 15:48:42 +0000 (16:48 +0100)] 
bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator (GH-27059)

4 years agodocs: add the word 'official' (GH-26849)
Ned Batchelder [Thu, 8 Jul 2021 14:58:13 +0000 (07:58 -0700)] 
docs: add the word 'official' (GH-26849)

4 years agobpo-44581: Don't execute quickened instructions if tracing is on (GH-27064)
Mark Shannon [Thu, 8 Jul 2021 12:33:13 +0000 (13:33 +0100)] 
bpo-44581: Don't execute quickened instructions if tracing is on (GH-27064)

4 years agobpo-43908: Immutable types inherit vectorcall (GH-27001)
Erlend Egeberg Aasland [Thu, 8 Jul 2021 10:48:01 +0000 (12:48 +0200)] 
bpo-43908: Immutable types inherit vectorcall (GH-27001)

Heap types with the Py_TPFLAGS_IMMUTABLETYPE flag can now inherit the
PEP 590 vectorcall protocol.  Previously, this was only possible for static types.

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agoDoc: Fix wrong exception used in example. (GH-26572)
Julien Palard [Thu, 8 Jul 2021 07:31:28 +0000 (09:31 +0200)] 
Doc: Fix wrong exception used in example. (GH-26572)

4 years agobpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Thu, 8 Jul 2021 07:16:08 +0000 (12:46 +0530)] 
bpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263)

4 years agobpo-43895: Remove an unnecessary cache of shared object handles (GH-25487)
Ian Henriksen [Wed, 7 Jul 2021 23:26:06 +0000 (18:26 -0500)] 
bpo-43895: Remove an unnecessary cache of shared object handles (GH-25487)

* Remove an unnecessary cache of shared object handles.

4 years agoRemove __cleanenv from PEP-657 tests (GH-27060)
Ammar Askar [Wed, 7 Jul 2021 21:47:50 +0000 (17:47 -0400)] 
Remove __cleanenv from PEP-657 tests (GH-27060)

4 years agobpo-43950: Add option to opt-out of PEP-657 (GH-27023)
Ammar Askar [Wed, 7 Jul 2021 19:07:12 +0000 (15:07 -0400)] 
bpo-43950: Add option to opt-out of PEP-657 (GH-27023)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
4 years agobpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
Steve Dower [Wed, 7 Jul 2021 17:21:54 +0000 (18:21 +0100)] 
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)

4 years agobpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)
Rupert Tombs [Wed, 7 Jul 2021 13:28:09 +0000 (14:28 +0100)] 
bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)

4 years agobpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)
Pablo Galindo [Wed, 7 Jul 2021 13:20:49 +0000 (14:20 +0100)] 
bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)

4 years agobpo-44530: Add co_qualname field to PyCodeObject (GH-26941) 27050/head
Gabriele N. Tornetta [Wed, 7 Jul 2021 11:21:51 +0000 (12:21 +0100)] 
bpo-44530: Add co_qualname field to PyCodeObject (GH-26941)

4 years agoDoc: Fix link in multiprocessing.starmap pointing to builtin map. (GH-26560)
Julien Palard [Wed, 7 Jul 2021 08:25:01 +0000 (10:25 +0200)] 
Doc: Fix link in multiprocessing.starmap pointing to builtin map. (GH-26560)

4 years agobpo-44490: Add __parameters__ and __getitem__ to types.Union (GH-26980)
Yurii Karabas [Tue, 6 Jul 2021 18:04:33 +0000 (21:04 +0300)] 
bpo-44490: Add __parameters__ and __getitem__ to types.Union (GH-26980)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
4 years agobpo-38291: Fix a spurious warning when using help(object) (#27039)
Sebastian Rittau [Tue, 6 Jul 2021 15:01:15 +0000 (17:01 +0200)] 
bpo-38291: Fix a spurious warning when using help(object) (#27039)

help(object) via pydoc.TextDoc.docclass(object) iterates over the
subclasses of object, which includes typing.io and typing.re if typing
is imported. It tries to access cls.__module__ for each of those
sub-classes. This change suppresses warnings when accessing
cls.__module__.

4 years agobpo-44563: Fix error handling in tee.fromiterable() (GH-27020)
Serhiy Storchaka [Mon, 5 Jul 2021 22:19:35 +0000 (01:19 +0300)] 
bpo-44563: Fix error handling in tee.fromiterable() (GH-27020)

In debug build failed tee.fromiterable() corrupted the linked list of all GC objects.

4 years agobpo-43453: Update and re-add example to typing runtime_checkable (#27013)
andrei kulakov [Mon, 5 Jul 2021 16:23:42 +0000 (12:23 -0400)] 
bpo-43453: Update and re-add example to typing runtime_checkable (#27013)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-44479: Regenerate test_frozenmain.h and frozen_hello.h during build on Windows...
Steve Dower [Mon, 5 Jul 2021 15:18:14 +0000 (16:18 +0100)] 
bpo-44479: Regenerate test_frozenmain.h and frozen_hello.h during build on Windows (GH-26984)

4 years agobpo-44022: Fix Sphinx role in NEWS entry (GH-27033)
Sergey Fedoseev [Mon, 5 Jul 2021 14:44:06 +0000 (19:44 +0500)] 
bpo-44022: Fix Sphinx role in NEWS entry (GH-27033)

4 years agobpo-44562: Use PyType_GenericAlloc in Py_GenericAlias (GH-27021)
Pablo Galindo [Mon, 5 Jul 2021 11:10:53 +0000 (12:10 +0100)] 
bpo-44562: Use PyType_GenericAlloc in Py_GenericAlias (GH-27021)

* bpo-44562: Use PyType_GenericAlloc in Py_GenericAlias

* Update Objects/genericaliasobject.c

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)
Dong-hee Na [Mon, 5 Jul 2021 09:04:36 +0000 (18:04 +0900)] 
bpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)

4 years agobpo-44534: fix wording and docstring sync in unittest.Mock GH27000
Jack DeVries [Mon, 5 Jul 2021 06:52:32 +0000 (02:52 -0400)] 
bpo-44534: fix wording and docstring sync in unittest.Mock GH27000

4 years agobpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)
Ma Lin [Mon, 5 Jul 2021 01:10:44 +0000 (09:10 +0800)] 
bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)

* zlib uses an UINT32_MAX sliding window for the output buffer

These funtions have an initial output buffer size parameter:
- zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
- zlib.Decompress.flush([length])

If the initial size > UINT32_MAX, use an UINT32_MAX sliding window, instead of clamping to UINT32_MAX.
Speed up when (the initial size == the actual size).

This fixes a memory consumption and copying performance regression in earlier 3.10 beta releases if someone used an output buffer larger than 4GiB with zlib.decompress.

Reviewed-by: Gregory P. Smith
4 years agobpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)
Ammar Askar [Sun, 4 Jul 2021 23:14:33 +0000 (19:14 -0400)] 
bpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)

The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location
to print carets on the specific expressions involved in a traceback.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
4 years agobpo-43950: include position in dis.Instruction (GH-27015)
Batuhan Taskaya [Sun, 4 Jul 2021 19:05:05 +0000 (22:05 +0300)] 
bpo-43950: include position in dis.Instruction (GH-27015)

Automerge-Triggered-By: GH:isidentical
4 years agobpo-43950: use 0-indexed column offsets for bytecode positions (GH-27011)
Batuhan Taskaya [Sun, 4 Jul 2021 18:02:16 +0000 (21:02 +0300)] 
bpo-43950: use 0-indexed column offsets for bytecode positions (GH-27011)

4 years agobpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias ...
Ken Jin [Sun, 4 Jul 2021 16:47:38 +0000 (00:47 +0800)] 
bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016)

4 years agobpo-44553: Correct failure in tp_new for the union object (GH-27008)
Pablo Galindo [Sat, 3 Jul 2021 20:00:28 +0000 (21:00 +0100)] 
bpo-44553: Correct failure in tp_new for the union object (GH-27008)

4 years agobpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656)
Irit Katriel [Sat, 3 Jul 2021 15:33:35 +0000 (16:33 +0100)] 
bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656)

4 years agobpo-44129: Add descriptive global variables for general purpose bit flags (GH-26118)
Daniel Hillier [Sat, 3 Jul 2021 14:37:57 +0000 (00:37 +1000)] 
bpo-44129: Add descriptive global variables for general purpose bit flags (GH-26118)

Replace hex flag masks with named global variables to improve
readability.

eg.
    if flags & 0x800
becomes:
    if flags & _MASK_UTF_FILENAME

4 years agoFix a small typo in the docs (GH-26991)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Sat, 3 Jul 2021 14:04:57 +0000 (19:34 +0530)] 
Fix  a small typo in the docs (GH-26991)

4 years agobpo-44553 : Implement GC methods for types.Union (GH-26993)
Ken Jin [Sat, 3 Jul 2021 12:12:11 +0000 (20:12 +0800)] 
bpo-44553 : Implement GC methods for types.Union (GH-26993)

4 years agobpo-42238: rstlint: Add two new checks. (GH-26966)
Julien Palard [Sat, 3 Jul 2021 08:35:02 +0000 (10:35 +0200)] 
bpo-42238: rstlint: Add two new checks. (GH-26966)