]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44131: Test Py_FrozenMain() (GH-26126)
Victor Stinner [Mon, 17 May 2021 21:48:35 +0000 (23:48 +0200)] 
bpo-44131: Test Py_FrozenMain() (GH-26126)

* Add test_frozenmain to test_embed
* Add Programs/test_frozenmain.py
* Add Programs/freeze_test_frozenmain.py
* Add Programs/test_frozenmain.h
* Add make regen-test-frozenmain
* Add test_frozenmain command to Programs/_testembed
* _testembed.c: add error(msg) function

4 years agobpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files...
Igor Bolshakov [Mon, 17 May 2021 08:28:21 +0000 (11:28 +0300)] 
bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files (GH-25058)

`shutil.unpack_archive()` tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form `zipfile.Zipfile.extractall()` to fix this

Automerge-Triggered-By: GH:gpshead
4 years agobpo-33433 Fix private address checking for IPv4 mapped IPv6. (GH-26172)
Pete Wicken [Mon, 17 May 2021 07:52:36 +0000 (08:52 +0100)] 
bpo-33433 Fix private address checking for IPv4 mapped IPv6. (GH-26172)

For IPv4 mapped IPv6 addresses, defer privacy check to the mapped IPv4 address. Solves bug where public mapped IPv4 addresses are considered private by the IPv6 check.

Automerge-Triggered-By: GH:gpshead
4 years agobpo-44145: Release the GIL around HMAC_Update. (GH-26157)
Gregory P. Smith [Mon, 17 May 2021 07:35:16 +0000 (00:35 -0700)] 
bpo-44145: Release the GIL around HMAC_Update. (GH-26157)

It was always meant to be released for parallelization.
This now matches the other similar code in the module.

Thanks michaelforney for noticing!

4 years agobpo-44154: optimize Fraction pickling (GH-26186)
Sergey B Kirpichev [Mon, 17 May 2021 07:20:02 +0000 (10:20 +0300)] 
bpo-44154: optimize Fraction pickling (GH-26186)

4 years agoApply edits from Allen Downey's review of the linear_regression docs. (GH-26176)
Raymond Hettinger [Mon, 17 May 2021 02:21:14 +0000 (19:21 -0700)] 
Apply edits from Allen Downey's review of the linear_regression docs. (GH-26176)

4 years ago[doc] Fix typo in os module (GH-24464)
Rafael Fontenelle [Sun, 16 May 2021 23:38:11 +0000 (20:38 -0300)] 
[doc] Fix typo in os module (GH-24464)

Automerge-Triggered-By: GH:iritkatriel
4 years agoFix a typo/error in a news entry (bidst_wheel -> bdist_wheel) (GH-24284)
Zackery Spytz [Sun, 16 May 2021 23:34:49 +0000 (16:34 -0700)] 
Fix a typo/error in a news entry (bidst_wheel -> bdist_wheel) (GH-24284)

This error was fixed recently in `Doc/whatsnew/3.10.rst`.

Automerge-Triggered-By: GH:iritkatriel
4 years agofix docstring typo in bdb.py (GH-22323)
flizzywine [Sun, 16 May 2021 23:20:33 +0000 (07:20 +0800)] 
fix docstring typo in bdb.py (GH-22323)

4 years agoRemove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438)
Serhii Hidenko [Sun, 16 May 2021 15:55:06 +0000 (18:55 +0300)] 
Remove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438)

4 years agoFix typo in comment (GH-26162)
Ashwin Ramaswami [Sun, 16 May 2021 15:35:41 +0000 (11:35 -0400)] 
Fix typo in comment (GH-26162)

4 years agobpo-44142: drop redundant parantheses when unparsing tuples as assignment targets...
Batuhan Taskaya [Sun, 16 May 2021 13:33:22 +0000 (16:33 +0300)] 
bpo-44142: drop redundant parantheses when unparsing tuples as assignment targets (GH-26156)

