]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-43680: _pyio.open() becomes a static method (GH-25354)
Victor Stinner [Mon, 12 Apr 2021 08:44:53 +0000 (10:44 +0200)] 
bpo-43680: _pyio.open() becomes a static method (GH-25354)

The Python _pyio.open() function becomes a static method to behave as
io.open() built-in function: don't become a bound method when stored
as a class variable. It becomes possible since static methods are now
callable in Python 3.10. Moreover, _pyio.OpenWrapper becomes a simple
alias to _pyio.open.

init_set_builtins_open() now sets builtins.open to io.open, rather
than setting it to io.OpenWrapper, since OpenWrapper is now an alias
to open in the io and _pyio modules.

4 years agobpo-43723: Deprecate camelCase aliases from threading (GH-25174)
Jelle Zijlstra [Mon, 12 Apr 2021 08:42:53 +0000 (01:42 -0700)] 
bpo-43723: Deprecate camelCase aliases from threading (GH-25174)

The snake_case names have existed since Python 2.6, so there is
no reason to keep the old camelCase names around. One similar
method, threading.Thread.isAlive, was already removed in
Python 3.9 (bpo-37804).

4 years agobpo-43785: Improve BZ2File performance by removing RLock (GH-25299)
Inada Naoki [Mon, 12 Apr 2021 05:46:53 +0000 (14:46 +0900)] 
bpo-43785: Improve BZ2File performance by removing RLock (GH-25299)

Remove `RLock` from `BZ2File`. It makes `BZ2File` to thread unsafe, but
gzip and lzma don't use it too.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
4 years agobpo-43682: Make staticmethod objects callable (GH-25117)
Victor Stinner [Sun, 11 Apr 2021 22:21:22 +0000 (00:21 +0200)] 
bpo-43682: Make staticmethod objects callable (GH-25117)

Static methods (@staticmethod) are now callable as regular functions.

4 years agobpo-43770: Refactor PyType_Ready() function (GH-25336)
Victor Stinner [Sun, 11 Apr 2021 21:57:09 +0000 (23:57 +0200)] 
bpo-43770: Refactor PyType_Ready() function (GH-25336)

* Split PyType_Ready() into sub-functions.
* type_ready_mro() now checks if bases are static types earlier.
* Check tp_name earlier, in type_ready_checks().
* Add _PyType_IsReady() macro to check if a type is ready.

4 years agobpo-42967: coerce bytes separator to string in urllib.parse_qs(l) (#24818)
Ken Jin [Sun, 11 Apr 2021 13:26:09 +0000 (21:26 +0800)] 
bpo-42967: coerce bytes separator to string in urllib.parse_qs(l) (#24818)

* coerce bytes separator to string

* Add news

* Update Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst

4 years agoFix typo in 3.10.0a7.rst (GH-25340)
Sergey B Kirpichev [Sun, 11 Apr 2021 08:50:42 +0000 (11:50 +0300)] 
Fix typo in 3.10.0a7.rst (GH-25340)

4 years agoFix description of behaviour of an exception class in 'from' clause (GH-24303)
Mark Dickinson [Sun, 11 Apr 2021 08:33:59 +0000 (09:33 +0100)] 
Fix description of behaviour of an exception class in 'from' clause (GH-24303)

4 years agobpo-43751: Fix anext() bug where it erroneously returned None (GH-25238)
Dennis Sweeney [Sun, 11 Apr 2021 04:51:35 +0000 (00:51 -0400)] 
bpo-43751: Fix anext() bug where it erroneously returned None (GH-25238)

4 years agobpo-43772: Fix TypeVar.__ror__ (GH-25339)
Jelle Zijlstra [Sun, 11 Apr 2021 03:00:05 +0000 (20:00 -0700)] 
bpo-43772: Fix TypeVar.__ror__ (GH-25339)

4 years agobpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)
Jelle Zijlstra [Sun, 11 Apr 2021 02:57:05 +0000 (19:57 -0700)] 
bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)

