]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-40878: xlc cannot handle C99 extern inline. (GH-21887)
Stefan Krah [Sat, 15 Aug 2020 14:06:21 +0000 (16:06 +0200)] 
bpo-40878: xlc cannot handle C99 extern inline. (GH-21887)

This applies to the default "extc99" mode.  Python does not compile with "stdc99".

5 years agoFix typo in typing doc (GH-21879)
Irit Katriel [Fri, 14 Aug 2020 23:01:36 +0000 (00:01 +0100)] 
Fix typo in typing doc (GH-21879)

Automerge-Triggered-By: @gvanrossum
5 years agobpo-40204: Fix reference to terms in the doc (GH-21865)
Victor Stinner [Fri, 14 Aug 2020 10:20:05 +0000 (12:20 +0200)] 
bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

5 years agobpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965)
Paul Ganssle [Fri, 14 Aug 2020 02:38:30 +0000 (22:38 -0400)] 
bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965)

Prior to this change, attempting to subclass the C implementation of
zoneinfo.ZoneInfo gave the following error:

    TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument

https://bugs.python.org/issue41025

5 years agobpo-41410: Fix outdated info in mkstemp docs (GH-21701)
Rishav Kundu [Fri, 14 Aug 2020 01:33:14 +0000 (07:03 +0530)] 
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)

Automerge-Triggered-By: @ericvsmith
5 years agobpo-41526: Fixed layout of final page of the installer (GH-21871)
Steve Dower [Thu, 13 Aug 2020 23:35:52 +0000 (00:35 +0100)] 
bpo-41526: Fixed layout of final page of the installer (GH-21871)

5 years agoFixed comment about pathlib.link_to: it was added in 3.8, not changed. (#21851)
Facundo Batista [Thu, 13 Aug 2020 20:33:56 +0000 (17:33 -0300)] 
Fixed comment about pathlib.link_to: it was added in 3.8, not changed. (#21851)

5 years agobpo-40204, doc: Fix syntax of C variables (GH-21846)
Victor Stinner [Thu, 13 Aug 2020 20:11:50 +0000 (22:11 +0200)] 
bpo-40204, doc: Fix syntax of C variables (GH-21846)

For example, fix the following Sphinx 3 errors:

Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
  void \*obj
  -----^

Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
  PyObject*
  --------^

The modified documentation is compatible with Sphinx 2 and Sphinx 3.

5 years agobpo-41066: Update the comparison section for os vs pathlib (GH-21261)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Thu, 13 Aug 2020 19:52:04 +0000 (01:22 +0530)] 
bpo-41066: Update the comparison section for os vs pathlib (GH-21261)

5 years agobpo-40204: Add :noindex: in the documentation (GH-21859)
Victor Stinner [Thu, 13 Aug 2020 19:41:54 +0000 (21:41 +0200)] 
bpo-40204: Add :noindex: in the documentation (GH-21859)

Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.

For example, fix this Sphinx 3 issue:

Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them

5 years agobpo-41521: Replace denylist with blocklist is http.cookiejar doc (GH-21826)
Victor Stinner [Thu, 13 Aug 2020 17:20:28 +0000 (19:20 +0200)] 
bpo-41521: Replace denylist with blocklist is http.cookiejar doc (GH-21826)

The http.cookiejar module has is_blocked() and blocked_domains()
methods, so "blocklist" term sounds better than "denylist" in this
module.

Replace also denylisted with denied in test___all__.

5 years agobpo-41520: Fix second codeop regression (GH-21848)
Terry Jan Reedy [Thu, 13 Aug 2020 17:18:49 +0000 (13:18 -0400)] 
bpo-41520: Fix second codeop regression (GH-21848)

* bpo-41520: Fix second codeop repression

Fix the repression introduced by the initial regression fix.

5 years agobpo-40204: Fix duplicates in the documentation (GH-21857)
Victor Stinner [Thu, 13 Aug 2020 17:16:02 +0000 (19:16 +0200)] 
bpo-40204: Fix duplicates in the documentation (GH-21857)

Fix two Sphinx 3 issues:

Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.

Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.

5 years agobpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)
Victor Stinner [Thu, 13 Aug 2020 17:15:38 +0000 (19:15 +0200)] 
bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)

Use generic '.. object::' to declare markers, rather than abusing
'..  c:function::' which fails on Sphinx 3.

5 years agobpo-1635741: Port _winapi ext to multi-stage init (GH-21371)
Mohamed Koubaa [Thu, 13 Aug 2020 14:22:48 +0000 (09:22 -0500)] 
bpo-1635741: Port _winapi ext to multi-stage init (GH-21371)

