]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309)
Erlend Egeberg Aasland [Sat, 22 May 2021 22:03:09 +0000 (00:03 +0200)] 
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309)

Co-authored-by: denfromufa <denfromufa@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-33809: add the TracebackException.print() method (GH-24231)
Irit Katriel [Sat, 22 May 2021 16:39:33 +0000 (17:39 +0100)] 
bpo-33809: add the TracebackException.print() method (GH-24231)

4 years agobpo-20684: Remove unused inspect._signature_get_bound_param (GH-21100)
Anthony Sottile [Sat, 22 May 2021 14:51:43 +0000 (07:51 -0700)] 
bpo-20684: Remove unused inspect._signature_get_bound_param (GH-21100)

4 years agoRemove effbot urls (GH-26308)
E-Paine [Sat, 22 May 2021 12:09:54 +0000 (13:09 +0100)] 
Remove effbot urls (GH-26308)

4 years agoFix typo for configure.ac (GH-26305)
Dong-hee Na [Fri, 21 May 2021 23:40:59 +0000 (08:40 +0900)] 
Fix typo for configure.ac (GH-26305)

4 years agoSpecify Python Cookbook edition for reference (GH-26301)
Terry Jan Reedy [Fri, 21 May 2021 22:17:10 +0000 (18:17 -0400)] 
Specify Python Cookbook edition for reference (GH-26301)

The timeit doc references Tim Peters introduction to the Chapter 18,
Algorithms, of the second edition.  The first editiion was before timeit.
The third edition instead has Chapter 1, Data Structures and Algorithms,
without Tim's introduction.

4 years agobpo-40736: Improve the error message for re.search() TypeError (GH-23312)
Zackery Spytz [Fri, 21 May 2021 21:02:42 +0000 (14:02 -0700)] 
bpo-40736: Improve the error message for re.search() TypeError (GH-23312)

Include the invalid type in the error message.

4 years agobpo-44032: Fix downcast conversion in frameobject.c (GH-26291)
Pablo Galindo [Fri, 21 May 2021 18:15:39 +0000 (19:15 +0100)] 
bpo-44032: Fix downcast conversion in frameobject.c (GH-26291)

4 years agoRemove duplicate words in docs. (GH-26167)
Mariusz Felisiak [Fri, 21 May 2021 18:09:09 +0000 (20:09 +0200)] 
Remove duplicate words in docs. (GH-26167)

4 years agobpo-43927: Change 'IOError' to 'OSError' (GH-26289)
Terry Jan Reedy [Fri, 21 May 2021 17:54:01 +0000 (13:54 -0400)] 
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)

This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.

4 years agobpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)
Pablo Galindo [Fri, 21 May 2021 17:34:54 +0000 (18:34 +0100)] 
bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)

The invalid assignment rules are very delicate since the parser can
easily raise an invalid assignment when a keyword argument is provided.
As they are very deep into the grammar tree, is very difficult to
specify in which contexts these rules can be used and in which don't.
For that, we need to use a different version of the rule that doesn't do
error checking in those situations where we don't want the rule to raise
(keyword arguments and generator expressions).

We also need to check if we are in left-recursive rule, as those can try
to eagerly advance the parser even if the parse will fail at the end of
the expression. Failing to do this allows the parser to start parsing a
call as a tuple and incorrectly identify a keyword argument as an
invalid assignment, before it realizes that it was not a tuple after all.

4 years agobpo-44184: Fix subtype_dealloc() for freed type (GH-26274)
Victor Stinner [Fri, 21 May 2021 17:19:54 +0000 (19:19 +0200)] 
bpo-44184: Fix subtype_dealloc() for freed type (GH-26274)

Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.

Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.

_PyMem_IsPtrFreed() argument is now constant.

4 years ago[doc] Fix indentation in inspect documentation (GH-24846)
Numerlor [Fri, 21 May 2021 17:05:35 +0000 (19:05 +0200)] 
[doc] Fix indentation in inspect documentation (GH-24846)

4 years agobpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284)
Jason R. Coombs [Fri, 21 May 2021 17:00:40 +0000 (13:00 -0400)] 
bpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284)

* bpo-43643: Sync with python/importlib_resources@c17a610aad.
* Sync with python/importlib_resources@89fd5e961a.

4 years agobpo-44180: Report generic syntax errors in the furthest position reached in the first...
Pablo Galindo [Fri, 21 May 2021 15:09:51 +0000 (16:09 +0100)] 
bpo-44180: Report generic syntax errors in the furthest position reached in the first parser pass (GH-26253)