4 years agobpo-43764: Add match_args=False parameter to dataclass decorator and to make_dataclas...
Eric V. Smith [Sun, 11 Apr 2021 01:28:42 +0000 (21:28 -0400)] 
bpo-43764: Add match_args=False parameter to dataclass decorator and to make_dataclasses function. (GH-25337)

Add match_args=False parameter to dataclass decorator and to make_dataclass function.

4 years agoFix typo about line number in the 3.10 What's New document (GH-25328)
Antti Haapala [Sun, 11 Apr 2021 00:20:41 +0000 (03:20 +0300)] 
Fix typo about line number in the 3.10 What's New document (GH-25328)

This was a typo copied from PEP 626.

4 years agobpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
DevilXD [Sat, 10 Apr 2021 22:36:40 +0000 (00:36 +0200)] 
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)

(The deleted example no longer works and is thus irrelevant.)

4 years agobpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)
Victor Stinner [Sat, 10 Apr 2021 22:17:39 +0000 (00:17 +0200)] 
bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)

Add the Py_Is(x, y) function to test if the 'x' object is the 'y'
object, the same as "x is y" in Python. Add also the Py_IsNone(),
Py_IsTrue(), Py_IsFalse() functions to test if an object is,
respectively, the None singleton, the True singleton or the False
singleton.

4 years agobpo-43478: Fix formatting of NEWS entry (GH-25335)
Pablo Galindo [Sat, 10 Apr 2021 21:19:02 +0000 (22:19 +0100)] 
bpo-43478: Fix formatting of NEWS entry (GH-25335)

4 years agobpo-43770: Refactor type_new() function (GH-25325)
Victor Stinner [Sat, 10 Apr 2021 21:15:32 +0000 (23:15 +0200)] 
bpo-43770: Refactor type_new() function (GH-25325)

* Split type_new() into into many small functions.
* Add type_new_ctx structure to pass variables between subfunctions.
* Initialize some PyTypeObject and PyHeapTypeObject members earlier
  in type_new_alloc().
* Rename variables to more specific names.
* Add "__weakref__" identifier for type_new_visit_slots().
* Factorize code to convert a method to a classmethod
  (__init_subclass__ and __class_getitem__).
* Add braces to respect PEP 7.
* Move variable declarations where the variables are initialized.

4 years agobpo-43798: Add source location attributes to alias (GH-25324)
Matthew Suozzo [Sat, 10 Apr 2021 20:56:28 +0000 (16:56 -0400)] 
bpo-43798: Add source location attributes to alias (GH-25324)

* Add source location attributes to alias.
* Move alias star construction to pegen helper.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-40701: doc typo historcal -> historical (GH-25334)
Gregory P. Smith [Sat, 10 Apr 2021 17:55:14 +0000 (10:55 -0700)] 
bpo-40701: doc typo historcal -> historical (GH-25334)

4 years agobpo-43739: Add type declaration Doc/extending/extending.rst example
Shreyan Avigyan [Sat, 10 Apr 2021 15:54:32 +0000 (21:24 +0530)] 
bpo-43739: Add type declaration Doc/extending/extending.rst example

4 years agobpo-43478: Restrict use of Mock objects as specs (GH-25326)
Matthew Suozzo [Sat, 10 Apr 2021 03:45:50 +0000 (23:45 -0400)] 
bpo-43478: Restrict use of Mock objects as specs (GH-25326)

* Restrict using Mock objects as specs as this is always a test bug where the resulting mock is misleadingly useless.
* Skip a broken test that exposes a bug elsewhere in mock (noted in the original issue).

4 years agobpo-39899: Don't double-check directory name if we're requesting the current user...
Barney Gale [Fri, 9 Apr 2021 21:28:15 +0000 (22:28 +0100)] 
bpo-39899: Don't double-check directory name if we're requesting the current user's home directory in ntpath.expanduser() (GH-25277)

4 years agobpo-40107: Switch to using io.open() for pathlib.Path.open() (GH-25240)
Barney Gale [Fri, 9 Apr 2021 20:52:49 +0000 (21:52 +0100)] 
bpo-40107: Switch to using io.open() for pathlib.Path.open() (GH-25240)

