]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-38169: Increase code coverage for SharedMemory and ShareableList (GH-16139)
Vinay Sharma [Sun, 19 Jul 2020 13:35:52 +0000 (19:05 +0530)] 
bpo-38169: Increase code coverage for SharedMemory and ShareableList (GH-16139)

5 years agobpo-41205: Document Decimal power 0 to the 0 (GH-21386)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Sun, 19 Jul 2020 11:03:43 +0000 (16:33 +0530)] 
bpo-41205: Document Decimal power 0 to the 0 (GH-21386)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
5 years agobpo-41333: Convert OrderedDict.pop() to Argument Clinic (GH-21534)
Serhiy Storchaka [Sun, 19 Jul 2020 06:18:55 +0000 (09:18 +0300)] 
bpo-41333: Convert OrderedDict.pop() to Argument Clinic (GH-21534)

5 years agobpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)
scoder [Sat, 18 Jul 2020 21:19:50 +0000 (23:19 +0200)] 
bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)

Walk down the MRO backwards to find the type that originally defined the final `tp_setattro`, then make sure we are not jumping over intermediate C-level bases with the Python-level call.

Automerge-Triggered-By: @gvanrossum
5 years agobpo-39603: Prevent header injection in http methods (GH-18485)
AMIR [Sat, 18 Jul 2020 20:16:10 +0000 (00:46 +0430)] 
bpo-39603: Prevent header injection in http methods (GH-18485)

reject control chars in http method in http.client.putrequest to prevent http header injection

5 years agobpo-41325: Add version note for args and kwargs property in call object (GH-21525)
Jordan Speicher [Sat, 18 Jul 2020 13:05:44 +0000 (08:05 -0500)] 
bpo-41325: Add version note for args and kwargs property in call object (GH-21525)

5 years agobpo-41262: Convert memoryview to Argument Clinic. (GH-21421)
Serhiy Storchaka [Sat, 18 Jul 2020 08:12:05 +0000 (11:12 +0300)] 
bpo-41262: Convert memoryview to Argument Clinic. (GH-21421)

5 years agobpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-21472)
Serhiy Storchaka [Sat, 18 Jul 2020 08:11:21 +0000 (11:11 +0300)] 
bpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-21472)

* Share code for NEWOBJ and NEWOBJ_EX.
* More detailed error messages.

5 years agoFix a small grammatical mistake in a comment (GH-21526)
Brett Cannon [Fri, 17 Jul 2020 20:09:21 +0000 (13:09 -0700)] 
Fix a small grammatical mistake in a comment (GH-21526)

Automerge-Triggered-By: @brettcannon
5 years agobpo-43104: Update NEWS to include CVE-2020-15801 reference (GH-21521)
Steve Dower [Fri, 17 Jul 2020 16:44:27 +0000 (17:44 +0100)] 
bpo-43104: Update NEWS to include CVE-2020-15801 reference (GH-21521)

5 years agobpo-40941: Unify implicit and explicit state in the frame and generator objects into...
Mark Shannon [Fri, 17 Jul 2020 10:44:23 +0000 (11:44 +0100)] 
bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803)

* Merge gen and frame state variables into one.

* Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.

5 years agobpo-41195: Add getter for Openssl security level (GH-21282)
matthewhughes934 [Fri, 17 Jul 2020 08:59:15 +0000 (09:59 +0100)] 
bpo-41195: Add getter for Openssl security level (GH-21282)

Add an accessor under SSLContext.security_level as a wrapper around
SSL_CTX_get_security_level, see:
https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html

------
This is my first time contributing, so please pull me up on all the things I missed or did incorrectly.

Automerge-Triggered-By: @tiran
5 years ago bpo-41300: IDLE - save files with non-ascii chars (GH-21512)
Terry Jan Reedy [Thu, 16 Jul 2020 22:24:49 +0000 (18:24 -0400)] 
 bpo-41300: IDLE - save files with non-ascii chars  (GH-21512)

Fix regression released in 3.9.0b4 and 3.8.4.

5 years agoFix trivial typo in the PEG string parser (GH-21508)
Eric V. Smith [Thu, 16 Jul 2020 16:10:23 +0000 (12:10 -0400)] 
Fix trivial typo in the PEG string parser (GH-21508)