5 years agobpo-41531: Fix compilation of dict literals with more than 0xFFFF elements (GH-21850)
Pablo Galindo [Thu, 13 Aug 2020 08:48:41 +0000 (09:48 +0100)] 
bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements (GH-21850)

5 years agobpo-1635741: Clean sysdict and builtins of interpreter at exit (GH-21605)
Hai Shi [Wed, 12 Aug 2020 21:23:30 +0000 (05:23 +0800)] 
bpo-1635741: Clean sysdict and builtins of interpreter at exit (GH-21605)

5 years agobpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)
Victor Stinner [Wed, 12 Aug 2020 19:49:22 +0000 (21:49 +0200)] 
bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)

Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.

5 years agoCatch all skip_handler cases (GH-21842)
Stefan Krah [Wed, 12 Aug 2020 14:00:05 +0000 (16:00 +0200)] 
Catch all skip_handler cases (GH-21842)

5 years agobpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
Victor Stinner [Wed, 12 Aug 2020 12:53:28 +0000 (14:53 +0200)] 
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)

5 years agobpo-41521, typing: Rename _PROTO_WHITELIST to _PROTO_ALLOWLIST (#21825)
Victor Stinner [Wed, 12 Aug 2020 08:53:12 +0000 (10:53 +0200)] 
bpo-41521, typing: Rename _PROTO_WHITELIST to _PROTO_ALLOWLIST (#21825)

5 years agoFix typo (GH-21820)
Christopher Yeh [Tue, 11 Aug 2020 22:27:08 +0000 (15:27 -0700)] 
Fix typo (GH-21820)

5 years agoCall randseed() before other imports in deccheck.py (GH-21834)
Stefan Krah [Tue, 11 Aug 2020 19:14:51 +0000 (21:14 +0200)] 
Call randseed() before other imports in deccheck.py (GH-21834)

5 years agobpo-41475: Fix note in "What's new in 3.7" (#21733)
Ram Rachum [Tue, 11 Aug 2020 16:33:25 +0000 (19:33 +0300)] 
bpo-41475: Fix note in "What's new in 3.7" (#21733)

5 years agoAdd PEP 573 additions to What's New (GH-21374)
Petr Viktorin [Tue, 11 Aug 2020 16:15:57 +0000 (18:15 +0200)] 
Add PEP 573 additions to What's New (GH-21374)

5 years agoAdd links to asttokens, leoAst, LibCST and parso to ast docs (GH-21773)
Edward K. Ream [Tue, 11 Aug 2020 14:07:49 +0000 (09:07 -0500)] 
Add links to asttokens, leoAst, LibCST and parso to ast docs (GH-21773)

5 years agobpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21823)
Victor Stinner [Tue, 11 Aug 2020 13:28:43 +0000 (15:28 +0200)] 
bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21823)

Rename 5 test method names in test_codecs and test_typing.

5 years agobpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)
Victor Stinner [Tue, 11 Aug 2020 13:26:59 +0000 (15:26 +0200)] 
bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)

Automerge-Triggered-By: @tiran
5 years agobpo-1635741: Port multiprocessing ext to multiphase init (GH-21378)
Mohamed Koubaa [Tue, 11 Aug 2020 10:32:35 +0000 (05:32 -0500)] 
bpo-1635741: Port multiprocessing ext to multiphase init (GH-21378)

Port the _multiprocessing extension module to multiphase initialization (PEP 489).

5 years agobpo-40275: Fix failed test cases by using test helpers (GH-21811)
Hai Shi [Mon, 10 Aug 2020 21:24:02 +0000 (05:24 +0800)] 
bpo-40275: Fix failed test cases by using test helpers (GH-21811)

