Commit graph

109967 commits

Author SHA1 Message Date
Pablo Galindo 80b089179f
bpo-44143: Fix crash in the parser when raising tokenizer errors with an exception set (GH-26144) 2021-05-15 17:58:02 +01:00
Miguel Brito 086b5c6ce1
bpo-32133: Improve numbers docs (GH-26124) 2021-05-15 09:56:12 -07:00
Pablo Galindo c5b833046d
bpo-44139: Use a more descriptive syntax error comprehension case in the What's New for 3.10 (GH-26145) 2021-05-15 17:37:12 +01:00
Ken Jin f24afda591
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
2021-05-15 16:15:23 +01:00
Batuhan Taskaya e4e931a67e
bpo-44081: improve ast.unparse() for lambdas with no parameters (GH-26000) 2021-05-15 15:55:53 +03:00
Rory Yorke 4aa63d65a9
bpo-44072: fix Complex, Integral docs for ** (GH-25986)
In numbers module docstrings and docs.
2021-05-14 18:01:48 -04:00
Antoine Pitrou c10c2ec7a0
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.
2021-05-14 12:37:20 -07:00
Erlend Egeberg Aasland 07797121cc
bpo-43729: Clarify comment in tutorial example (GH-25191) 2021-05-14 12:09:08 -07:00
Miguel Brito dc0b364de4
bpo-44095: Add suffix, stem and suffixes to zipfile.Path (GH-26129) 2021-05-14 10:57:36 -07:00
kudavid 2918846a4f
Subprocess Protocols Documentation (GH-20950)
Should be "Subprocess Protocol instances" not "Datagram Protocol instances"
2021-05-14 10:20:33 -07:00
Géry Ogam 19d839ae20
[doc] Fix typos in cgi.rst (#24766) 2021-05-14 18:09:01 +01:00
Erlend Egeberg Aasland be7e467bcf
sqlite3 test suite now works with SQLITE_DQS=0 (GH-26032) 2021-05-14 19:27:21 +09:00
Daniel Shahaf fe175a87ad
Doc: Fix ambiguous pronoun (GH-26037) 2021-05-13 23:27:06 -07:00
josephernest 56b8ea65d2
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".
2021-05-13 23:06:26 -07:00
Shantanu 65d180d983
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 <>
2021-05-13 22:59:53 -07:00
Saiyang Gou 3d4b5f1019
Update doc as relative import can be used with star import (GH-25667) 2021-05-13 22:37:19 -07:00
Ken Jin 53c91ac525
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
2021-05-13 22:31:28 -07:00
Petr Viktorin ddd30b2dd2
Reword paragraph on specific value for Py_LIMITED_API (GH-26101) 2021-05-13 22:22:44 -07:00
Erlend Egeberg Aasland a09fc9c63f
bpo-43908: Add What's New entry for Py_TPFLAGS_IMMUTABLETYPE flag (GH-25816) 2021-05-13 15:44:55 -07:00
Irit Katriel 4aeee0b47b
bpo-28146: Fix a confusing error message in str.format() (GH-24213)
Automerge-Triggered-By: GH:pitrou
2021-05-13 13:55:55 -07:00
Inada Naoki ae3c66acb8
bpo-44094: Remove deprecated PyErr_ APIs. (GH-26011)
These APIs are deprecated since Python 3.3. They are not documented too.
2021-05-13 13:45:26 -07:00
Inada Naoki e0c614e5fd
bpo-44114: Remove redundant cast. (GH-26098) 2021-05-13 13:42:55 -07:00
Antoine Pitrou 1aa3530314
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
2021-05-13 10:48:15 -07:00
Ikko Ashimine 3c0b070f3b
Fix typo in configure (GH-26078) 2021-05-14 02:09:17 +09:00
Barney Gale 366c69f3f6
bpo-39906: Document new follow_symlinks argument to pathlib.Path.stat() and chmod() in 3.10 whatsnew. (GH-26089) 2021-05-13 13:17:04 +01:00
Barney Gale d1560d2429
bpo-43757: Document os.path.realpath(strict=True) in 3.10 whatsnew. (GH-26090) 2021-05-13 13:14:45 +01:00
Joe Marshall ab383eb6f0
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.
2021-05-13 10:54:17 +03:00
Ken Jin b2f3f8e3d8
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
2021-05-12 22:24:35 -07:00
Dong-hee Na 7565586724
bpo-44113: Update fromzenmain not to use Py_SetProgramName (GH-26085) 2021-05-13 10:19:46 +09:00
Victor Stinner ec7c09b9bc
bpo-44113: Fix compiler warning in PySys_AddWarnOption() (GH-26084)
Ignore Py_DEPRECATED() warning on purpose.
2021-05-13 02:27:56 +02:00
Miguel Brito 8ea350ee90
bpo-44030: Fix formatting error in exceptions docs (GH-25929) 2021-05-13 01:11:36 +01:00
Dong-hee Na a0ccc404ca
bpo-44113: Update __xxtestfuzz not to use Py_SetProgramName (GH-26083) 2021-05-13 08:22:18 +09:00
Victor Stinner 6cd0446ef7
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).
2021-05-12 23:59:25 +02:00
Erlend Egeberg Aasland 504ffdae4e
bpo-40645: Fix ref leaks in _hashopenssl (GH-26079) 2021-05-12 19:20:41 +01:00
Erlend Egeberg Aasland e5ba1fe995
bpo-44116: Add GC support to _csv heap types (GH-26074) 2021-05-12 19:18:58 +01:00
Victor Stinner ff230153fd
bpo-44117: Add C API section to What's New in Python 3.11 (GH-26071)
Add also references to PyFrame_BlockPop() removal.
2021-05-12 18:46:29 +02:00
Petr Viktorin 3611db53f5
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
2021-05-12 09:04:34 -07:00
Yurii Karabas c40486a32d
bpo-38908: Fix issue when non runtime_protocol failed to raise TypeError (#26067) 2021-05-12 08:47:49 -07:00
Dong-hee Na 9b06e4b535
Use get_binascii_state instead of PyModule_GetState (GH-26069) 2021-05-13 00:09:30 +09:00
Ken Jin 2b458c1dba
bpo-44089: Allow subclassing of `csv.Error` (GH-26008)
* fix subclass error

* Update 2021-05-09-22-52-34.bpo-44089.IoANsN.rst
2021-05-12 06:47:11 -07:00
Karl Dubost 5010c044c7
bpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034)
Co-authored-by: Szymon Trapp
2021-05-12 14:05:45 +01:00
Mark Shannon 117bfd2b71
Remove PyTryblock struct (GH-26059) 2021-05-12 14:04:38 +01:00
Mark Shannon 78b2abca8e
bpo-40222: Mention zero-cost exceptions in whats-new for 3.11 (GH-26021) 2021-05-12 11:31:48 +01:00
Mark Shannon cb6f3d7163
bpo-43933: Force RETURN_VALUE bytecodes to have line numbers (GH-26054) 2021-05-12 11:25:44 +01:00
Irit Katriel 6574334a68
bpo-40640: doc -- add missing ... in example of Continue (#26055)
Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com>
2021-05-12 11:23:03 +01:00
Gregory P. Smith d597fdc5fd
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.
2021-05-11 17:01:44 -07:00
Miguel Brito e9d7f88d56
bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964) 2021-05-12 00:27:22 +01:00
Erlend Egeberg Aasland 8563a7052c
bpo-28528: Fix pdb.checkline() attribute error when 'curframe' is None. (#25438)
Co-authored-by: Thomas Kluyver <takowl@gmail.com>
2021-05-12 00:26:30 +01:00
Thomas Grainger c1df8808e0
Correct the changelog entry for the syntax error message for multiple exception types (GH-26038) 2021-05-12 00:22:50 +01:00
Sebastian Rittau 5fedf71439
Fix import of HTTPError (GH-22304)
Import HTTPError from urllib.error instead of urllib.request.
2021-05-11 16:01:33 -07:00