5 years agoFix possibly-unitialized warning in string_parser.c. (GH-21503)
Benjamin Peterson [Thu, 16 Jul 2020 13:07:29 +0000 (06:07 -0700)] 
Fix possibly-unitialized warning in string_parser.c. (GH-21503)

GCC says
```
../cpython/Parser/string_parser.c: In function ‘fstring_find_expr’:
../cpython/Parser/string_parser.c:404:93: warning: ‘cols’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  404 |     p2->starting_col_offset = p->tok->first_lineno == p->tok->lineno ? t->col_offset + cols : cols;
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../cpython/Parser/string_parser.c:384:16: note: ‘cols’ was declared here
  384 |     int lines, cols;
      |                ^~~~
../cpython/Parser/string_parser.c:403:45: warning: ‘lines’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  403 |     p2->starting_lineno = t->lineno + lines - 1;
      |                           ~~~~~~~~~~~~~~~~~~^~~
../cpython/Parser/string_parser.c:384:9: note: ‘lines’ was declared here
  384 |     int lines, cols;
      |         ^~~~~
```

and, indeed, if `PyBytes_AsString` somehow fails, lines & cols will not be initialized.

5 years agoRemove unnecessary spaces in code blocks in urllib.parse.rst (GH-21500)
Christopher Yeh [Thu, 16 Jul 2020 11:22:32 +0000 (05:22 -0600)] 
Remove unnecessary spaces in code blocks in urllib.parse.rst (GH-21500)

This should also fix the syntax highlighting for these code blocks

Automerge-Triggered-By: @csabella
5 years agobpo-31844: Move whatsnew note to 3.10.rst (GH-21504)
Berker Peksag [Thu, 16 Jul 2020 06:38:58 +0000 (09:38 +0300)] 
bpo-31844: Move whatsnew note to 3.10.rst (GH-21504)

5 years agobpo-31844: Remove _markupbase.ParserBase.error() (GH-8562)
Berker Peksag [Thu, 16 Jul 2020 06:13:05 +0000 (09:13 +0300)] 
bpo-31844: Remove _markupbase.ParserBase.error() (GH-8562)

5 years agobpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)
Steve Dower [Wed, 15 Jul 2020 21:56:49 +0000 (22:56 +0100)] 
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)

5 years agobpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call (GH-19686)
Zackery Spytz [Wed, 15 Jul 2020 18:43:00 +0000 (12:43 -0600)] 
bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call (GH-19686)

5 years agoFix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478)
Benjamin Peterson [Wed, 15 Jul 2020 17:02:14 +0000 (10:02 -0700)] 
Fix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478)

5 years agoFix -Wstrict-prototypes warning in thread_pthread.h. (GH-21477)
Benjamin Peterson [Wed, 15 Jul 2020 13:12:05 +0000 (06:12 -0700)] 
Fix -Wstrict-prototypes warning in thread_pthread.h. (GH-21477)

5 years agobpo-41302: Fix build with system libmpdec (GH-21481)
Felix Yan [Wed, 15 Jul 2020 12:14:11 +0000 (20:14 +0800)] 
bpo-41302: Fix build with system libmpdec (GH-21481)

Move definition of UNUSED from modified headers of libmpdec to
_decimal.c itself. This makes the vendored source closer to the
standalone library and fixes build with --with-system-libmpdec.

Tested to build fine with either system libmpdec or the vendored one.

5 years agobpo-39017: Avoid infinite loop in the tarfile module (GH-21454)
Rishi [Wed, 15 Jul 2020 11:51:00 +0000 (13:51 +0200)] 
bpo-39017: Avoid infinite loop in the tarfile module (GH-21454)

Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).

5 years agobpo-20183: Convert _locale to the Argument Clinic (GH-14201)
Zackery Spytz [Wed, 15 Jul 2020 09:07:34 +0000 (03:07 -0600)] 
bpo-20183: Convert _locale to the Argument Clinic (GH-14201)