Previously we had identical behaviour but only allowed accessors to override os.open(). This change allows the override to also construct the IO wrapper as well.

4 years agobpo-38820: OpenSSL 3.0.0: Use supported hashing algos in doc test (GH-25319)
Christian Heimes [Fri, 9 Apr 2021 20:23:10 +0000 (22:23 +0200)] 
bpo-38820: OpenSSL 3.0.0: Use supported hashing algos in doc test (GH-25319)

ripemd160 is not available in OpenSSL 3.0.0's default crypto provider.
It's only present in legacy provider.

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-43794: OpenSSL 3.0.0: set OP_IGNORE_UNEXPECTED_EOF by default (GH-25309)
Christian Heimes [Fri, 9 Apr 2021 15:59:21 +0000 (17:59 +0200)] 
bpo-43794: OpenSSL 3.0.0: set OP_IGNORE_UNEXPECTED_EOF by default (GH-25309)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-43682: @staticmethod inherits attributes (GH-25268)
Victor Stinner [Fri, 9 Apr 2021 15:51:22 +0000 (17:51 +0200)] 
bpo-43682: @staticmethod inherits attributes (GH-25268)

Static methods (@staticmethod) and class methods (@classmethod) now
inherit the method attributes (__module__, __name__, __qualname__,
__doc__, __annotations__) and have a new __wrapped__ attribute.

Changes:

* Add a repr() method to staticmethod and classmethod types.
* Add tests on the @classmethod decorator.

4 years agobpo-43788: Generate version specific _ssl_data.h (GH-25300)
Christian Heimes [Fri, 9 Apr 2021 15:02:00 +0000 (17:02 +0200)] 
bpo-43788: Generate version specific _ssl_data.h (GH-25300)

Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
4 years agobpo-4379: Skip TLS 1.0/1.1 tests under OpenSSL 3.0.0 (GH-25304)
Christian Heimes [Fri, 9 Apr 2021 13:43:06 +0000 (15:43 +0200)] 
bpo-4379: Skip TLS 1.0/1.1 tests under OpenSSL 3.0.0 (GH-25304)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-43789: OpenSSL 3.0.0 Don't call passwd callback again in error case (GH-25303)
Christian Heimes [Fri, 9 Apr 2021 13:23:38 +0000 (15:23 +0200)] 
bpo-43789: OpenSSL 3.0.0 Don't call passwd callback again in error case (GH-25303)

4 years agobpo-43774: Document the Python Build System (GH-25302)
Victor Stinner [Fri, 9 Apr 2021 12:35:10 +0000 (14:35 +0200)] 
bpo-43774: Document the Python Build System (GH-25302)

* Elaborate PGO and LTO documentaton.
* Document MAINCC, PURIFY and LINKCC variables.

4 years agobpo-43774: Doc job of Azure Pipelines uses Doc/requirements.txt (GH-25296)
Victor Stinner [Fri, 9 Apr 2021 10:36:47 +0000 (12:36 +0200)] 
bpo-43774: Doc job of Azure Pipelines uses Doc/requirements.txt (GH-25296)

Don't hardcode the Sphinx version but use Doc/requirements.txt.

4 years agoSimplify _PyPegen_fill_token in pegen.c (GH-25295)
Pablo Galindo [Fri, 9 Apr 2021 00:32:25 +0000 (01:32 +0100)] 
Simplify _PyPegen_fill_token in pegen.c (GH-25295)

4 years agoSanitize macros and debug functions in pegen.c (GH-25291)
Pablo Galindo [Fri, 9 Apr 2021 00:17:31 +0000 (01:17 +0100)] 
Sanitize macros and debug functions in pegen.c (GH-25291)

4 years agobpo-43774: Enhance configure documentation (GH-25293)
Victor Stinner [Thu, 8 Apr 2021 23:58:20 +0000 (01:58 +0200)] 
bpo-43774: Enhance configure documentation (GH-25293)

4 years agoBreak down some complex functions in pegen.c for readability (GH-25292)
Pablo Galindo [Thu, 8 Apr 2021 23:48:53 +0000 (00:48 +0100)] 
Break down some complex functions in pegen.c for readability (GH-25292)