5 years agoMSVC: The ARM command line should not define MASM. (#21817)
Stefan Krah [Mon, 10 Aug 2020 20:39:46 +0000 (22:39 +0200)] 
MSVC: The ARM command line should not define MASM. (#21817)

5 years agoReplace import_fresh_module in decimal test files (GH-21815)
Stefan Krah [Mon, 10 Aug 2020 19:54:50 +0000 (21:54 +0200)] 
Replace import_fresh_module in decimal test files (GH-21815)

5 years agobpo-40548: Fix "Check for source changes (pull_request)" GH Action job (GH-21806)
Victor Stinner [Mon, 10 Aug 2020 16:36:59 +0000 (18:36 +0200)] 
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job (GH-21806)

On Git 2.28, "git diff master..." (3 dots) no longer works when
"fetch --depth=1" is used, whereas it works on Git 2.26.

Replace "..." (3 dots) with ".." (2 dots) in the "git diff" command
computing the list of modified files between the base branch and the
PR branch.

5 years agobpo-16995: add support for base32 extended hex (base32hex) (GH-20441)
Filipe Laíns [Mon, 10 Aug 2020 14:48:20 +0000 (15:48 +0100)] 
bpo-16995: add support for base32 extended hex (base32hex) (GH-20441)

cc @pganssle

Automerge-Triggered-By: @pganssle
5 years agobpo-41324 Add a minimal decimal capsule API (#21519)
Stefan Krah [Mon, 10 Aug 2020 14:32:21 +0000 (16:32 +0200)] 
bpo-41324 Add a minimal decimal capsule API (#21519)

5 years agobpo-41514: Fix buggy IDLE test (GH-21808)
Terry Jan Reedy [Mon, 10 Aug 2020 13:43:56 +0000 (09:43 -0400)] 
bpo-41514: Fix buggy IDLE test (GH-21808)

test_run method test_fatal_error failed when run twice, as with
python -m test -m test_fatal_error test_idle test_idle
because func.called was not reinitialized to 0.
This bug caused a failure on a refleak buildbot.

5 years agobpo-41468: Improve and test IDLE run error exit (GH-21798)
Terry Jan Reedy [Sun, 9 Aug 2020 20:08:30 +0000 (16:08 -0400)] 
bpo-41468: Improve and test IDLE run error exit  (GH-21798)

A message box pops up when an unexpected error stops the run process.  Tell users it is likely a random glitch, but report it if not.

5 years agoImprove renamed test_run.RecursionLimitTest (GH-21794)
Terry Jan Reedy [Sun, 9 Aug 2020 17:08:19 +0000 (13:08 -0400)] 
Improve renamed test_run.RecursionLimitTest (GH-21794)

PEP 8 style and new comments.

5 years agobpo-35018: Sax parser should provide user access to lexical handlers (GH-20958)
Zackery Spytz [Sun, 9 Aug 2020 10:50:53 +0000 (04:50 -0600)] 
bpo-35018: Sax parser should provide user access to lexical handlers (GH-20958)

Co-Authored-By: Jonathan Gossage <jgossage@gmail.com>
5 years agoDoc: Add output to example code in programming FAQ (GH-21346)
Jiajie Zhong [Sat, 8 Aug 2020 19:29:03 +0000 (03:29 +0800)] 
Doc: Add output to example code in programming FAQ (GH-21346)

Add output hint to document, part faq/programming, section [How do I write a function with output parameters (call by reference)?](https://docs.python.org/3/faq/programming.html#how-do-i-write-a-function-with-output-parameters-call-by-reference).

This patch make the output hint just like prefix code block.

5 years agobpo-41455: Provide a link to how the third generation is collected in the GC docs...
Yaroslav Pankovych [Sat, 8 Aug 2020 18:48:21 +0000 (21:48 +0300)] 
bpo-41455: Provide a link to how the third generation is collected in the GC docs (GH-21703)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21785)
Hai Shi [Sat, 8 Aug 2020 11:05:24 +0000 (19:05 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21785)

5 years agobpo-40275: Remove test helpers aliases in test.support (GH-21771)
Hai Shi [Sat, 8 Aug 2020 09:32:41 +0000 (17:32 +0800)] 
bpo-40275: Remove test helpers aliases in test.support (GH-21771)

5 years agobpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
Konge [Sat, 8 Aug 2020 03:03:09 +0000 (11:03 +0800)] 
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)

5 years agoDoc: Add a link to tutorial page from `open()` doc (GH-21737)
Benjamin Kane [Sat, 8 Aug 2020 02:57:03 +0000 (19:57 -0700)] 
Doc: Add a link to tutorial page from `open()` doc (GH-21737)

Adds a link to the "Reading and Writing Files" page so users can
more easily discover how file handles are handled with the `with`
context manager vs without it.

5 years agoUpdate Azure Pipelines build to use Ubuntu 18.04 and move triggers into YAML files...
Steve Dower [Fri, 7 Aug 2020 22:22:02 +0000 (23:22 +0100)] 
Update Azure Pipelines build to use Ubuntu 18.04 and move triggers into YAML files (GH-21776)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21772)
Hai Shi [Fri, 7 Aug 2020 21:55:35 +0000 (05:55 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21772)

5 years agobpo-41473: Skip test_gdb with gdb 9.2 to work around gdb bug (GH-21768)
Victor Stinner [Fri, 7 Aug 2020 15:57:56 +0000 (17:57 +0200)] 
bpo-41473: Skip test_gdb with gdb 9.2 to work around gdb bug (GH-21768)

gdb 9.2 on Fedora Rawhide is not reliable, see:

* https://bugs.python.org/issue41473
* https://bugzilla.redhat.com/show_bug.cgi?id=1866884

5 years agobpo-41477: Make ctypes optional in test_genericalias (GH-21766)
Victor Stinner [Fri, 7 Aug 2020 15:56:42 +0000 (17:56 +0200)] 
bpo-41477: Make ctypes optional in test_genericalias (GH-21766)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21764)
Hai Shi [Fri, 7 Aug 2020 15:18:38 +0000 (23:18 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21764)

5 years agobpo-41098: Doc: Add missing deprecated directives (GH-21162)
Inada Naoki [Fri, 7 Aug 2020 07:31:53 +0000 (16:31 +0900)] 
bpo-41098: Doc: Add missing deprecated directives (GH-21162)

PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.

5 years agobpo-39871: Fix an error in a news entry (GH-21749)
Zackery Spytz [Fri, 7 Aug 2020 05:38:48 +0000 (23:38 -0600)] 
bpo-39871: Fix an error in a news entry (GH-21749)

5 years agobpo-41440: add os.cpu_count() support for VxWorks RTOS (GH-21685)
pxinwr [Fri, 7 Aug 2020 05:21:52 +0000 (13:21 +0800)] 
bpo-41440: add os.cpu_count() support for VxWorks RTOS (GH-21685)

5 years agobpo-41493: Refactoring dictresize (GH-21751)
Inada Naoki [Fri, 7 Aug 2020 05:08:55 +0000 (14:08 +0900)] 
bpo-41493: Refactoring dictresize (GH-21751)

Split newsize calculation into new function. dictresize() now accepts exact newsize.

5 years agobpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734)
Nathan M [Thu, 6 Aug 2020 22:09:40 +0000 (18:09 -0400)] 
bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734)

5 years agobpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754)
Steve Dower [Thu, 6 Aug 2020 16:36:22 +0000 (17:36 +0100)] 
bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21743)
Hai Shi [Thu, 6 Aug 2020 11:51:29 +0000 (19:51 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21743)

5 years agobpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736)
Eric L. Frederich [Wed, 5 Aug 2020 18:44:53 +0000 (14:44 -0400)] 
bpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736)