5 years agobpo-41273: asyncio's proactor read transport's better performance by using recv_into...
Tony Solomonik [Tue, 14 Jul 2020 19:41:24 +0000 (22:41 +0300)] 
bpo-41273: asyncio's proactor read transport's better performance by using recv_into instead of recv (#21442)

* bpo-41273: Proactor transport read loop to use recv_into

By using recv_into instead of recv we do not allocate a new buffer each
time _loop_reading calls recv.

This betters performance for any stream using proactor (basically any
asyncio stream on windows).

* bpo-41273: Double proactor read transport buffer size

By doubling the read buffer size we get better performance.

5 years agobpo-32528: Document the change in inheritance of asyncio.CancelledError (GH-21474)
JustAnotherArchivist [Tue, 14 Jul 2020 17:22:43 +0000 (17:22 +0000)] 
bpo-32528: Document the change in inheritance of asyncio.CancelledError (GH-21474)

#msg373510

[bpo-32528]()/#13528 changed `asyncio.CancelledError` such that it no longer inherits from `concurrent.futures.CancelledError`. As this affects existing code, specifically when catching the latter instead of the former in exception handling, it should be documented in the "What's new in 3.8?" document.

Automerge-Triggered-By: @1st1
5 years agoFix repeated words in Classes tutorial (GH-21455)
Paul McMillan [Tue, 14 Jul 2020 01:26:23 +0000 (18:26 -0700)] 
Fix repeated words in Classes tutorial (GH-21455)

The phrase "At any time during execution," was repeated twice.

Automerge-Triggered-By: @Mariatta
5 years agobpo-32192: A basic lazy importer example (GH-21330)
Joannah Nanjekye [Mon, 13 Jul 2020 21:31:02 +0000 (18:31 -0300)] 
bpo-32192: A basic lazy importer example (GH-21330)

* Add example on lazy imports

* Use four spaces for indentation

* change to console

5 years agobpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)
Serhiy Storchaka [Mon, 13 Jul 2020 12:49:26 +0000 (15:49 +0300)] 
bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)

Automerge-Triggered-By: @tiran
5 years agobpo-41146: Convert signal.default_int_handler() to Argument Clinic (GH-21197)
Serhiy Storchaka [Sun, 12 Jul 2020 16:15:20 +0000 (19:15 +0300)] 
bpo-41146: Convert signal.default_int_handler() to Argument Clinic (GH-21197)

5 years agobpo-20175: Convert Modules/_multiprocessing to the Argument Clinic (GH-14245)
Zackery Spytz [Sun, 12 Jul 2020 16:11:11 +0000 (10:11 -0600)] 
bpo-20175: Convert Modules/_multiprocessing to the Argument Clinic (GH-14245)