4 years agobpo-39950: Fix deprecation warning in test for `pathlib.Path.link_to()` (GH-26155)
Barney Gale [Sun, 16 May 2021 07:15:25 +0000 (08:15 +0100)] 
bpo-39950: Fix deprecation warning in test for `pathlib.Path.link_to()` (GH-26155)

4 years agoImprove speed and accuracy for correlation() (GH-26135)
Raymond Hettinger [Sat, 15 May 2021 18:00:51 +0000 (11:00 -0700)] 
Improve speed and accuracy for correlation() (GH-26135)

4 years agobpo-44143: Fix crash in the parser when raising tokenizer errors with an exception...
Pablo Galindo [Sat, 15 May 2021 16:58:02 +0000 (17:58 +0100)] 
bpo-44143: Fix crash in the parser when raising tokenizer errors with an exception set (GH-26144)

4 years agobpo-32133: Improve numbers docs (GH-26124)
Miguel Brito [Sat, 15 May 2021 16:56:12 +0000 (17:56 +0100)] 
bpo-32133: Improve numbers docs (GH-26124)

4 years agobpo-44139: Use a more descriptive syntax error comprehension case in the What's New...
Pablo Galindo [Sat, 15 May 2021 16:37:12 +0000 (17:37 +0100)] 
bpo-44139: Use a more descriptive syntax error comprehension case in the What's New for 3.10 (GH-26145)