5 years agobpo-40989: Fix compiler warning in winreg.c (GH-21722)
Victor Stinner [Wed, 5 Aug 2020 14:23:10 +0000 (16:23 +0200)] 
bpo-40989: Fix compiler warning in winreg.c (GH-21722)

Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init().

5 years agobpo-40726: handle uninitalized end_lineno on ast.increment_lineno (GH-20312)
Batuhan Taskaya [Wed, 5 Aug 2020 13:32:32 +0000 (16:32 +0300)] 
bpo-40726: handle uninitalized end_lineno on ast.increment_lineno (GH-20312)

5 years agobpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)
Inada Naoki [Wed, 5 Aug 2020 01:48:51 +0000 (10:48 +0900)] 
bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)

See PEP 623 for detail.

5 years agobpo-41463: Generate information about jumps from 'opcode.py' rather than duplicating...
Mark Shannon [Tue, 4 Aug 2020 16:30:11 +0000 (17:30 +0100)] 
bpo-41463: Generate information about jumps from 'opcode.py' rather than duplicating it in 'compile.c' (GH-21714)

Generate information about jumps from 'opcode.py' rather than duplicate it in 'compile.c'

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21727)
Hai Shi [Tue, 4 Aug 2020 15:53:12 +0000 (23:53 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21727)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21452)
Hai Shi [Tue, 4 Aug 2020 15:51:43 +0000 (23:51 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21452)

5 years agobpo-36982: Add support for extended color functions in ncurses 6.1 (GH-17536)
Hans Petter Jansson [Tue, 4 Aug 2020 03:51:33 +0000 (22:51 -0500)] 
bpo-36982: Add support for extended color functions in ncurses 6.1 (GH-17536)

Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
5 years agobpo-41431: Optimize dict_merge for copy (GH-21674)
Inada Naoki [Tue, 4 Aug 2020 02:08:06 +0000 (11:08 +0900)] 
bpo-41431: Optimize dict_merge for copy (GH-21674)

5 years agobpo-41467: Fix asyncio recv_into() on Windows (GH-21720)
Victor Stinner [Tue, 4 Aug 2020 00:40:10 +0000 (02:40 +0200)] 
bpo-41467: Fix asyncio recv_into() on Windows (GH-21720)

On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').

5 years agobpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
Victor Stinner [Tue, 4 Aug 2020 00:38:16 +0000 (02:38 +0200)] 
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)