5 years agobpo-20181: Convert the readline module to the Argument Clinic (#14326)
Zackery Spytz [Sun, 12 Jul 2020 16:01:03 +0000 (10:01 -0600)] 
bpo-20181: Convert the readline module to the Argument Clinic (#14326)

5 years agoFix error in docstrings in bisect module (GH-21422)
Sergey Golitsynskiy [Sat, 11 Jul 2020 23:18:31 +0000 (19:18 -0400)] 
Fix error in docstrings in bisect module (GH-21422)

The docstrings for `bisect_right()` and `bisect_left()` contain sample
code that has a bug: `a.insert(x)` should be `a.insert(i, x)`.

5 years agobpo-41228: Fix /a/are/ in monthcalendar() descripton (GH-21372)
Nima Dini [Sat, 11 Jul 2020 01:54:53 +0000 (18:54 -0700)] 
bpo-41228: Fix /a/are/ in monthcalendar() descripton (GH-21372)

5 years agobpo-36346: Make using the legacy Unicode C API optional (GH-21437)
Serhiy Storchaka [Fri, 10 Jul 2020 20:26:06 +0000 (23:26 +0300)] 
bpo-36346: Make using the legacy Unicode C API optional (GH-21437)

Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0
makes the interpreter not using the wchar_t cache and the legacy Unicode C API.

5 years agobpo-20179: Convert the _overlapped module to the Argument Clinic (GH-14275)
Zackery Spytz [Fri, 10 Jul 2020 17:43:37 +0000 (11:43 -0600)] 
bpo-20179: Convert the _overlapped module to the Argument Clinic (GH-14275)

5 years agoFix typo in docs: 'created by th' -> 'created by the' (GH-21384)
marload [Fri, 10 Jul 2020 15:43:31 +0000 (00:43 +0900)] 
Fix typo in docs: 'created by th' -> 'created by the' (GH-21384)

5 years agobpo-39573: Use the Py_TYPE() macro (GH-21433)
Victor Stinner [Fri, 10 Jul 2020 10:40:38 +0000 (12:40 +0200)] 
bpo-39573: Use the Py_TYPE() macro (GH-21433)

Replace obj->ob_type with Py_TYPE(obj).

5 years agobpo-36346: Do not use legacy Unicode C API in ctypes. (#21429)
Serhiy Storchaka [Fri, 10 Jul 2020 08:17:21 +0000 (11:17 +0300)] 
bpo-36346: Do not use legacy Unicode C API in ctypes. (#21429)

5 years agobpo-41263: Convert code.__new__ to Argument Clinic (GH-21426)
Serhiy Storchaka [Fri, 10 Jul 2020 07:12:04 +0000 (10:12 +0300)] 
bpo-41263: Convert code.__new__ to Argument Clinic (GH-21426)

5 years agobpo-23802: patch: __deepcopy__ memo dict argument usage (GH-21326)
Joannah Nanjekye [Fri, 10 Jul 2020 00:36:35 +0000 (21:36 -0300)] 
bpo-23802: patch: __deepcopy__ memo dict argument usage (GH-21326)

* Clarify __deepcopy__ memo dict argument usage

* Add full stop

5 years agobpo-37765: Add keywords to IDLE tab completions (GH-15138)
Terry Jan Reedy [Thu, 9 Jul 2020 22:08:33 +0000 (18:08 -0400)] 
bpo-37765: Add keywords to IDLE tab completions (GH-15138)

Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key.

Rewrite Completions doc.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agoRemove trailing >>> in enum docs (GH-21358)
E-Paine [Thu, 9 Jul 2020 19:18:34 +0000 (21:18 +0200)] 
Remove trailing >>> in enum docs (GH-21358)

The >>> as the last line serve no purpose and are not colored correctly by Sphinx.

5 years agobpo-41172: Fix check for compiler in test suite (GH-21400)
Steve Dower [Thu, 9 Jul 2020 17:52:43 +0000 (18:52 +0100)] 
bpo-41172: Fix check for compiler in test suite (GH-21400)

5 years agobpo-29590: fix stack trace for gen.throw() with yield from (#19896)
Chris Jerdonek [Thu, 9 Jul 2020 13:27:23 +0000 (06:27 -0700)] 
bpo-29590: fix stack trace for gen.throw() with yield from (#19896)

* Add failing test.

* bpo-29590: fix stack trace for gen.throw() with yield from (GH-NNNN)

When gen.throw() is called on a generator after a "yield from", the
intermediate stack trace entries are lost.  This commit fixes that.

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21412)
Hai Shi [Thu, 9 Jul 2020 13:25:10 +0000 (21:25 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21412)

5 years agobpo-41199: Docstring convention not followed for dataclasses documentation page ...
marload [Thu, 9 Jul 2020 12:13:47 +0000 (21:13 +0900)] 
bpo-41199: Docstring convention not followed for dataclasses documentation page (GH-21413)

Automerge-Triggered-By: @ericvsmith
5 years agobpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback() (GH-21407)
Zackery Spytz [Thu, 9 Jul 2020 10:00:21 +0000 (04:00 -0600)] 
bpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback() (GH-21407)

5 years agoDoc: Builtins functions: faster jump table (GH-21376)
Julien Palard [Thu, 9 Jul 2020 09:38:41 +0000 (11:38 +0200)] 
Doc: Builtins functions: faster jump table (GH-21376)

5 years agobpo-40597: Allow email.contextmanager set_content() to set a null string. (GH-20542)
Mark Sapiro [Wed, 8 Jul 2020 21:00:35 +0000 (14:00 -0700)] 
bpo-40597: Allow email.contextmanager set_content() to set a null string. (GH-20542)

5 years agobpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)
stratakis [Wed, 8 Jul 2020 20:39:41 +0000 (22:39 +0200)] 
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)

The issue is triggered by the bytearray() + bytearray() operation.

Detected by GCC 10 static analysis tool.

5 years agobpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401)
Tony Solomonik [Wed, 8 Jul 2020 19:27:31 +0000 (22:27 +0300)] 
bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401)

The running loop holder cache variable was always set to NULL when
calling set_running_loop.

Now set_running_loop saves the newly created running loop holder in the
cache variable for faster access in get_running_loop.

Automerge-Triggered-By: @1st1
5 years agoRevert "bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() (GH-19378...
Victor Stinner [Wed, 8 Jul 2020 09:02:23 +0000 (11:02 +0200)] 
Revert "bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() (GH-19378)" (GH-21390)

This partially reverts commit 45ec5b99aefa54552947049086e87ec01bc2fc9a.

5 years agocloses bpo-41235: Fix the error handling in SSLContext.load_dh_params() (GH-21385)
Zackery Spytz [Wed, 8 Jul 2020 04:21:58 +0000 (22:21 -0600)] 
closes bpo-41235: Fix the error handling in SSLContext.load_dh_params() (GH-21385)

5 years agoAdd a test for get_id() (GH-21370)
Joannah Nanjekye [Wed, 8 Jul 2020 00:45:45 +0000 (21:45 -0300)] 
Add a test for get_id() (GH-21370)

5 years agobpo-41173: Copy test results file from ARM worker before uploading (GH-21305)
Steve Dower [Tue, 7 Jul 2020 23:24:39 +0000 (00:24 +0100)] 
bpo-41173: Copy test results file from ARM worker before uploading (GH-21305)

5 years agobpo-41224: Document is_annotated() in symtable module and update doc strings (GH...
Joannah Nanjekye [Tue, 7 Jul 2020 23:09:56 +0000 (20:09 -0300)] 
bpo-41224: Document is_annotated() in symtable module and update doc strings (GH-21369)

* Document is_annotate() and update doc strings

* Move quotes to the next line.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-29778: test_embed tests the path configuration (GH-21306)
Victor Stinner [Tue, 7 Jul 2020 22:20:37 +0000 (00:20 +0200)] 
bpo-29778: test_embed tests the path configuration (GH-21306)

5 years agobpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)
Jason R. Coombs [Tue, 7 Jul 2020 11:11:28 +0000 (07:11 -0400)] 
bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)

Automerge-Triggered-By: @jaraco
5 years agobpo-41215: Make assertion in the new parser more strict (GH-21364)
Lysandros Nikolaou [Mon, 6 Jul 2020 22:42:21 +0000 (01:42 +0300)] 
bpo-41215: Make assertion in the new parser more strict (GH-21364)

5 years agobpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363)
Pablo Galindo [Mon, 6 Jul 2020 22:30:14 +0000 (23:30 +0100)] 
bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363)