4 years agoFix possible refleak involving _PyArena_AddPyObject (GH-25289)
Erlend Egeberg Aasland [Thu, 8 Apr 2021 23:05:44 +0000 (01:05 +0200)] 
Fix possible refleak involving _PyArena_AddPyObject (GH-25289)

4 years agobpo-39702: Remove dotted_name from decorator documentation (GH-25234)
Saiyang Gou [Thu, 8 Apr 2021 22:34:09 +0000 (15:34 -0700)] 
bpo-39702: Remove dotted_name from decorator documentation (GH-25234)

4 years agobpo-43778: Fix Sphinx glossary_search extension (GH-25286)
Victor Stinner [Thu, 8 Apr 2021 22:07:01 +0000 (00:07 +0200)] 
bpo-43778: Fix Sphinx glossary_search extension (GH-25286)

Create the _static/ directory if it doesn't exist.

Add also constants for the static directory and the JSON filename.

4 years agobpo-43774: Document configure options (GH-25283)
Victor Stinner [Thu, 8 Apr 2021 20:32:21 +0000 (22:32 +0200)] 
bpo-43774: Document configure options (GH-25283)

Add Doc/using/configure.rst documentation to document configure,
preprocessor, compiler and linker options.

Add a new section about the "Python debug build".

4 years agobpo-43764: Fix `__match_args__` generation logic for dataclasses (GH-25284)
Brandt Bucher [Thu, 8 Apr 2021 19:54:34 +0000 (12:54 -0700)] 
bpo-43764: Fix `__match_args__` generation logic for dataclasses (GH-25284)

4 years agobpo-43760: Streamline dispatch sequence for machines without computed gotos. (GH...
Mark Shannon [Thu, 8 Apr 2021 10:22:55 +0000 (11:22 +0100)] 
bpo-43760: Streamline dispatch sequence for machines without computed gotos. (GH-25244)

* Do fetch and decode at end of opcode then jump directly to switch.
  Should allow compilers that don't support computed-gotos, specifically MSVC,
  to generate better code.

4 years agobpo-43770: _PyTypes_Init() inits _PyAnextAwaitable_Type (GH-25266)
Victor Stinner [Thu, 8 Apr 2021 07:58:15 +0000 (09:58 +0200)] 
bpo-43770: _PyTypes_Init() inits _PyAnextAwaitable_Type (GH-25266)

* Rename PyAnextAwaitable_Type to _PyAnextAwaitable_Type.
* Expose the type in the internal C API.

4 years agoFix broken test for MutableSet.pop() (GH-25209)
Stepan Sindelar [Wed, 7 Apr 2021 23:31:55 +0000 (01:31 +0200)] 
Fix broken test for MutableSet.pop() (GH-25209)

Changes the test to not assert concrete result of pop, but just that it
was an item from the set, and that the set shrunk by one.

4 years agobpo-39899: os.path.expanduser(): don't guess other Windows users' home directories...
Barney Gale [Wed, 7 Apr 2021 22:50:13 +0000 (23:50 +0100)] 
bpo-39899: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. (GH-18841)

This makes `ntpath.expanduser()` match `pathlib.Path.expanduser()` in this regard, and is more in line with `posixpath.expanduser()`'s cautious approach.

Also remove the near-duplicate implementation of `expanduser()` in pathlib, and by doing so fix a bug where KeyError could be raised when expanding another user's home directory.

4 years agobpo-43770: _PyTypes_Init() inits more static types (GH-25265)
Victor Stinner [Wed, 7 Apr 2021 22:47:55 +0000 (00:47 +0200)] 
bpo-43770: _PyTypes_Init() inits more static types (GH-25265)

4 years agobpo-43770: Sort types in _PyTypes_Init() (GH-25263)
Victor Stinner [Wed, 7 Apr 2021 22:12:38 +0000 (00:12 +0200)] 
bpo-43770: Sort types in _PyTypes_Init() (GH-25263)

4 years agobpo-42923: Fix _Py_DumpExtensionModules() for NULL sysdict (GH-25262)
Victor Stinner [Wed, 7 Apr 2021 21:12:45 +0000 (23:12 +0200)] 
bpo-42923: Fix _Py_DumpExtensionModules() for NULL sysdict (GH-25262)

Fix Py_FatalError() is called before interp->sysdict is set.

4 years agobpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252)
Victor Stinner [Wed, 7 Apr 2021 19:34:22 +0000 (21:34 +0200)] 
bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252)