4 years agobpo-26110: Add ``CALL_METHOD_KW`` opcode to speedup method calls with keywords (GH...
Ken Jin [Sat, 15 May 2021 15:15:23 +0000 (23:15 +0800)] 
bpo-26110: Add ``CALL_METHOD_KW`` opcode to speedup method calls with keywords (GH-26014)

* Add CALL_METHOD_KW

* Make CALL_METHOD branchless too since it shares the same code

* Place parentheses in STACK_SHRINK

4 years agobpo-44081: improve ast.unparse() for lambdas with no parameters (GH-26000)
Batuhan Taskaya [Sat, 15 May 2021 12:55:53 +0000 (15:55 +0300)] 
bpo-44081: improve ast.unparse() for lambdas with no parameters (GH-26000)

4 years agobpo-44072: fix Complex, Integral docs for `**` (GH-25986)
Rory Yorke [Fri, 14 May 2021 22:01:48 +0000 (00:01 +0200)] 
bpo-44072: fix Complex, Integral docs for `**` (GH-25986)

In numbers module docstrings and docs.

4 years agobpo-37788: Fix reference leak when Thread is never joined (GH-26103)
Antoine Pitrou [Fri, 14 May 2021 19:37:20 +0000 (21:37 +0200)] 
bpo-37788: Fix reference leak when Thread is never joined (GH-26103)

When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown.  If many threads are created this way, the _shutdown_locks set could therefore grow endlessly.  To avoid such a situation, purge expired locks each time a new one is added or removed.

4 years agobpo-43729: Clarify comment in tutorial example (GH-25191)
Erlend Egeberg Aasland [Fri, 14 May 2021 19:09:08 +0000 (21:09 +0200)] 
bpo-43729: Clarify comment in tutorial example (GH-25191)

4 years agobpo-44095: Add suffix, stem and suffixes to zipfile.Path (GH-26129)
Miguel Brito [Fri, 14 May 2021 17:57:36 +0000 (18:57 +0100)] 
bpo-44095: Add suffix, stem and suffixes to zipfile.Path (GH-26129)

4 years agoSubprocess Protocols Documentation (GH-20950)
kudavid [Fri, 14 May 2021 17:20:33 +0000 (20:20 +0300)] 
Subprocess Protocols Documentation (GH-20950)

Should be "Subprocess Protocol instances" not "Datagram Protocol instances"

4 years ago[doc] Fix typos in cgi.rst (#24766)
Géry Ogam [Fri, 14 May 2021 17:09:01 +0000 (19:09 +0200)] 
[doc] Fix typos in cgi.rst (#24766)

4 years agosqlite3 test suite now works with SQLITE_DQS=0 (GH-26032)
Erlend Egeberg Aasland [Fri, 14 May 2021 10:27:21 +0000 (12:27 +0200)] 
sqlite3 test suite now works with SQLITE_DQS=0 (GH-26032)

4 years agoDoc: Fix ambiguous pronoun (GH-26037)
Daniel Shahaf [Fri, 14 May 2021 06:27:06 +0000 (06:27 +0000)] 
Doc: Fix ambiguous pronoun (GH-26037)

4 years agoUpdated code example for asyncio.gather (GH-20604)
josephernest [Fri, 14 May 2021 06:06:26 +0000 (08:06 +0200)] 
Updated code example for asyncio.gather (GH-20604)

The previous example did not fully showcase the interest of using gather.

Here the example showcases "the result is an aggregate list of returned values".

4 years agobpo-38250: add version added for FlagBoundary (GH-25820)
Shantanu [Fri, 14 May 2021 05:59:53 +0000 (22:59 -0700)] 
bpo-38250: add version added for FlagBoundary (GH-25820)

* bpo-38250: add version added for FlagBoundary

* Also add versionadded for utilities

Co-authored-by: hauntsaninja <>
4 years agoUpdate doc as relative import can be used with star import (GH-25667)
Saiyang Gou [Fri, 14 May 2021 05:37:19 +0000 (22:37 -0700)] 
Update doc as relative import can be used with star import (GH-25667)

4 years agobpo-43977: Update pattern matching language reference docs (GH-25917)
Ken Jin [Fri, 14 May 2021 05:31:28 +0000 (13:31 +0800)] 
bpo-43977: Update pattern matching language reference docs (GH-25917)

* Update patma language reference with new changes to sequence and mapping

* update 3.10 whatsnew too

4 years agoReword paragraph on specific value for Py_LIMITED_API (GH-26101)
Petr Viktorin [Fri, 14 May 2021 05:22:44 +0000 (07:22 +0200)] 
Reword paragraph on specific value for Py_LIMITED_API (GH-26101)

4 years agobpo-43908: Add What's New entry for Py_TPFLAGS_IMMUTABLETYPE flag (GH-25816)
Erlend Egeberg Aasland [Thu, 13 May 2021 22:44:55 +0000 (00:44 +0200)] 
bpo-43908: Add What's New entry for Py_TPFLAGS_IMMUTABLETYPE flag (GH-25816)

4 years agobpo-28146: Fix a confusing error message in str.format() (GH-24213)
Irit Katriel [Thu, 13 May 2021 20:55:55 +0000 (21:55 +0100)] 
bpo-28146: Fix a confusing error message in str.format() (GH-24213)

Automerge-Triggered-By: GH:pitrou
4 years agobpo-44094: Remove deprecated PyErr_ APIs. (GH-26011)
Inada Naoki [Thu, 13 May 2021 20:45:26 +0000 (05:45 +0900)] 
bpo-44094: Remove deprecated PyErr_ APIs. (GH-26011)

These APIs are deprecated since Python 3.3. They are not documented too.

4 years agobpo-44114: Remove redundant cast. (GH-26098)
Inada Naoki [Thu, 13 May 2021 20:42:55 +0000 (05:42 +0900)] 
bpo-44114: Remove redundant cast. (GH-26098)

4 years agobpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
Antoine Pitrou [Thu, 13 May 2021 17:48:15 +0000 (19:48 +0200)] 
bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)

The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text.

Automerge-Triggered-By: GH:pitrou
4 years agoFix typo in configure (GH-26078)
Ikko Ashimine [Thu, 13 May 2021 17:09:17 +0000 (02:09 +0900)] 
Fix typo in configure (GH-26078)

4 years agobpo-39906: Document new follow_symlinks argument to pathlib.Path.stat() and chmod...
Barney Gale [Thu, 13 May 2021 12:17:04 +0000 (13:17 +0100)] 
bpo-39906: Document new follow_symlinks argument to pathlib.Path.stat() and chmod() in 3.10 whatsnew. (GH-26089)

4 years agobpo-43757: Document os.path.realpath(strict=True) in 3.10 whatsnew. (GH-26090)
Barney Gale [Thu, 13 May 2021 12:14:45 +0000 (13:14 +0100)] 
bpo-43757: Document os.path.realpath(strict=True) in 3.10 whatsnew. (GH-26090)

4 years agobpo-44114: Fix dictkeys_reversed and dictvalues_reversed function signatures (GH...
Joe Marshall [Thu, 13 May 2021 07:54:17 +0000 (08:54 +0100)] 
bpo-44114: Fix dictkeys_reversed and dictvalues_reversed function signatures (GH-26062)

These are passed and called as PyCFunction, however they are defined here without the (ignored) args parameter.

This works fine in some C compilers, but fails in webassembly or anything else that has strict function pointer call type checking.

4 years agobpo-44098: Drop ParamSpec from most ``__parameters__`` in typing generics (GH-26013)
Ken Jin [Thu, 13 May 2021 05:24:35 +0000 (13:24 +0800)] 
bpo-44098: Drop ParamSpec from most ``__parameters__`` in typing generics (GH-26013)

Added two new attributes to ``_GenericAlias``:
* ``_typevar_types``, a single type or tuple of types indicating what types are treated as a ``TypeVar``. Used for ``isinstance`` checks.
* ``_paramspec_tvars ``, a boolean flag which guards special behavior for dealing with ``ParamSpec``. Setting it to ``True`` means this  class deals with ``ParamSpec``.

Automerge-Triggered-By: GH:gvanrossum
4 years agobpo-44113: Update fromzenmain not to use Py_SetProgramName (GH-26085)
Dong-hee Na [Thu, 13 May 2021 01:19:46 +0000 (10:19 +0900)] 
bpo-44113: Update fromzenmain not to use Py_SetProgramName (GH-26085)

4 years agobpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084)
Victor Stinner [Thu, 13 May 2021 00:27:56 +0000 (02:27 +0200)] 
bpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084)

Ignore Py_DEPRECATED() warning on purpose.

4 years agobpo-44030: Fix formatting error in exceptions docs (GH-25929)
Miguel Brito [Thu, 13 May 2021 00:11:36 +0000 (01:11 +0100)] 
bpo-44030: Fix formatting error in exceptions docs (GH-25929)

4 years agobpo-44113: Update __xxtestfuzz not to use Py_SetProgramName (GH-26083)
Dong-hee Na [Wed, 12 May 2021 23:22:18 +0000 (08:22 +0900)] 
bpo-44113: Update __xxtestfuzz not to use Py_SetProgramName (GH-26083)

4 years agobpo-44113: Deprecate old functions to config Python init (GH-26060)
Victor Stinner [Wed, 12 May 2021 21:59:25 +0000 (23:59 +0200)] 
bpo-44113: Deprecate old functions to config Python init (GH-26060)

Deprecate the following functions to configure the Python
initialization:

* PySys_AddWarnOption()
* PySys_AddWarnOptionUnicode()
* PySys_AddXOption()
* PySys_HasWarnOptions()
* Py_SetPath()
* Py_SetProgramName()
* Py_SetPythonHome()
* Py_SetStandardStreamEncoding()
* _Py_SetProgramFullPath()

Use the new PyConfig API of the Python Initialization Configuration
instead (PEP 587).

4 years agobpo-40645: Fix ref leaks in _hashopenssl (GH-26079)
Erlend Egeberg Aasland [Wed, 12 May 2021 18:20:41 +0000 (20:20 +0200)] 
bpo-40645: Fix ref leaks in _hashopenssl (GH-26079)

4 years agobpo-44116: Add GC support to _csv heap types (GH-26074)
Erlend Egeberg Aasland [Wed, 12 May 2021 18:18:58 +0000 (20:18 +0200)] 
bpo-44116: Add GC support to _csv heap types (GH-26074)

4 years agobpo-44117: Add C API section to What's New in Python 3.11 (GH-26071)
Victor Stinner [Wed, 12 May 2021 16:46:29 +0000 (18:46 +0200)] 
bpo-44117: Add C API section to What's New in Python 3.11 (GH-26071)

Add also references to PyFrame_BlockPop() removal.

4 years agobpo-40645: Fix reference leak in the _hashopenssl extension (GH-26072)
Petr Viktorin [Wed, 12 May 2021 16:04:34 +0000 (18:04 +0200)] 
bpo-40645: Fix reference leak in the _hashopenssl extension (GH-26072)

The `PyModule_AddObjectRef` function doesn't steal a reference, so an extra `Py_DECREF` is needed.

Automerge-Triggered-By: GH:tiran
4 years agobpo-38908: Fix issue when non runtime_protocol failed to raise TypeError (#26067)
Yurii Karabas [Wed, 12 May 2021 15:47:49 +0000 (18:47 +0300)] 
bpo-38908: Fix issue when non runtime_protocol failed to raise TypeError (#26067)

4 years agoUse get_binascii_state instead of PyModule_GetState (GH-26069)
Dong-hee Na [Wed, 12 May 2021 15:09:30 +0000 (00:09 +0900)] 
Use get_binascii_state instead of PyModule_GetState (GH-26069)

4 years agobpo-44089: Allow subclassing of ``csv.Error`` (GH-26008)
Ken Jin [Wed, 12 May 2021 13:47:11 +0000 (21:47 +0800)] 
bpo-44089: Allow subclassing of ``csv.Error`` (GH-26008)

* fix subclass error

* Update 2021-05-09-22-52-34.bpo-44089.IoANsN.rst

4 years agobpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034)
Karl Dubost [Wed, 12 May 2021 13:05:45 +0000 (22:05 +0900)] 
bpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034)

Co-authored-by: Szymon Trapp
4 years agoRemove PyTryblock struct (GH-26059)
Mark Shannon [Wed, 12 May 2021 13:04:38 +0000 (14:04 +0100)] 
Remove PyTryblock struct (GH-26059)

4 years agobpo-40222: Mention zero-cost exceptions in whats-new for 3.11 (GH-26021)
Mark Shannon [Wed, 12 May 2021 10:31:48 +0000 (11:31 +0100)] 
bpo-40222: Mention zero-cost exceptions in whats-new for 3.11 (GH-26021)

4 years agobpo-43933: Force RETURN_VALUE bytecodes to have line numbers (GH-26054)
Mark Shannon [Wed, 12 May 2021 10:25:44 +0000 (11:25 +0100)] 
bpo-43933: Force RETURN_VALUE bytecodes to have line numbers (GH-26054)

4 years agobpo-40640: doc -- add missing ... in example of Continue (#26055)
Irit Katriel [Wed, 12 May 2021 10:23:03 +0000 (11:23 +0100)] 
bpo-40640: doc -- add missing ... in example of Continue (#26055)

Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com>
4 years agobpo-44002: Switch to lru_cache in urllib.parse. (GH-25798)
Gregory P. Smith [Wed, 12 May 2021 00:01:44 +0000 (17:01 -0700)] 
bpo-44002: Switch to lru_cache in urllib.parse. (GH-25798)

Switch to lru_cache in urllib.parse.

urllib.parse now uses functool.lru_cache for its internal URL splitting and
quoting caches instead of rolling its own like its the 90s.

The undocumented internal Quoted class API is now deprecated
as it had no reason to be public and no existing OSS users were found.

The clear_cache() API remains undocumented but gets an explicit test as it
is used in a few projects' (twisted, gevent) tests as well as our own regrtest.

4 years agobpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object...
Miguel Brito [Tue, 11 May 2021 23:27:22 +0000 (00:27 +0100)] 
bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964)

4 years agobpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None. (#25438)
Erlend Egeberg Aasland [Tue, 11 May 2021 23:26:30 +0000 (01:26 +0200)] 
bpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None. (#25438)

Co-authored-by: Thomas Kluyver <takowl@gmail.com>
4 years ago Correct the changelog entry for the syntax error message for multiple exception...
Thomas Grainger [Tue, 11 May 2021 23:22:50 +0000 (00:22 +0100)] 
 Correct the changelog entry for the syntax error message for multiple exception types (GH-26038)

4 years agoFix import of HTTPError (GH-22304)
Sebastian Rittau [Tue, 11 May 2021 23:01:33 +0000 (01:01 +0200)] 
Fix import of HTTPError (GH-22304)

Import HTTPError from urllib.error instead of urllib.request.

4 years agobpo-10548: expectedFailure does not apply to fixtures (#23201)
Irit Katriel [Tue, 11 May 2021 21:48:20 +0000 (22:48 +0100)] 
bpo-10548: expectedFailure does not apply to fixtures (#23201)

4 years agobpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016)
uniocto [Tue, 11 May 2021 20:47:05 +0000 (05:47 +0900)] 
bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016)

* Document os-system, subprocess Patch

* Update Doc/library/os.rst

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (#23192)
Irit Katriel [Tue, 11 May 2021 17:55:24 +0000 (18:55 +0100)] 
bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (#23192)

4 years agobpo-43795: PEP 652 user documentation (GH-25668)
Petr Viktorin [Tue, 11 May 2021 14:04:33 +0000 (16:04 +0200)] 
bpo-43795: PEP 652 user documentation (GH-25668)

- Reformat the C API and ABI Versioning page (and extend/clarify a bit)
- Rewrite the stable ABI docs into a general text on C API Compatibility
- Add a list of Limited API contents, and notes for the individual items.
- Replace `Include/README.rst` with a link to a devguide page with the same info

4 years agoDoc: http.server: directory is not a class attribute, but an argument. (GH-26017)
Julien Palard [Tue, 11 May 2021 01:26:53 +0000 (03:26 +0200)] 
Doc: http.server: directory is not a class attribute, but an argument. (GH-26017)

* Doc: http.server: directory is not a class attribute, but an argument.

4 years agobpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024)
Giampaolo Rodola [Mon, 10 May 2021 20:45:06 +0000 (22:45 +0200)] 
bpo-43743 add comment stating _USE_CP_SENDFILE should not be removed (#26024)

4 years agobpo-44074: let patchcheck infer the base branch name (GH-25991)
Leonardo Lai [Mon, 10 May 2021 18:34:27 +0000 (20:34 +0200)] 
bpo-44074: let patchcheck infer the base branch name (GH-25991)

4 years agobpo-43558: Add note about base class initialization to dataclasses doc (GH-25967)
dhoekstra2000 [Mon, 10 May 2021 13:30:22 +0000 (15:30 +0200)] 
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967)

4 years agoPrevent access outside buffer (GH-26012)
Dennis Sweeney [Mon, 10 May 2021 09:10:22 +0000 (05:10 -0400)] 
Prevent access outside buffer (GH-26012)

4 years agoRevert test for Tix deprecation warning (GH-26005)
Zachary Ware [Sun, 9 May 2021 06:58:35 +0000 (01:58 -0500)] 
Revert test for Tix deprecation warning (GH-26005)

Added in bpo-41730 (GH-22186), the test apparently causes refleaks.  The
test isn't worth hunting them down, so it's simply reverted.

This partially reverts commit 4a2d98a1e98de25c5114d11fcb0f9fedbb057e51.

4 years agoFix a word in dataclasses docs. (GH-26003)
Eric V. Smith [Sun, 9 May 2021 02:20:04 +0000 (22:20 -0400)] 
Fix a word in dataclasses docs. (GH-26003)

4 years agobpo-43417: Better buffer handling for ast.unparse (GH-24772)
Batuhan Taskaya [Sat, 8 May 2021 23:32:04 +0000 (02:32 +0300)] 
bpo-43417: Better buffer handling for ast.unparse (GH-24772)

4 years agobpo-28307: Convert simple C-style formatting with literal format into f-string. ...
Serhiy Storchaka [Sat, 8 May 2021 19:33:10 +0000 (22:33 +0300)] 
bpo-28307: Convert simple C-style formatting with literal format into f-string. (GH-5012)

C-style formatting with literal format containing only format codes
%s, %r and %a (with optional width, precision and alignment)
will be converted to an equivalent f-string expression.

It can speed up formatting more than 2 times by eliminating
runtime parsing of the format string and creating temporary tuple.

4 years agobpo-43149: Correct the syntax error message for multiple exception types (GH-25996)
Pablo Galindo [Sat, 8 May 2021 18:24:41 +0000 (19:24 +0100)] 
bpo-43149: Correct the syntax error message for multiple exception types (GH-25996)

Automerge-Triggered-By: GH:pablogsal
4 years agoUpdate references to master to point to main in customsourcelink.html (GH-25993)
Pablo Galindo [Sat, 8 May 2021 16:13:24 +0000 (17:13 +0100)] 
Update references to master to point to main in customsourcelink.html (GH-25993)

4 years agobpo-42725: mention the changes on what's new (GH-25974)
Batuhan Taskaya [Sat, 8 May 2021 11:49:40 +0000 (14:49 +0300)] 
bpo-42725: mention the changes on what's new (GH-25974)

4 years agobpo-31904: Correct error string in test_file_not_exists() for VxWorks (GH-25965)
pxinwr [Sat, 8 May 2021 08:03:41 +0000 (16:03 +0800)] 
bpo-31904: Correct error string in test_file_not_exists() for VxWorks (GH-25965)

The error string on VxWorks is "no such file or directory" for FileNotFoundError. That is, the 1st letter of the error string has lower case.

4 years agoFix make libainstall. (GH-25980)
Senthil Kumaran [Sat, 8 May 2021 06:38:08 +0000 (23:38 -0700)] 
Fix make libainstall. (GH-25980)

Initial patch by Benno Leslie.

4 years agoFix the whatsnew/3.11.rst to link to the blurb-generated changelog. (GH-25979)
Ned Deily [Sat, 8 May 2021 03:25:37 +0000 (23:25 -0400)] 
Fix the whatsnew/3.11.rst to link to the blurb-generated changelog. (GH-25979)

4 years agoUpdate the SOURCE_URI in pyspecific.py to point to the new branch (GH-25977)
Pablo Galindo [Sat, 8 May 2021 02:43:23 +0000 (03:43 +0100)] 
Update the SOURCE_URI in pyspecific.py to point to the new branch (GH-25977)

4 years agoAdd the blurbify of the 3.10.0b1 changelog to the main branch (GH-25976)
Ned Deily [Sat, 8 May 2021 02:31:01 +0000 (22:31 -0400)] 
Add the blurbify of the 3.10.0b1 changelog to the main branch (GH-25976)

4 years agoDo not use Py_ssize_clean_t (GH-25940)
Inada Naoki [Sat, 8 May 2021 01:17:37 +0000 (10:17 +0900)] 
Do not use Py_ssize_clean_t (GH-25940)

4 years agobpo-44026: Idle - display interpreter's 'did you mean' hints (GH-25912)
E-Paine [Fri, 7 May 2021 23:52:01 +0000 (00:52 +0100)] 
bpo-44026: Idle - display interpreter's 'did you mean' hints (GH-25912)

A C function accessible by the default exception handler, but not by python code,
finds the existing name closest to the name causing a name or attribute error.  For
such errors, call the default handler after capturing stderr and retrieve its message line.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44063: set the missing end locations on the compiler (GH-25956)
Batuhan Taskaya [Fri, 7 May 2021 17:49:06 +0000 (20:49 +0300)] 
bpo-44063: set the missing end locations on the compiler (GH-25956)

4 years agobpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)
wyz23x2 [Fri, 7 May 2021 15:53:23 +0000 (23:53 +0800)] 
bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
4 years agobpo-40222: "Zero cost" exception handling (GH-25729)
Mark Shannon [Fri, 7 May 2021 14:19:19 +0000 (15:19 +0100)] 
bpo-40222: "Zero cost" exception handling (GH-25729)

"Zero cost" exception handling.

* Uses a lookup table to determine how to handle exceptions.
* Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements.
* Reduces the size of the frame object by about 60%.

4 years agoSimple Enhancement. Add missing return statements in ftplib documentation. (GH-25968)
Senthil Kumaran [Fri, 7 May 2021 14:08:47 +0000 (07:08 -0700)] 
Simple Enhancement. Add missing return statements in ftplib documentation. (GH-25968)

4 years agobpo-44047: Remove unused argument to _pysqlite_seterror (GH-25915)
Erlend Egeberg Aasland [Fri, 7 May 2021 13:15:01 +0000 (15:15 +0200)] 
bpo-44047: Remove unused argument to _pysqlite_seterror (GH-25915)

4 years agoDoc: What's new in Python 3.11 (GH-25963)
Julien Palard [Fri, 7 May 2021 08:06:45 +0000 (10:06 +0200)] 
Doc: What's new in Python 3.11 (GH-25963)

4 years agobpo-44029: Remove Py_UNICODE APIs (GH-25881)
Inada Naoki [Fri, 7 May 2021 06:58:29 +0000 (15:58 +0900)] 
bpo-44029: Remove Py_UNICODE APIs (GH-25881)

Remove deprecated `Py_UNICODE` APIs: `PyUnicode_Encode`,
`PyUnicode_EncodeUTF7`, `PyUnicode_EncodeUTF8`,
`PyUnicode_EncodeUTF16`, `PyUnicode_EncodeUTF32`,
`PyUnicode_EncodeLatin1`, `PyUnicode_EncodeMBCS`,
`PyUnicode_EncodeDecimal`, `PyUnicode_EncodeRawUnicodeEscape`,
`PyUnicode_EncodeCharmap`, `PyUnicode_EncodeUnicodeEscape`,
`PyUnicode_TransformDecimalToASCII`, `PyUnicode_TranslateCharmap`,
`PyUnicodeEncodeError_Create`, `PyUnicodeTranslateError_Create`.

See :pep:`393` and :pep:`624` for reference.

4 years agobpo-40943: Fix skipitem() didn't raise SystemError (GH-25937)
Inada Naoki [Fri, 7 May 2021 02:56:48 +0000 (11:56 +0900)] 
bpo-40943: Fix skipitem() didn't raise SystemError (GH-25937)

`convertitem()` raises `SystemError` when '#' is used without `PY_SSIZE_T_CLEAN`.
This commit makes `skipitem()` raise it too.

4 years agoFix minor grammar problems in dataclasses documentation (GH-25948)
Scott Noyes [Thu, 6 May 2021 21:52:46 +0000 (16:52 -0500)] 
Fix minor grammar problems in dataclasses documentation (GH-25948)

Some missing words; some odd word choices.

4 years agodocs: clearly document that ":#X" string formatting results in "0X..." (GH-25941)
Tal Einat [Thu, 6 May 2021 19:27:29 +0000 (22:27 +0300)] 
docs: clearly document that ":#X" string formatting results in "0X..." (GH-25941)

* clearly document that ":#X" string formatting results in "0X..."

* put back the "serial comma"

4 years agobpo-43972: Set content-length to 0 for http.server.SimpleHTTPRequestHandler 301s...
Stephen Rosen [Thu, 6 May 2021 19:25:52 +0000 (15:25 -0400)] 
bpo-43972: Set content-length to 0 for http.server.SimpleHTTPRequestHandler 301s (GH-25705)

* Set content-length for simple http server 301s

When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.

* Test Content-Length on simple http server redirect

When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.

* Add news entry for SimpleHTTPRequestHandler fix

* Clarify the specific kind of 301

Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
4 years agobpo-44059: Register the SerenityOS Browser in the webbrowser module (GH-25947)
Linus Groh [Thu, 6 May 2021 19:01:12 +0000 (20:01 +0100)] 
bpo-44059: Register the SerenityOS Browser in the webbrowser module (GH-25947)

Automerge-Triggered-By: GH:gpshead
4 years agoEliminate duplicated calculations and unnecessary work for linear regression (GH...
Raymond Hettinger [Thu, 6 May 2021 14:43:13 +0000 (07:43 -0700)] 
Eliminate duplicated calculations and unnecessary work for linear regression (GH-25922)