5 years agobpo-41218: Only mark async code with CO_COROUTINE. (#21357)
Matthias Bussonnier [Mon, 6 Jul 2020 21:26:52 +0000 (14:26 -0700)] 
bpo-41218: Only mark async code with CO_COROUTINE. (#21357)

3.8.3 had a regression where compiling with
ast.PyCF_ALLOW_TOP_LEVEL_AWAIT woudl agressively mark things are
coroutine even if there were not.

5 years agobpo-40742: Doc: fix parallel build. (GH-21237)
Julien Palard [Mon, 6 Jul 2020 20:28:15 +0000 (22:28 +0200)] 
bpo-40742: Doc: fix parallel build. (GH-21237)

5 years agobpo-41215: Don't use NULL by default in the PEG parser keyword list (GH-21355)
Pablo Galindo [Mon, 6 Jul 2020 19:31:16 +0000 (20:31 +0100)] 
bpo-41215: Don't use NULL by default in the PEG parser keyword list (GH-21355)

Automerge-Triggered-By: @lysnikolaou
5 years agobpo-29778: Ensure python3.dll is loaded from correct locations when Python is embedde...
Steve Dower [Mon, 6 Jul 2020 16:32:00 +0000 (17:32 +0100)] 
bpo-29778: Ensure python3.dll is loaded from correct locations when Python is embedded (GH-21297)

Also enables using debug build of `python3_d.dll`
Reference: CVE-2020-15523

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21317)
Hai Shi [Mon, 6 Jul 2020 12:29:49 +0000 (20:29 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21317)

5 years agobpo-37207: Update whatsnews for 3.9 (GH-21337)
Dong-hee Na [Mon, 6 Jul 2020 11:22:04 +0000 (20:22 +0900)] 
bpo-37207: Update whatsnews for 3.9 (GH-21337)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21315)
Hai Shi [Mon, 6 Jul 2020 09:15:08 +0000 (17:15 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21315)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21314)
Hai Shi [Mon, 6 Jul 2020 09:12:49 +0000 (17:12 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21314)

5 years agobpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)
Inada Naoki [Mon, 6 Jul 2020 02:48:30 +0000 (11:48 +0900)] 
bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)

