]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-41426 Fix grammar in curses.getmouse() documentation (GH-21677)
Sebastien Williams-Wynn [Wed, 29 Jul 2020 18:36:46 +0000 (19:36 +0100)] 
bpo-41426 Fix grammar in curses.getmouse() documentation (GH-21677)

Automerge-Triggered-By: @brettcannon
5 years agocloses bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569)
Benjamin Peterson [Wed, 29 Jul 2020 00:57:12 +0000 (17:57 -0700)] 
closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569)

This consolidates the handling of my_fgets return values, so that interrupts are always handled, even if they come after EOF.

 I believe PyOS_StdioReadline is still buggy in that I/O errors will not result in a proper Python exception being set. However, that is a separate issue.

5 years agoRemove incorrect mention of method.__class__ in descriptor docs (GH-21665)
Yonatan Goldschmidt [Tue, 28 Jul 2020 23:56:26 +0000 (02:56 +0300)] 
Remove incorrect mention of method.__class__ in descriptor docs (GH-21665)

5 years agoFix `List_Append` description, list is extracted at TOS1[-i] (GH-21465)
Xiang Zhang [Tue, 28 Jul 2020 16:51:33 +0000 (00:51 +0800)] 
Fix `List_Append` description, list is extracted at TOS1[-i] (GH-21465)

5 years agobpo-41412 and bpo-40948: Windows installer updates (GH-21656)
Steve Dower [Tue, 28 Jul 2020 15:35:46 +0000 (16:35 +0100)] 
bpo-41412 and bpo-40948: Windows installer updates (GH-21656)

Prevent installation on Windows 8 and earlier.
Download UCRT on demand when required (non-updated Windows 8.1 only)
Add reference to py launcher to post-install message

5 years agobpo-41328: Replace mention of Hudson CI with Travis CI and AppVeyor (GH-21653)
Dmytro Litvinov [Tue, 28 Jul 2020 14:48:32 +0000 (17:48 +0300)] 
bpo-41328: Replace mention of Hudson CI with Travis CI and AppVeyor (GH-21653)

5 years agobpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation (GH-21587)
Zackery Spytz [Tue, 28 Jul 2020 08:41:57 +0000 (02:41 -0600)] 
bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation (GH-21587)

Co-Authored-By: Baptiste Darthenay <baptiste.darthenay@gmail.com>
5 years agoValidate the AST produced by the parser in debug mode (GH-21643)
Pablo Galindo [Mon, 27 Jul 2020 22:46:59 +0000 (23:46 +0100)] 
Validate the AST produced by the parser in debug mode (GH-21643)

This will improve the debug experience if something fails in the produced AST. Previously, errors in the produced AST can be felt much later like in the garbage collector or the compiler, making debugging them much more difficult.

5 years agobpo-41045: Document debug feature of f-strings ('=') (GH-21509)
amaajemyfren [Mon, 27 Jul 2020 22:31:02 +0000 (01:31 +0300)] 
bpo-41045: Document debug feature of f-strings ('=') (GH-21509)

Co-Authored-By: Rishi <rishi93dev@gmail.com>
Automerge-Triggered-By: @gvanrossum
5 years agobpo-40939: Remove even more references to the old parser (GH-21642)
Lysandros Nikolaou [Mon, 27 Jul 2020 19:52:59 +0000 (21:52 +0200)] 
bpo-40939: Remove even more references to the old parser (GH-21642)

Automerge-Triggered-By: @lysnikolaou
5 years agobpo-40939: Use the new grammar for the grammar specification documentation (GH-19969)
Pablo Galindo [Mon, 27 Jul 2020 18:20:36 +0000 (19:20 +0100)] 
bpo-40939: Use the new grammar for the grammar specification documentation (GH-19969)

(We censor the heck out of actions and some other stuff using a custom "highlighter".)

Co-authored-by: Guido van Rossum <guido@python.org>
5 years agobpo-41401: Fix test_fspath_support in test_io. (GH-21640)
Serhiy Storchaka [Mon, 27 Jul 2020 17:58:35 +0000 (20:58 +0300)] 
bpo-41401: Fix test_fspath_support in test_io. (GH-21640)