Rename AST functions of pycore_ast.h to use the "_PyAST_" prefix.
Remove macros creating aliases without prefix. For example, Module()
becomes _PyAST_Module(). Update Grammar/python.gram to use
_PyAST_xxx() functions.

4 years agobpo-36540: Improve doc of function definition regarding positional-only arguments...
Saiyang Gou [Wed, 7 Apr 2021 19:06:43 +0000 (12:06 -0700)] 
bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235)

4 years agobpo-39659: Route calls from pathlib.Path to os.getcwd() via the path accessor (GH...
Barney Gale [Wed, 7 Apr 2021 16:31:49 +0000 (17:31 +0100)] 
bpo-39659: Route calls from pathlib.Path to os.getcwd() via the path accessor (GH-18834)

4 years agobpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294)
Barney Gale [Wed, 7 Apr 2021 15:56:32 +0000 (16:56 +0100)] 
bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294)

4 years agobpo-39906: Add follow_symlinks parameter to pathlib.Path.stat() and chmod() (GH-18864)
Barney Gale [Wed, 7 Apr 2021 15:53:39 +0000 (16:53 +0100)] 
bpo-39906: Add follow_symlinks parameter to pathlib.Path.stat() and chmod() (GH-18864)

4 years agobpo-43495 : Push missing frame block in compile.c (GH-24865)
tomKPZ [Wed, 7 Apr 2021 14:43:45 +0000 (07:43 -0700)] 
bpo-43495 : Push missing frame block in compile.c (GH-24865)

4 years agoImprove CDN purge script (GH-25251)
Steve Dower [Wed, 7 Apr 2021 12:14:00 +0000 (13:14 +0100)] 
Improve CDN purge script (GH-25251)

4 years agobpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391)
Yeting Li [Wed, 7 Apr 2021 11:27:41 +0000 (19:27 +0800)] 
bpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391)

Fix Regular Expression Denial of Service (ReDoS) vulnerability in
urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex
has quadratic worst-case complexity and it allows cause a denial of
service when identifying crafted invalid RFCs. This ReDoS issue is on
the client side and needs remote attackers to control the HTTP server.

4 years agobpo-43244: Remove Yield macro from pycore_ast.h (GH-25243)
Victor Stinner [Wed, 7 Apr 2021 11:01:09 +0000 (13:01 +0200)] 
bpo-43244: Remove Yield macro from pycore_ast.h (GH-25243)

* pycore_ast.h no longer defines the Yield macro.
* Fix a compiler warning on Windows: "warning C4005: 'Yield': macro
  redefinition".
* Python-ast.c now defines directly functions with their real
  _Py_xxx() name, rather than xxx().
* Remove "#undef Yield" in C files including pycore_ast.h.

4 years agoCorrect micro release number and add a couple of asserts. (GH-25224)
Mark Shannon [Wed, 7 Apr 2021 09:52:07 +0000 (10:52 +0100)] 
Correct micro release number and add a couple of asserts. (GH-25224)

4 years agobpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)
Saiyang Gou [Wed, 7 Apr 2021 05:02:20 +0000 (22:02 -0700)] 
bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)

Update documentation section for "Future statements" to reflect that `from __future__ import annotations` is on by default, and no features require using the future statement now.

4 years agobpo-40038: pathlib: remove partial support for preserving accessor when modifying...
Barney Gale [Wed, 7 Apr 2021 00:26:37 +0000 (01:26 +0100)] 
bpo-40038: pathlib: remove partial support for preserving accessor when modifying a path (GH-19342)