5 years agobpo-28681: Clarify multiple function names in the tutorial (GH-21340)
Joannah Nanjekye [Mon, 6 Jul 2020 01:47:15 +0000 (22:47 -0300)] 
bpo-28681: Clarify multiple function names in the tutorial (GH-21340)

* improve control flow docs

* Add also

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-26205: Specify the number of nested scopes (GH-21324)
Joannah Nanjekye [Mon, 6 Jul 2020 01:42:24 +0000 (22:42 -0300)] 
bpo-26205: Specify the number of nested scopes (GH-21324)

* Clarify number of scopes

* Indicate 3 or 4

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-29727: Register array.array as a MutableSequence (GH-21338)
Pablo Galindo [Sun, 5 Jul 2020 21:43:14 +0000 (22:43 +0100)] 
bpo-29727: Register array.array as a MutableSequence (GH-21338)

5 years agobpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336)
Serhiy Storchaka [Sun, 5 Jul 2020 15:53:45 +0000 (18:53 +0300)] 
bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336)

5 years agobpo-39168: Remove the __new__ method of typing.Generic (GH-21327)
Zackery Spytz [Sun, 5 Jul 2020 05:07:43 +0000 (23:07 -0600)] 
bpo-39168: Remove the __new__ method of typing.Generic (GH-21327)

Automerge-Triggered-By: @gvanrossum
5 years agobpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325)
Inada Naoki [Sun, 5 Jul 2020 04:01:48 +0000 (13:01 +0900)] 
bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325)

It doesn't use PyUnicode_EncodeDecimal. It uses a private API instead.

5 years agoUncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)
Inada Naoki [Sun, 5 Jul 2020 02:01:54 +0000 (11:01 +0900)] 
Uncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)

PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII
are deprecated since Python 3.3.
But Py_DEPRECATED(3.3) was commented out.

5 years agobpo-41204: Fix compiler warning in ast_type_init() (GH-21307)
Victor Stinner [Sat, 4 Jul 2020 21:18:15 +0000 (23:18 +0200)] 
bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)

5 years agobpo-33864: Clarify the docs for typing.ByteString (GH-21311)
Zackery Spytz [Sat, 4 Jul 2020 03:58:21 +0000 (21:58 -0600)] 
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)

5 years agobpo-41162: Clear audit hooks later during finalization (GH-21222)
Konge [Fri, 3 Jul 2020 21:06:46 +0000 (05:06 +0800)] 
bpo-41162: Clear audit hooks later during finalization (GH-21222)

5 years agobpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
tkmikan [Fri, 3 Jul 2020 20:56:30 +0000 (04:56 +0800)] 
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)

5 years agobpo-41194: Convert _ast extension to PEP 489 (GH-21293)
Victor Stinner [Fri, 3 Jul 2020 18:01:46 +0000 (20:01 +0200)] 
bpo-41194: Convert _ast extension to PEP 489 (GH-21293)

Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.

5 years agobpo-1635741: Port faulthandler module to multiphase initialization (GH-21294)
Dong-hee Na [Fri, 3 Jul 2020 16:36:47 +0000 (01:36 +0900)] 
bpo-1635741: Port faulthandler module to multiphase initialization (GH-21294)

5 years agobpo-1635741: Fix unicode_dealloc() for mortal interned string (GH-21270)
Victor Stinner [Fri, 3 Jul 2020 14:59:12 +0000 (16:59 +0200)] 
bpo-1635741: Fix unicode_dealloc() for mortal interned string (GH-21270)

When unicode_dealloc() is called on a mortal interned string, the
string reference counter is now reset at zero.

5 years agobpo-41194: The _ast module cannot be loaded more than once (GH-21290)
Victor Stinner [Fri, 3 Jul 2020 12:15:53 +0000 (14:15 +0200)] 
bpo-41194: The _ast module cannot be loaded more than once (GH-21290)

Fix a crash in the _ast module: it can no longer be loaded more than
once. It now uses a global state rather than a module state.

* Move _ast module state: use a global state instead.
* Set _astmodule.m_size to -1, so the extension cannot be loaded more
  than once.