The error is exposed on non-UTF-8 locales.

5 years agobpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447)
pxinwr [Mon, 27 Jul 2020 06:17:47 +0000 (14:17 +0800)] 
bpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447)

5 years agobpo-41340: Removed fallback implementation for strdup (GH-21634)
wasiher [Mon, 27 Jul 2020 03:28:45 +0000 (12:28 +0900)] 
bpo-41340: Removed fallback implementation for strdup (GH-21634)

5 years agobpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)
Akuli [Mon, 27 Jul 2020 01:48:17 +0000 (04:48 +0300)] 
bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)

... when an unknown option is passed.  TypeError was being raised because a 2to3 fix was missing.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years ago Fix atexitmodule doc (GH-21456)
linchiwei123 [Sun, 26 Jul 2020 23:33:00 +0000 (07:33 +0800)] 
 Fix atexitmodule doc (GH-21456)

5 years agoDelete remaining references to Grammar/Grammar from docs (#21624)
Guido van Rossum [Sun, 26 Jul 2020 15:27:52 +0000 (08:27 -0700)] 
Delete remaining references to Grammar/Grammar from docs (#21624)

(Ironically, the file itself remains, see https://github.com/we-like-parsers/cpython/issues/135.)

5 years agobpo-41385: Fix test_executable_without_cwd on Windows (GH-21608)
Serhiy Storchaka [Sun, 26 Jul 2020 07:21:39 +0000 (10:21 +0300)] 
bpo-41385: Fix test_executable_without_cwd on Windows (GH-21608)

5 years agobpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) (#18851)
Shankar Jha [Sat, 25 Jul 2020 23:33:48 +0000 (05:03 +0530)] 
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) (#18851)

5 years agobpo-41314: fixed annotations __future__ version (GH-21616)
YoSTEALTH [Sat, 25 Jul 2020 21:42:49 +0000 (15:42 -0600)] 
bpo-41314: fixed annotations __future__ version (GH-21616)

PEP 563 was updated to change the release where `from __future__ import annotations` becomes the default (and only) behavior from 4.0 to 3.10. Update `__future__.py` and its docs to reflect this.

5 years agobpo-38731: Add --quiet option to py_compile CLI (GH-17134)
Gregory Schevchenko [Sat, 25 Jul 2020 19:58:45 +0000 (22:58 +0300)] 
bpo-38731: Add --quiet option to py_compile CLI (GH-17134)

5 years agobpo-37309: NEWS for #41373 (GH-21612)
Terry Jan Reedy [Sat, 25 Jul 2020 04:30:57 +0000 (00:30 -0400)] 
bpo-37309: NEWS for #41373 (GH-21612)

5 years agobpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines (GH-21597)
Serhiy Storchaka [Sat, 25 Jul 2020 03:21:30 +0000 (06:21 +0300)] 
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines (GH-21597)

Fixes regression in 3.8.4 and 3.9.0b4.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (#21595)
Alex Grönholm [Thu, 23 Jul 2020 19:45:08 +0000 (22:45 +0300)] 
bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (#21595)

5 years agobpo-41366: Fix clang warning for sign conversion (GH-21592)
Henry Schreiner [Thu, 23 Jul 2020 08:39:03 +0000 (04:39 -0400)] 
bpo-41366: Fix clang warning for sign conversion (GH-21592)

5 years agobpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
Zackery Spytz [Thu, 23 Jul 2020 06:06:26 +0000 (00:06 -0600)] 
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)

Also one in news log.

5 years agobpo-41182 selector: use DefaultSelector based upon implementation (GH-21257)
Abhijeet Kasurde [Thu, 23 Jul 2020 03:13:37 +0000 (08:43 +0530)] 
bpo-41182 selector: use DefaultSelector based upon implementation (GH-21257)

On some platform such as VMware ESXi, DefaultSelector fails
to detect selector due to default value.
This fix adds a check and uses the correct selector depending upon
select implementation and actual call.

Fixes: [bpo-41182]()
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years agoStick with the phrase "default parameter value" (GH-21590)
Andre Delfino [Wed, 22 Jul 2020 23:58:19 +0000 (20:58 -0300)] 
Stick with the phrase "default parameter value" (GH-21590)

5 years agobpo-41369 Update to libmpdec-2.5.1: new features (GH-21593)
Stefan Krah [Wed, 22 Jul 2020 19:54:42 +0000 (21:54 +0200)] 
bpo-41369 Update to libmpdec-2.5.1: new features (GH-21593)

5 years agobpo-41341: Recursive evaluation of ForwardRef in get_type_hints (#21553)
wyfo [Wed, 22 Jul 2020 19:47:28 +0000 (21:47 +0200)] 
bpo-41341: Recursive evaluation of ForwardRef in get_type_hints (#21553)

The issue raised by recursive evaluation is infinite recursion with
recursive types. In that case, only the first recursive ForwardRef is
evaluated.

5 years agobpo-41364: Reduce import overhead of uuid module (GH-21586)
Steve Dower [Tue, 21 Jul 2020 23:15:47 +0000 (00:15 +0100)] 
bpo-41364: Reduce import overhead of uuid module (GH-21586)

5 years agobpo-41283: Fix mismatched argument name for imghdr.what (GH-21501)
Ammar Askar [Tue, 21 Jul 2020 00:22:01 +0000 (17:22 -0700)] 
bpo-41283: Fix mismatched argument name for imghdr.what (GH-21501)

5 years agobpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)
Steve Dower [Mon, 20 Jul 2020 23:09:41 +0000 (00:09 +0100)] 
bpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)

5 years agobpo-41342: Convert int.__round__ to Argument Clinic (GH-21549)
Serhiy Storchaka [Mon, 20 Jul 2020 12:57:37 +0000 (15:57 +0300)] 
bpo-41342: Convert int.__round__ to Argument Clinic (GH-21549)

5 years agobpo-41334: Convert constructors of str, bytes and bytearray to Argument Clinic (GH...
Serhiy Storchaka [Mon, 20 Jul 2020 12:53:55 +0000 (15:53 +0300)] 
bpo-41334: Convert constructors of str, bytes and bytearray to Argument Clinic (GH-21535)

5 years agobpo-41343: Convert methods of complex to Argument Clinic (GH-21550)
Dong-hee Na [Mon, 20 Jul 2020 12:53:29 +0000 (21:53 +0900)] 
bpo-41343: Convert methods of complex to Argument Clinic (GH-21550)

5 years agobpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)
Zackery Spytz [Mon, 20 Jul 2020 12:51:26 +0000 (06:51 -0600)] 
bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)

Do not call PyObject_CallMethod() with a live exception (like
KeyboardInterrupt).

5 years agoSimple Documentation fix: Missing link to return type class. (GH-21291)
Volker-Weissmann [Mon, 20 Jul 2020 11:26:32 +0000 (13:26 +0200)] 
Simple Documentation fix: Missing link to return type class. (GH-21291)

Just a simple documentation fix: apply_async and map_async return a "multiprocessing.pool.AsyncResult Object", not a "result object".

5 years agobpo-37703: improve asyncio.gather documentation regarding cancellation (GH-15312)
Vinay Sharma [Mon, 20 Jul 2020 08:42:57 +0000 (14:12 +0530)] 
bpo-37703: improve asyncio.gather documentation regarding cancellation (GH-15312)

These changes updates the doc to comprehensively mention the behaviour of gather.cancel()

Automerge-Triggered-By: @asvetlov
5 years agoDoc: fix import of asdl.py when called from outside Doc/. (GH-21529)
Julien Palard [Mon, 20 Jul 2020 07:48:40 +0000 (09:48 +0200)] 
Doc: fix import of asdl.py when called from outside Doc/. (GH-21529)

5 years agobpo-40741: Update macOS installer to use SQLite 3.32.3 (GH-20979)
Erlend Egeberg Aasland [Mon, 20 Jul 2020 06:19:18 +0000 (08:19 +0200)] 
bpo-40741: Update macOS installer to use SQLite 3.32.3 (GH-20979)

5 years agobpo-41338: Fix DeprecationWarning in tests (GH-21542)
Inada Naoki [Mon, 20 Jul 2020 03:02:50 +0000 (12:02 +0900)] 
bpo-41338: Fix DeprecationWarning in tests (GH-21542)

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>