4 years agobpo-44032: Move data stack to thread from FrameObject. (GH-26076)
Mark Shannon [Fri, 21 May 2021 09:57:35 +0000 (10:57 +0100)] 
bpo-44032: Move data stack to thread from FrameObject. (GH-26076)

* Remove 'zombie' frames. We won't need them once we are allocating fixed-size frames.

* Add co_nlocalplus field to code object to avoid recomputing size of locals + frees + cells.

* Move locals, cells and freevars out of frame object into separate memory buffer.

* Use per-threadstate allocated memory chunks for local variables.

* Move globals and builtins from frame object to per-thread stack.

* Move (slow) locals frame object to per-thread stack.

* Move internal frame functions to internal header.

4 years agobpo-44150: Support optional weights parameter for fmean() (GH-26175)
Raymond Hettinger [Fri, 21 May 2021 03:22:26 +0000 (20:22 -0700)] 
bpo-44150: Support optional weights parameter for fmean() (GH-26175)

4 years agobpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184)
Barney Gale [Thu, 20 May 2021 16:41:33 +0000 (17:41 +0100)] 
bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184)

Issue should be fixed in bpo-43757

Co-Authored-by: Tzu-ping Chung <uranusjr@gmail.com>
4 years agobpo-38820: Test with OpenSSL 3.0.0-alpha17 (#26266)
Christian Heimes [Thu, 20 May 2021 14:46:38 +0000 (16:46 +0200)] 
bpo-38820: Test with OpenSSL 3.0.0-alpha17 (#26266)

4 years agobpo-36160: Fix test_site so that it can run independently of other tests (GH-12131)
native-api [Thu, 20 May 2021 10:25:37 +0000 (13:25 +0300)] 
bpo-36160: Fix test_site so that it can run independently of other tests (GH-12131)

4 years agobpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() (GH-26201)
Victor Stinner [Thu, 20 May 2021 10:08:05 +0000 (12:08 +0200)] 
bpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() (GH-26201)

Moreover, Py_FrozenMain() relies on Py_InitializeFromConfig() to
handle the PYTHONUNBUFFERED environment variable and configure C
stdio streams like stdout (make the stream unbuffered).

4 years agoUpdate link in SECURITY.md (GH-21320)
Marcono1234 [Thu, 20 May 2021 01:52:25 +0000 (03:52 +0200)] 
Update link in SECURITY.md (GH-21320)

4 years agobpo-43693: Group the code in codeobject.c logically. (gh-26216)
Eric Snow [Wed, 19 May 2021 22:44:56 +0000 (16:44 -0600)] 
bpo-43693: Group the code in codeobject.c logically. (gh-26216)

4 years ago[doc] Fix typo in asyncio-eventloop documentation (GH-22311)
Bruno [Wed, 19 May 2021 21:18:42 +0000 (18:18 -0300)] 
[doc] Fix typo in asyncio-eventloop documentation (GH-22311)

4 years agobpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine...
naglis [Wed, 19 May 2021 20:36:05 +0000 (20:36 +0000)] 
bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870)

4 years agobpo-26110: Document `CALL_METHOD_KW` (GH-26159)
Ken Jin [Wed, 19 May 2021 18:32:06 +0000 (02:32 +0800)] 
bpo-26110: Document `CALL_METHOD_KW` (GH-26159)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agoRemove unused function in ceval.c (GH-26246)
Pablo Galindo [Wed, 19 May 2021 18:12:19 +0000 (19:12 +0100)] 
Remove unused function in ceval.c (GH-26246)

4 years agoFix compiler warning for misleading guarding in the tkinter (GH-26244)
Pablo Galindo [Wed, 19 May 2021 18:10:23 +0000 (19:10 +0100)] 
Fix compiler warning for misleading guarding in the tkinter (GH-26244)

The newest gcc emmits this warning:

```
/Modules/_tkinter.c:272:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  272 |         if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
      |         ^~
/Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’
 2869 |     LEAVE_PYTHON
      |     ^~~~~~~~~~~~
/Modules/_tkinter.c:243:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  243 |     (*(PyThreadState**)Tcl_GetThreadData(&state_key, sizeof(PyThreadState*)))
      |     ^
/Modules/_tkinter.c:272:57: note: in expansion of macro ‘tcl_tstate’
  272 |         if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
      |                                                         ^~~~~~~~~~
/Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’
 2869 |     LEAVE_PYTHON

```

that's because the macro packs together two statements at the same level
as the "if". The warning is misleading but is very noisy so it makes
sense to fix it.

4 years agoFix compiler warning in the xml module (GH-26245)
Pablo Galindo [Wed, 19 May 2021 18:05:40 +0000 (19:05 +0100)] 
Fix compiler warning in the xml module (GH-26245)

The newest version of gcc complains about passing un-initialized arrays
as constant pointers:

```
/Modules/expat/xmltok_ns.c: In function ‘findEncodingNS’:
/Modules/expat/xmltok.h:272:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
  272 |   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’
   95 |   XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
      |   ^~~~~~~~~~~~~~
/Modules/expat/xmltok.h:272:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’}
  272 |   (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’
   95 |   XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
      |   ^~~~~~~~~~~~~~
In file included from /Modules/expat/xmltok.c:1657:
/Modules/expat/xmltok_ns.c:92:8: note: ‘buf’ declared here
   92 |   char buf[ENCODING_MAX];

```

4 years agobpo-44168: Fix error message in the parser for keyword arguments for invalid expressi...
Pablo Galindo [Wed, 19 May 2021 18:03:04 +0000 (19:03 +0100)] 
bpo-44168: Fix error message in the parser for keyword arguments for invalid expressions (GH-26210)

4 years agoEnable GitHub Actions on the 3.10 branch (GH-26242)
Hugo van Kemenade [Wed, 19 May 2021 15:14:37 +0000 (18:14 +0300)] 
Enable GitHub Actions on the 3.10 branch (GH-26242)

4 years agobpo-4928: Document NamedTemporaryFile non-deletion after SIGKILL (#26198)
Catherine Devlin [Wed, 19 May 2021 14:21:03 +0000 (10:21 -0400)] 
bpo-4928: Document NamedTemporaryFile non-deletion after SIGKILL (#26198)

* bpo-4928 Document NamedTemporaryFile non-deletion after SIGKILL

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 years agobpo-43749: Ensure current exe is copied when using venv on windows (GH-25216)
Ian Norton [Wed, 19 May 2021 09:37:17 +0000 (10:37 +0100)] 
bpo-43749: Ensure current exe is copied when using venv on windows (GH-25216)

Automerge-Triggered-By: GH:vsajip
4 years agobpo-44010: IDLE: colorize pattern-matching soft keywords (GH-25851)
Tal Einat [Wed, 19 May 2021 09:18:10 +0000 (12:18 +0300)] 
bpo-44010: IDLE: colorize pattern-matching soft keywords (GH-25851)

4 years agobpo-44106: Purge unused sqlite3 doc includes (GH-26234)
Erlend Egeberg Aasland [Wed, 19 May 2021 08:08:12 +0000 (10:08 +0200)] 
bpo-44106: Purge unused sqlite3 doc includes (GH-26234)

4 years agobpo-44106: Improve sqlite3 example database contents (GH-26027)
Erlend Egeberg Aasland [Wed, 19 May 2021 07:41:19 +0000 (09:41 +0200)] 
bpo-44106: Improve sqlite3 example database contents (GH-26027)

4 years agobpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)
Erlend Egeberg Aasland [Wed, 19 May 2021 07:05:48 +0000 (09:05 +0200)] 
bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)

4 years agobpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411)
Zackery Spytz [Tue, 18 May 2021 21:56:01 +0000 (14:56 -0700)] 
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411)

4 years agobpo-41963: document that ConfigParser strips off comments (GH-26197)
Jürgen Gmach [Tue, 18 May 2021 16:11:23 +0000 (18:11 +0200)] 
bpo-41963: document that ConfigParser strips off comments (GH-26197)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Laura Gutierrez Funderburk <58710704+lgfunderburk@users.noreply.github.com>
4 years agobpo-25872: Add unit tests for linecache and threading (GH-25913)
uniocto [Tue, 18 May 2021 08:56:52 +0000 (17:56 +0900)] 
bpo-25872: Add unit tests for linecache and threading (GH-25913)

4 years agobpo-44131: Fix Makefile for test_frozenmain (GH-26203)
Victor Stinner [Tue, 18 May 2021 06:40:37 +0000 (08:40 +0200)] 
bpo-44131: Fix Makefile for test_frozenmain (GH-26203)

Remove Programs/test_frozenmain.h Makefile target: it ran make
in parallel which caused build errors on LTO+PGO builds.

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>