5 years agobpo-41194: Pass module state in Python-ast.c (GH-21284)
Victor Stinner [Fri, 3 Jul 2020 09:35:37 +0000 (11:35 +0200)] 
bpo-41194: Pass module state in Python-ast.c (GH-21284)

Rework asdl_c.py to pass the module state to functions in
Python-ast.c, instead of using astmodulestate_global.

Handle also PyState_AddModule() failure in init_types().

5 years agobpo-1635741: Port sha256 module to multiphase init (PEP 489) (GH-21189)
Mohamed Koubaa [Fri, 3 Jul 2020 08:59:47 +0000 (03:59 -0500)] 
bpo-1635741: Port sha256 module to multiphase init (PEP 489) (GH-21189)

5 years agobpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattr...
scoder [Fri, 3 Jul 2020 00:09:28 +0000 (02:09 +0200)] 
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092)

Automerge-Triggered-By: @gvanrossum
5 years agoRemove extraneous file from the Docs folder (GH-21286)
Pablo Galindo [Thu, 2 Jul 2020 22:08:36 +0000 (23:08 +0100)] 
Remove extraneous file from the Docs folder (GH-21286)

5 years agobpo-41193: Ignore OSError in readline write_history() (GH-21279)
Victor Stinner [Thu, 2 Jul 2020 10:43:25 +0000 (12:43 +0200)] 
bpo-41193: Ignore OSError in readline write_history() (GH-21279)

The write_history() atexit function of the readline completer now
ignores any OSError to ignore error if the filesystem is read-only,
instead of only ignoring FileNotFoundError and PermissionError.

5 years agobpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks...
Rémi Lapeyre [Thu, 2 Jul 2020 03:41:21 +0000 (05:41 +0200)] 
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() (GH-20874)

5 years agobpo-1635741: Release Unicode interned strings at exit (GH-21269)
Victor Stinner [Wed, 1 Jul 2020 23:19:57 +0000 (01:19 +0200)] 
bpo-1635741: Release Unicode interned strings at exit (GH-21269)

* PyUnicode_InternInPlace() now ensures that interned strings are
  ready.
* Add _PyUnicode_ClearInterned().
* Py_Finalize() now releases Unicode interned strings:
  call _PyUnicode_ClearInterned().

5 years agobpo-40521: Cleanup finalize_interp_types() (GH-21265)
Victor Stinner [Wed, 1 Jul 2020 21:21:36 +0000 (23:21 +0200)] 
bpo-40521: Cleanup finalize_interp_types() (GH-21265)

Remove the now unused is_main_interp parameter of
finalize_interp_types().

5 years agobpo-39385: Add an assertNoLogs context manager to unittest.TestCase (GH-18067)
Kit Choi [Wed, 1 Jul 2020 21:08:38 +0000 (22:08 +0100)] 
bpo-39385: Add an assertNoLogs context manager to unittest.TestCase (GH-18067)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
5 years agobpo-41187: Convert the _msi module to Argument Clinic (GH-21264)
Serhiy Storchaka [Wed, 1 Jul 2020 18:53:07 +0000 (21:53 +0300)] 
bpo-41187: Convert the _msi module to Argument Clinic (GH-21264)

5 years agoAdd lysnikolaou to CODEOWNERS for the new parser (GH-21252)
Lysandros Nikolaou [Wed, 1 Jul 2020 09:47:35 +0000 (12:47 +0300)] 
Add lysnikolaou to CODEOWNERS for the new parser (GH-21252)

5 years agoDoc: Minor fix to init config C API documentation (GH-21198)
tomerv [Wed, 1 Jul 2020 09:32:54 +0000 (12:32 +0300)] 
Doc: Minor fix to init config C API documentation (GH-21198)

Co-authored-by: Tomer Vromen <tomer.vromen@intel.com>
5 years agobpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243)
Stefan Krah [Tue, 30 Jun 2020 18:58:57 +0000 (20:58 +0200)] 
bpo-41161 Add news entry for libmpdec-2.5.0  (GH-21243)

5 years agobpo-39314: Closes parenthesis when autocompleting for functions that take no argument...
Rémi Lapeyre [Tue, 30 Jun 2020 13:48:15 +0000 (15:48 +0200)] 
bpo-39314: Closes parenthesis when autocompleting for functions that take no arguments (GH-20562)