4 years agobpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor. (GH...
Barney Gale [Wed, 7 Apr 2021 00:25:37 +0000 (01:25 +0100)] 
bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor. (GH-18838)

4 years agobpo-43105: Importlib now resolves relative paths when creating module spec objects...
Steve Dower [Wed, 7 Apr 2021 00:02:07 +0000 (01:02 +0100)] 
bpo-43105: Importlib now resolves relative paths when creating module spec objects from file locations (GH-25121)

4 years agobpo-39924: handle missing os functions more consistently in pathlib (GH-19220)
Barney Gale [Tue, 6 Apr 2021 23:01:22 +0000 (00:01 +0100)] 
bpo-39924: handle missing os functions more consistently in pathlib (GH-19220)

4 years agobpo-43567: Improved generated code refresh on Windows (GH-25120)
Steve Dower [Tue, 6 Apr 2021 22:54:43 +0000 (23:54 +0100)] 
bpo-43567: Improved generated code refresh on Windows (GH-25120)

Generated files are now refreshed automatically on regular build, or may be forcibly regenerated by calling `build.bat --regen`.

4 years agobpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` since 3...
Saiyang Gou [Tue, 6 Apr 2021 22:15:37 +0000 (15:15 -0700)] 
bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` since 3.9 (GH-25231)

4 years agobump the bytecode magic number (GH-25225)
Dennis Sweeney [Tue, 6 Apr 2021 17:44:50 +0000 (13:44 -0400)] 
bump the bytecode magic number (GH-25225)

4 years agoUpdate pattern matching docs for changes to the PEP (#25185)
Ken Jin [Tue, 6 Apr 2021 16:03:00 +0000 (00:03 +0800)] 
Update pattern matching docs for changes to the PEP (#25185)

See:
- https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple)
- https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)

4 years agobpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169)
Brett Cannon [Tue, 6 Apr 2021 15:56:57 +0000 (08:56 -0700)] 
bpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169)

4 years agobpo-41870: Update What's News 3.10 about vectorcall (#25219)
Dong-hee Na [Tue, 6 Apr 2021 15:43:59 +0000 (00:43 +0900)] 
bpo-41870: Update What's News 3.10 about vectorcall (#25219)

* bpo-41870: Update What's News 3.10 about vectorcall

* update

* Update Doc/whatsnew/3.10.rst

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agoFix blurb for bpo-43176. (GH-25215)
Eric V. Smith [Tue, 6 Apr 2021 14:08:18 +0000 (10:08 -0400)] 
Fix blurb for bpo-43176. (GH-25215)

4 years agobpo-41111: Don't build xxlimited with Py_TRACE_REFS macro (GH-25180)
Hai Shi [Tue, 6 Apr 2021 12:55:13 +0000 (20:55 +0800)] 
bpo-41111: Don't build xxlimited with Py_TRACE_REFS macro (GH-25180)

4 years agobpo-43745: Actually updates Windows release to OpenSSL 1.1.1k. (GH-25213)
Steve Dower [Tue, 6 Apr 2021 12:08:30 +0000 (13:08 +0100)] 
bpo-43745: Actually updates Windows release to OpenSSL 1.1.1k. (GH-25213)

Earlier releases were mislabelled and included 1.1.1i again.
The tag/directory name is updated to ensure that builds get the fresh bits. However, the openssl-bin-1.1.1k tag in the repository has been forcibly updated, so fresh builds will be fine even without this change.

4 years agobpo-43683: Handle generator entry in bytecode (GH-25138)
Mark Shannon [Tue, 6 Apr 2021 10:48:59 +0000 (11:48 +0100)] 
bpo-43683: Handle generator entry in bytecode (GH-25138)

* Handle check for sending None to starting generator and coroutine into bytecode.

* Document new bytecode and make it fail gracefully if mis-compiled.

4 years agobpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)
Inada Naoki [Tue, 6 Apr 2021 08:02:54 +0000 (17:02 +0900)] 
bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)

4 years agobpo-17305: Link to the third-party idna package. (GH-25208)
Gregory P. Smith [Tue, 6 Apr 2021 07:55:45 +0000 (00:55 -0700)] 
bpo-17305: Link to the third-party idna package. (GH-25208)

So long as we don't have idna2008 in the standard library, we should at least point people to the third-party solution.