incr cannot be larger than INT_MAX: downcast to int explicitly.

5 years agobpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718)
Victor Stinner [Mon, 3 Aug 2020 20:51:23 +0000 (22:51 +0200)] 
bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718)

regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21448)
Hai Shi [Mon, 3 Aug 2020 16:49:18 +0000 (00:49 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21448)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21451)
Hai Shi [Mon, 3 Aug 2020 16:47:42 +0000 (00:47 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21451)

5 years agobpo-40275: Use new test.support helper submodules in tests (GH-21449)
Hai Shi [Mon, 3 Aug 2020 16:41:24 +0000 (00:41 +0800)] 
bpo-40275: Use new test.support helper submodules in tests (GH-21449)

5 years agoA (very) slight speed improvement for iterating over bytes (#21705)
Guido van Rossum [Mon, 3 Aug 2020 16:04:13 +0000 (09:04 -0700)] 
A (very) slight speed improvement for iterating over bytes (#21705)

My mentee @xvxvxvxvxv noticed that iterating over array.array is
slightly faster than iterating over bytes.  Looking at the source I
observed that arrayiter_next() calls `getitem(ao, it->index++)` wheras
striter_next() uses the idiom (paraphrased)

    item = PyLong_FromLong(seq->ob_sval[it->it_index]);
    if (item != NULL)
        ++it->it_next;
    return item;

I'm not 100% sure but I think that the second version has fewer
opportunity for the CPU to overlap the `index++` operation with the
rest of the code (which in both cases involves a call).  So here I am
optimistically incrementing the index -- if the PyLong_FromLong() call
fails, this will leave the iterator pointing at the next byte, but
honestly I doubt that anyone would seriously consider resuming use of
the iterator after that kind of failure (it would have to be a
MemoryError).  And the author of arrayiter_next() made the same
consideration (or never ever gave it a thought :-).

With this, a loop like

    for _ in b: pass

is now slightly *faster* than the same thing over an equivalent array,
rather than slightly *slower* (in both cases a few percent).

5 years agobpo-41425: Make tkinter doc example runnable (GH-21706)
Ankit Chandawala [Mon, 3 Aug 2020 04:03:48 +0000 (05:03 +0100)] 
bpo-41425: Make tkinter doc example runnable (GH-21706)

Co-authored-by: Ankit Chandawala <achandaw@amazon.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-41424: Remove extra words in Tkinter-Packer documentation (GH-21707)
Nathan M [Mon, 3 Aug 2020 02:13:03 +0000 (22:13 -0400)] 
bpo-41424: Remove extra words in Tkinter-Packer documentation (GH-21707)

5 years agobpo-40979: refactored typing.rst; (mostly) same content, new sub-sections and orderin...
Luciano Ramalho [Sun, 2 Aug 2020 22:32:36 +0000 (19:32 -0300)] 
bpo-40979: refactored typing.rst; (mostly) same content, new sub-sections and ordering (#21574)

Also added PEP 585 deprecation notes.

5 years agorandom module: Convert a "while 1" to "while True (GH-21700) 21730/head
Raymond Hettinger [Sun, 2 Aug 2020 19:03:32 +0000 (12:03 -0700)] 
random module: Convert a "while 1" to "while True (GH-21700)

5 years agobpo-41421: Algebraic simplification for random.paretovariate() (GH-21695)
Raymond Hettinger [Sat, 1 Aug 2020 08:18:26 +0000 (01:18 -0700)] 
bpo-41421: Algebraic simplification for random.paretovariate() (GH-21695)

5 years agobpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)
Karthikeyan Singaravelan [Fri, 31 Jul 2020 10:50:48 +0000 (16:20 +0530)] 
bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)

5 years agobpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517)
Mark Shannon [Thu, 30 Jul 2020 09:03:00 +0000 (10:03 +0100)] 
bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517)

* Move 'peephole' optimizations into compile.c and perform them directly on the CFG.

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.