4 years agobpo-43176: Fix processing of empty dataclasses (GH-24484)
Iurii Kemaev [Tue, 6 Apr 2021 05:14:01 +0000 (06:14 +0100)] 
bpo-43176: Fix processing of empty dataclasses (GH-24484)

When a dataclass inherits from an empty base, all immutability checks are omitted. This PR fixes this and adds tests for it.

Automerge-Triggered-By: GH:ericvsmith
4 years agobpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25190)
Inada Naoki [Tue, 6 Apr 2021 04:02:22 +0000 (13:02 +0900)] 
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25190)

* Fix test_lzma
* Fix test_mailbox
* Fix test_mimetypes
* Fix test_posix

4 years agobpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)
Inada Naoki [Tue, 6 Apr 2021 02:18:41 +0000 (11:18 +0900)] 
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)

* Fix _sitebuiltins
* Fix test_inspect
* Fix test_interpreters
* Fix test_io
* Fix test_iter
* Fix test_json
* Fix test_linecache
* Fix test_lltrace
* Fix test_logging
* Fix logging

4 years agobpo-42128: __match_args__ can't be a list anymore (GH-25203)
Brandt Bucher [Tue, 6 Apr 2021 02:17:08 +0000 (19:17 -0700)] 
bpo-42128: __match_args__ can't be a list anymore (GH-25203)

4 years agobpo-43651: Fix EncodingWarning in sysconfig (GH-25192)
Inada Naoki [Tue, 6 Apr 2021 01:01:11 +0000 (10:01 +0900)] 
bpo-43651: Fix EncodingWarning in sysconfig (GH-25192)

4 years agobpo-20503: Show how isinstance() works with ABC registered classes. (GH-25175)
Raymond Hettinger [Mon, 5 Apr 2021 19:48:24 +0000 (12:48 -0700)] 
bpo-20503: Show how isinstance() works with ABC registered classes. (GH-25175)

4 years agobpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH...
Zackery Spytz [Mon, 5 Apr 2021 19:41:01 +0000 (13:41 -0600)] 
bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867)

Co-Authored-By: Claudiu Popa <pcmanticore@gmail.com>
Automerge-Triggered-By: GH:ericvsmith
4 years agobpo-43087: Fix error in ctypes "Incomplete Types" doc (GH-24404)
Zackery Spytz [Mon, 5 Apr 2021 19:21:00 +0000 (13:21 -0600)] 
bpo-43087: Fix error in ctypes "Incomplete Types" doc (GH-24404)

The previous "Fundamental data types" section says a c_char_p must be bytes (or None).

4 years agoFix typo in turtledemo.two_canvases. (GH-25194)
Terry Jan Reedy [Mon, 5 Apr 2021 17:19:13 +0000 (13:19 -0400)] 
Fix typo in turtledemo.two_canvases. (GH-25194)

4 years agoPost 3.10.0a7
Pablo Galindo [Mon, 5 Apr 2021 17:04:54 +0000 (18:04 +0100)] 
Post 3.10.0a7

4 years agoPython 3.10.0a7 v3.10.0a7
Pablo Galindo [Mon, 5 Apr 2021 16:38:40 +0000 (17:38 +0100)] 
Python 3.10.0a7

4 years agoFix the "make suspicious" check on the pprint docs (GH-25193)
Pablo Galindo [Mon, 5 Apr 2021 16:38:10 +0000 (17:38 +0100)] 
Fix the "make suspicious" check on the pprint docs (GH-25193)

4 years agobpo-43084: Return bool instead of int from curses.window.enclose() (GH-24398)
Serhiy Storchaka [Mon, 5 Apr 2021 13:50:24 +0000 (16:50 +0300)] 
bpo-43084: Return bool instead of int from curses.window.enclose() (GH-24398)

4 years agobpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181)
Inada Naoki [Mon, 5 Apr 2021 04:11:23 +0000 (13:11 +0900)] 
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181)

* Fix test_shutil
* Fix test_imp
* Fix test_import
* Fix test_importlib

4 years agobpo-43651: PEP 597: Fix EncodingWarning in test_filecmp (GH-25159)
Inada Naoki [Mon, 5 Apr 2021 03:32:35 +0000 (12:32 +0900)] 
bpo-43651: PEP 597: Fix EncodingWarning in test_filecmp (GH-25159)

4 years agobpo-43651: PEP 597: Fix test_email (GH-25158)
Inada Naoki [Mon, 5 Apr 2021 03:30:12 +0000 (12:30 +0900)] 
bpo-43651: PEP 597: Fix test_email (GH-25158)

4 years agobpo-41370: Add note about ForwardRefs and PEP585 generic types in docs (#25183)
Ken Jin [Sun, 4 Apr 2021 15:14:44 +0000 (23:14 +0800)] 
bpo-41370: Add note about ForwardRefs and PEP585 generic types in docs (#25183)

4 years agobpo-24160: Fix test_pdb refleaks failure (GH-25182)
Irit Katriel [Sun, 4 Apr 2021 15:04:53 +0000 (16:04 +0100)] 
bpo-24160: Fix test_pdb refleaks failure (GH-25182)

4 years agobpo-27129: Update magic numbers and bootstrapping for GH-25069 (GH-25172)
Dennis Sweeney [Sun, 4 Apr 2021 08:33:22 +0000 (04:33 -0400)] 
bpo-27129: Update magic numbers and bootstrapping for GH-25069 (GH-25172)

* Update magic numbers and bootstrapping for GH-25069

* add blurb

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171)
Inada Naoki [Sun, 4 Apr 2021 08:01:10 +0000 (17:01 +0900)] 
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171)

* Fix test_float
* Fix _osx_support
* Fix test_fstring
* Fix test_gc
* Fix test_gzip
* Fix test_hashlib
* Fix unrelated whitespace issue

Co-authored-by: Ned Deily <nad@python.org>
4 years agobpo-43325: Add FAQ entry for identity tests (GH-25168)
Raymond Hettinger [Sun, 4 Apr 2021 02:54:49 +0000 (19:54 -0700)] 
bpo-43325: Add FAQ entry for identity tests (GH-25168)

4 years agobpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145)
Inada Naoki [Sun, 4 Apr 2021 00:01:23 +0000 (09:01 +0900)] 
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145)

* test_asyncio
* test_bz2
* test_math
* test_cmath
* test_cmd_line
* test_cmd_line_script
* test_compile
* test_contextlib
* test_profile
* ctypes/test/test_find
* test_multiprocessing
* test_configparser
* test_csv
* test_dbm_dumb
* test_decimal
* test_difflib
* os.fdopen() calls io.text_encoding() to emit EncodingWarning for right place.

4 years agobpo-43720: Update import-related stdlib deprecation messages to say they will be...
Brett Cannon [Sat, 3 Apr 2021 22:31:15 +0000 (15:31 -0700)] 
bpo-43720: Update import-related stdlib deprecation messages to say they will be removed in Python 3.12 (GH-25167)

4 years agoReplace broken example code with correct simpler code. (GH-25162)
Raymond Hettinger [Sat, 3 Apr 2021 20:09:01 +0000 (13:09 -0700)] 
Replace broken example code with correct simpler code. (GH-25162)

The open() was missing 'w' to indicate it was in a write-mode.
Even then, the open().close() operation was distracting because
it is an unusual way to "touch" as file.  Using os.remove()
instead is simpler and less distracting.

4 years agoAdd more tests for the descriptor tutorial (GH-25164)
Raymond Hettinger [Sat, 3 Apr 2021 20:07:52 +0000 (13:07 -0700)] 
Add more tests for the descriptor tutorial (GH-25164)

4 years agobpo-43705: Document that SyntaxError's offsets are 1-indexed (GH-25153)
Ammar Askar [Fri, 2 Apr 2021 21:25:31 +0000 (17:25 -0400)] 
bpo-43705: Document that SyntaxError's offsets are 1-indexed (GH-25153)

Changed the inline mentions of the attributes into a proper attribute list like `SystemExit` has.

Automerge-Triggered-By: GH:gvanrossum