]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-39674: Update collections ABC deprecation doc (GH-18747)
Victor Stinner [Tue, 3 Mar 2020 16:31:11 +0000 (17:31 +0100)] 
bpo-39674: Update collections ABC deprecation doc (GH-18747)

5 years agobpo-12915: Skip test_pkgutil.test_name_resolution() non-encodable filenames (GH-18720)
Michael Felt [Tue, 3 Mar 2020 10:11:11 +0000 (11:11 +0100)] 
bpo-12915: Skip test_pkgutil.test_name_resolution() non-encodable filenames (GH-18720)

When filesystem encoding cannot encode the Unicode string used for a filename
continue testing with the next example.

5 years agobpo-39778: Add clarification about tp_traverse and ownership (GH-18754)
Pablo Galindo [Tue, 3 Mar 2020 02:50:40 +0000 (02:50 +0000)] 
bpo-39778: Add clarification about tp_traverse and ownership (GH-18754)

Automerge-Triggered-By: @pablogsal
5 years agobpo-39802: Only expose set_escdelay and set_tabsize when curses extensions are activa...
Batuhan Taşkaya [Tue, 3 Mar 2020 02:00:10 +0000 (05:00 +0300)] 
bpo-39802: Only expose set_escdelay and set_tabsize when curses extensions are activated (GH-18705)

5 years agobpo-38091: Import deadlock detection causes deadlock (GH-17518)
Armin Rigo [Tue, 3 Mar 2020 01:37:25 +0000 (02:37 +0100)] 
bpo-38091: Import deadlock detection causes deadlock (GH-17518)

Automerge-Triggered-By: @brettcannon
5 years agobpo-38597: Never statically link extension initialization code on Windows (GH-18724)
Steve Dower [Tue, 3 Mar 2020 00:04:11 +0000 (00:04 +0000)] 
bpo-38597: Never statically link extension initialization code on Windows (GH-18724)

5 years agobpo-39778: Don't traverse weak-reference lists OrderedDict's tp_traverse and tp_clear...
Pablo Galindo [Mon, 2 Mar 2020 23:12:54 +0000 (23:12 +0000)] 
bpo-39778: Don't traverse weak-reference lists OrderedDict's tp_traverse and tp_clear (GH-18749)

Objects do not own weak references to them directly through the __weakref__ list so these
do not need to be traversed by the GC.

5 years ago bpo-39776: Lock ++interp->tstate_next_unique_id. (GH-18746) (#18746)
Stefan Krah [Mon, 2 Mar 2020 20:22:36 +0000 (21:22 +0100)] 
 bpo-39776: Lock ++interp->tstate_next_unique_id. (GH-18746) (#18746)

  - Threads created by PyGILState_Ensure() could have a duplicate tstate->id.

5 years agobpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750)
Serhiy Storchaka [Mon, 2 Mar 2020 20:05:08 +0000 (22:05 +0200)] 
bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750)

5 years agobpo-38870: Add docstring support to ast.unparse (GH-17760)
Batuhan Taşkaya [Mon, 2 Mar 2020 18:59:01 +0000 (21:59 +0300)] 
bpo-38870: Add docstring support to ast.unparse (GH-17760)

Allow ast.unparse to detect docstrings in functions, modules and classes and produce
nicely formatted unparsed output for said docstrings.

Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-39796: Fix _warnings module initialization (GH-18739)
Victor Stinner [Mon, 2 Mar 2020 14:02:18 +0000 (15:02 +0100)] 
bpo-39796: Fix _warnings module initialization (GH-18739)

* Add _PyWarnings_InitState() which only initializes the _warnings
  module state (tstate->interp->warnings) without creating a module
  object
* Py_InitializeFromConfig() now calls _PyWarnings_InitState() instead
  of _PyWarnings_Init()
* Rename also private functions of _warnings.c to avoid confusion
  between the public C API and the private C API.

5 years agobpo-39764: Make Task.get_stack accept ag_frame (#18669)
Lidi Zheng [Mon, 2 Mar 2020 12:45:54 +0000 (04:45 -0800)] 
bpo-39764: Make Task.get_stack accept ag_frame (#18669)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agobpo-38380: Update macOS & Windows builds to SQLite v3.31.1 (GH-18678)
Erlend Egeberg Aasland [Mon, 2 Mar 2020 12:25:10 +0000 (13:25 +0100)] 
bpo-38380: Update macOS & Windows builds to SQLite v3.31.1 (GH-18678)

Automerge-Triggered-By: @zooba
5 years agobpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684)
Inada Naoki [Mon, 2 Mar 2020 09:54:49 +0000 (18:54 +0900)] 
bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684)

5 years agoFix misleading statement about mixed-type numeric comparisons (GH-18615)
Mark Dickinson [Mon, 2 Mar 2020 08:57:27 +0000 (08:57 +0000)] 
Fix misleading statement about mixed-type numeric comparisons (GH-18615)

5 years agobpo-38913: Fix segfault in Py_BuildValue("(s#O)", ...) if entered with exception...
Serhiy Storchaka [Mon, 2 Mar 2020 06:42:39 +0000 (08:42 +0200)] 
bpo-38913: Fix segfault in Py_BuildValue("(s#O)", ...) if entered with exception raised. (GH-18656)

5 years agobpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666)
Chris A [Mon, 2 Mar 2020 06:39:50 +0000 (01:39 -0500)] 
bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666)

Open issue in the BPO indicated a desire to make the implementation of
codecs.open() at parity with io.open(), which implements a try/except to
assure file stream gets closed before an exception is raised.

5 years agobpo-39495: Remove default value from C impl of TreeBuilder.start (GH-18275)
Shantanu [Mon, 2 Mar 2020 06:33:24 +0000 (22:33 -0800)] 
bpo-39495: Remove default value from C impl of TreeBuilder.start (GH-18275)

5 years agobpo-39378: partial of PickleState struct should be traversed. (GH-18046)
Hai Shi [Mon, 2 Mar 2020 06:28:44 +0000 (14:28 +0800)] 
bpo-39378: partial of PickleState struct should be traversed. (GH-18046)

5 years agobpo-39199: Add descriptions of non-deprecated nodes to the AST module documentation...
Pablo Galindo [Mon, 2 Mar 2020 03:14:06 +0000 (03:14 +0000)] 
bpo-39199: Add descriptions of non-deprecated nodes to the AST module documentation (GH-17812)

Adapted from https://greentreesnakes.readthedocs.io

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
5 years agocloses bpo-39803: Remove unused str from _PyLong_FormatAdvancedWriter. (GH-18709)
Andy Lester [Sun, 1 Mar 2020 21:26:43 +0000 (15:26 -0600)] 
closes bpo-39803: Remove unused str from _PyLong_FormatAdvancedWriter. (GH-18709)

5 years agobpo-39815: add cached_property to all (GH-18726)
Hakan Çelik [Sun, 1 Mar 2020 21:01:34 +0000 (00:01 +0300)] 
bpo-39815: add cached_property to all (GH-18726)

Automerge-Triggered-By: @pablogsal
5 years agobpo-39678: refactor queue manager thread (GH-18551)
Thomas Moreau [Sun, 1 Mar 2020 20:49:14 +0000 (21:49 +0100)] 
bpo-39678: refactor queue manager thread (GH-18551)

5 years agobpo-38870: Implement a precedence algorithm in ast.unparse (GH-17377)
Batuhan Taşkaya [Sun, 1 Mar 2020 20:12:17 +0000 (23:12 +0300)] 
bpo-38870: Implement a precedence algorithm in ast.unparse (GH-17377)

Implement a simple precedence algorithm for ast.unparse in order to avoid redundant
parenthesis for nested structures in the final output.

5 years agobpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)
Batuhan Taşkaya [Sun, 1 Mar 2020 20:07:22 +0000 (23:07 +0300)] 
bpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)

5 years agobpo-38641: Add lib2to3 support for starred expressions in return/yield statements...
Vlad Emelianov [Sun, 1 Mar 2020 19:59:26 +0000 (20:59 +0100)] 
bpo-38641: Add lib2to3 support for starred expressions in return/yield statements (GH-16994)

5 years agoMention backports (GH-18715)
Stefan Krah [Sat, 29 Feb 2020 21:39:23 +0000 (22:39 +0100)] 
Mention backports (GH-18715)

5 years agobpo-39548: Fix handling of 'WWW-Authenticate' header for Digest Auth (GH-18338)
Stephen Balousek [Sat, 29 Feb 2020 20:31:58 +0000 (13:31 -0700)] 
bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest Auth (GH-18338)

* bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest authentication

 - The 'qop' value in the 'WWW-Authenticate' header is optional. The
   presence of 'qop' in the header should be checked before its value
   is parsed with 'split'.

Signed-off-by: Stephen Balousek <stephen@balousek.net>
* bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest authentication

 - Add NEWS item

Signed-off-by: Stephen Balousek <stephen@balousek.net>
* Update Misc/NEWS.d/next/Library/2020-02-06-05-33-52.bpo-39548.DF4FFe.rst

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agoCosmetic change to match the surrounding code. (#18704)
Stefan Krah [Sat, 29 Feb 2020 19:07:48 +0000 (20:07 +0100)] 
Cosmetic change to match the surrounding code. (#18704)

5 years agobpo-39794: Add --without-decimal-contextvar (#18702)
Stefan Krah [Sat, 29 Feb 2020 18:43:42 +0000 (19:43 +0100)] 
bpo-39794: Add --without-decimal-contextvar (#18702)

5 years agobpo-39667: Sync zipp 3.0 (GH-18540)
Jason R. Coombs [Sat, 29 Feb 2020 16:34:11 +0000 (10:34 -0600)] 
bpo-39667: Sync zipp 3.0 (GH-18540)

* bpo-39667: Improve pathlib.Path compatibility on zipfile.Path and correct performance degradation as found in zipp 3.0

* 📜🤖 Added by blurb_it.

* Update docs for new zipfile.Path.open

* Rely on dict, faster than OrderedDict.

* Syntax edits on docs

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agobpo-39379: Remove reference to sys.path[0] being absolute path in whatsnew (GH-18561)
Ananthakrishnan [Sat, 29 Feb 2020 12:25:22 +0000 (17:55 +0530)] 
bpo-39379: Remove reference to sys.path[0] being absolute path in whatsnew (GH-18561)

Remove reference to sys.path[0] being absolute path in whatsnew

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-37534: Allow adding Standalone Document Declaration when generating XML documents...
Henry Harutyunyan [Sat, 29 Feb 2020 08:22:19 +0000 (12:22 +0400)] 
bpo-37534: Allow adding Standalone Document Declaration when generating XML documents (GH-14912)

5 years agobpo-39769: Fix compileall ddir for subpkgs. (GH-18676)
Gregory P. Smith [Sat, 29 Feb 2020 01:28:37 +0000 (17:28 -0800)] 
bpo-39769: Fix compileall ddir for subpkgs. (GH-18676)

Fix compileall.compile_dir() ddir= behavior on sub-packages.

Fixes compileall.compile_dir's ddir parameter and compileall command
line flag `-d` to no longer write the wrong pathname to the generated
pyc file for submodules beneath the root of the directory tree being
compiled.  This fixes a regression introduced with Python 3.5.

Also marks the _new_ in 3.9 from PR #16012 parameters to compile_dir as keyword only (as that is the only way they will be used) and fixes an omission of them in one place from the docs.

5 years agobpo-39789: Update Windows release build machines to VS 2019 (GH-18695)
Steve Dower [Sat, 29 Feb 2020 00:21:46 +0000 (00:21 +0000)] 
bpo-39789: Update Windows release build machines to VS 2019 (GH-18695)

Also fixes some potential Nuget build issues.

5 years agobpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598)
Shantanu [Fri, 28 Feb 2020 23:25:36 +0000 (15:25 -0800)] 
bpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598)

5 years agobpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
Terry Jan Reedy [Fri, 28 Feb 2020 19:59:16 +0000 (14:59 -0500)] 
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)

5 years agobpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
Terry Jan Reedy [Fri, 28 Feb 2020 18:22:55 +0000 (13:22 -0500)] 
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)

Previously, the button-up part of selecting with a mouse was treated as a click
that meant 'jump' to this line, which modified the context and undid the selection

5 years agobpo-12915: Improve Unicode support for package names and attributes. (GH-18517)
Vinay Sajip [Fri, 28 Feb 2020 14:26:27 +0000 (14:26 +0000)] 
bpo-12915: Improve Unicode support for package names and attributes. (GH-18517)

5 years agoFuzz struct.unpack and catch RecursionError in re.compile (GH-18679)
Ammar Askar [Fri, 28 Feb 2020 07:05:02 +0000 (02:05 -0500)] 
Fuzz struct.unpack and catch RecursionError in re.compile (GH-18679)

5 years agocloses bpo-39721: Fix constness of members of tok_state struct. (GH-18600)
Andy Lester [Fri, 28 Feb 2020 02:44:52 +0000 (20:44 -0600)] 
closes bpo-39721: Fix constness of members of tok_state struct. (GH-18600)

The function PyTokenizer_FromUTF8 from Parser/tokenizer.c had a comment:

    /* XXX: constify members. */

This patch addresses that.

In the tok_state struct:
    * end and start were non-const but could be made const
    * str and input were const but should have been non-const

Changes to support this include:
    * decode_str() now returns a char * since it is allocated.
    * PyTokenizer_FromString() and PyTokenizer_FromUTF8() each creates a
        new char * for an allocate string instead of reusing the input
        const char *.
    * PyTokenizer_Get() and tok_get() now take const char ** arguments.
    * Various local vars are const or non-const accordingly.

I was able to remove five casts that cast away constness.

5 years agobpo-39704: Explicitly pass the path to codecov config (GH-18680)
Ammar Askar [Thu, 27 Feb 2020 23:08:30 +0000 (18:08 -0500)] 
bpo-39704: Explicitly pass the path to codecov config (GH-18680)

5 years agobpo-39609: set the thread_name_prefix for the default asyncio executor (GH-18458)
Markus Mohrhard [Thu, 27 Feb 2020 20:01:47 +0000 (04:01 +0800)] 
bpo-39609: set the thread_name_prefix for the default asyncio executor (GH-18458)

Just a small debugging improvement to identify the asyncio executor threads.

5 years agobpo-39087: Optimize PyUnicode_AsUTF8AndSize() (GH-18327)
Inada Naoki [Thu, 27 Feb 2020 04:48:59 +0000 (13:48 +0900)] 
bpo-39087: Optimize PyUnicode_AsUTF8AndSize() (GH-18327)

Avoid using temporary bytes object.

5 years agoSuppress the hang (#18457)
Andrew Svetlov [Wed, 26 Feb 2020 22:15:12 +0000 (00:15 +0200)] 
Suppress the hang (#18457)

5 years agobpo-36144: Document PEP 584 (GH-18659)
Brandt Bucher [Wed, 26 Feb 2020 20:01:48 +0000 (12:01 -0800)] 
bpo-36144: Document PEP 584 (GH-18659)

5 years agobpo-39699: Don't silence make on Azure and Github CIs (GH-18583)
Ammar Askar [Wed, 26 Feb 2020 19:21:41 +0000 (14:21 -0500)] 
bpo-39699: Don't silence make on Azure and Github CIs (GH-18583)

5 years agobpo-34788: Add support for scoped IPv6 addresses (GH-13772)
opavlyuk [Wed, 26 Feb 2020 14:33:57 +0000 (16:33 +0200)] 
bpo-34788: Add support for scoped IPv6 addresses (GH-13772)

Automerge-Triggered-By: @asvetlov
5 years agobpo-39737: Remove code repitition in list_richcompare (GH-18638)
sweeneyde [Wed, 26 Feb 2020 07:00:35 +0000 (02:00 -0500)] 
bpo-39737: Remove code repitition in list_richcompare (GH-18638)

I may speed up list comparison on some platforms.

5 years agoDoc: int -> int or Py_ssize_t (GH-18663)
Inada Naoki [Wed, 26 Feb 2020 06:04:39 +0000 (15:04 +0900)] 
Doc: int -> int or Py_ssize_t (GH-18663)

5 years agoPost 3.9.0a4
Łukasz Langa [Wed, 26 Feb 2020 00:31:04 +0000 (01:31 +0100)] 
Post 3.9.0a4

5 years agoMerge tag 'v3.9.0a4'
Łukasz Langa [Wed, 26 Feb 2020 00:30:02 +0000 (01:30 +0100)] 
Merge tag 'v3.9.0a4'

Python 3.9.0a4

5 years agoPython 3.9.0a4 v3.9.0a4
Łukasz Langa [Tue, 25 Feb 2020 12:21:47 +0000 (13:21 +0100)] 
Python 3.9.0a4

5 years agobpo-38403: Update nuspec file for deprecated field and git repository (GH-18657)
Steve Dower [Tue, 25 Feb 2020 20:07:00 +0000 (20:07 +0000)] 
bpo-38403: Update nuspec file for deprecated field and git repository (GH-18657)

5 years agobpo-36144: Dictionary Union (PEP 584) (#12088)
Brandt Bucher [Tue, 25 Feb 2020 03:47:34 +0000 (19:47 -0800)] 
bpo-36144: Dictionary Union (PEP 584) (#12088)

5 years agobpo-30566: Fix IndexError when using punycode codec (GH-18632)
Berker Peksag [Tue, 25 Feb 2020 03:19:03 +0000 (06:19 +0300)] 
bpo-30566: Fix IndexError when using punycode codec (GH-18632)

Trying to decode an invalid string with the punycode codec
shoud raise UnicodeError.

5 years agobpo-39128: Added algorithm description (GH-18624)
idomic [Mon, 24 Feb 2020 14:59:40 +0000 (09:59 -0500)] 
bpo-39128: Added algorithm description (GH-18624)

# [bpo-39128](https://bugs.python.org/issue39128): happy eyeballs description

# [3.9] 39128 - happy eyeballs description (GH-18624)
# [3.8] 39128 - happy eyeballs description (GH-18624)

https://bugs.python.org/issue39128

5 years agoAdd note to Mac installer ReadMe about macOS 10.15 Gatekeeper changes. (GH-18648)
Ned Deily [Mon, 24 Feb 2020 13:00:58 +0000 (08:00 -0500)] 
Add note to Mac installer ReadMe about macOS 10.15 Gatekeeper changes. (GH-18648)

5 years agoGive proper credit for figuring out and writing PEP-3118 tests. (#18644)
Stefan Krah [Mon, 24 Feb 2020 11:24:43 +0000 (12:24 +0100)] 
Give proper credit for figuring out and writing PEP-3118 tests. (#18644)

5 years agoGive proper credits for the memoryview implementation. (#18626)
Stefan Krah [Mon, 24 Feb 2020 10:15:26 +0000 (11:15 +0100)] 
Give proper credits for the memoryview implementation. (#18626)

5 years agocloses bpo-39736: const strings in Modules/_datetimemodule.c and Modules/_testbuffer...
Andy Lester [Mon, 24 Feb 2020 06:40:43 +0000 (00:40 -0600)] 
closes bpo-39736: const strings in Modules/_datetimemodule.c and Modules/_testbuffer.c (GH-18637)

5 years agobpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry (GH...
Daniel Hahler [Mon, 24 Feb 2020 03:14:53 +0000 (04:14 +0100)] 
bpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry (GH-18531)

Appears to be obsolete since 75bb54c3d8.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-39654: Update pyclbr doc to reflect additional information returned (GH-18528)
Hakan Çelik [Mon, 24 Feb 2020 02:00:40 +0000 (05:00 +0300)] 
bpo-39654: Update pyclbr doc to reflect additional information returned (GH-18528)

Full nested function and class info makes it a module browser.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-39681: Fix C pickle regression with minimal file-like objects (#18592)
Antoine Pitrou [Sun, 23 Feb 2020 22:33:53 +0000 (23:33 +0100)] 
bpo-39681: Fix C pickle regression with minimal file-like objects (#18592)

Fix a regression where the C pickle module wouldn't allow unpickling from a
file-like object that doesn't expose a readinto() method.

5 years agobpo-39576: Clarify the word size for the 32-bit build. (#18616)
Stefan Krah [Sun, 23 Feb 2020 13:36:54 +0000 (14:36 +0100)] 
bpo-39576: Clarify the word size for the 32-bit build. (#18616)

5 years agobpo-39648: Expand math.gcd() and math.lcm() to handle multiple arguments. (GH-18604)
Serhiy Storchaka [Sun, 23 Feb 2020 11:21:29 +0000 (13:21 +0200)] 
bpo-39648: Expand math.gcd() and math.lcm() to handle multiple arguments. (GH-18604)

* bpo-39648: Expand math.gcd() and math.lcm() to handle multiple arguments.

* Simplify fast path.

* Difine lcm() without arguments returning 1.

* Apply suggestions from code review

Co-Authored-By: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
5 years agobpo-17422: Language reference should specify restrictions on class namespace (#18559)
ananthan-123 [Sat, 22 Feb 2020 17:56:02 +0000 (23:26 +0530)] 
bpo-17422: Language reference should specify restrictions on class namespace (#18559)

The language reference now specifies restrictions on class namespaces.  Adapted from a patch by Ethan Furman.

5 years agobpo-39382: Avoid dangling object use in abstract_issubclass() (GH-18530)
Yonatan Goldschmidt [Sat, 22 Feb 2020 13:11:48 +0000 (15:11 +0200)] 
bpo-39382: Avoid dangling object use in abstract_issubclass() (GH-18530)

Hold reference of __bases__ tuple until tuple item is done with, because by
dropping the reference the item may be destroyed.

5 years agobpo-39576: docs: set context for decimal arbitrary precision arithmetic (#18594)
Stefan Krah [Fri, 21 Feb 2020 20:27:37 +0000 (21:27 +0100)] 
bpo-39576: docs: set context for decimal arbitrary precision arithmetic (#18594)

5 years agobpo-35950: Raise UnsupportedOperation in BufferedReader.truncate() (GH-18586)
Berker Peksag [Fri, 21 Feb 2020 17:57:26 +0000 (20:57 +0300)] 
bpo-35950: Raise UnsupportedOperation in BufferedReader.truncate() (GH-18586)

The truncate() method of io.BufferedReader() should raise
UnsupportedOperation when it is called on a read-only
io.BufferedReader() instance.

https://bugs.python.org/issue35950

Automerge-Triggered-By: @methane
5 years agofix(doc): set correct RST syntax for c:function (GH-18589)
Julien Danjou [Fri, 21 Feb 2020 10:47:41 +0000 (11:47 +0100)] 
fix(doc): set correct RST syntax for c:function (GH-18589)

The current content is not rendered since the syntax is not correct.

5 years agobpo-35727: Use exit code 0 on sys.exit() in multiprocessing.Process. (GH-11538)
Christopher Hunt [Fri, 21 Feb 2020 09:33:04 +0000 (17:33 +0800)] 
bpo-35727: Use exit code 0 on sys.exit() in multiprocessing.Process. (GH-11538)

5 years agoReuse identifier of PREDICT macros as PREDICT_ID (GH-17155)
Denis Chernikov [Fri, 21 Feb 2020 09:17:50 +0000 (12:17 +0300)] 
Reuse identifier of PREDICT macros as PREDICT_ID (GH-17155)

In function `_PyEval_EvalFrameDefault`, macros PREDICT and PREDICTED use the same identifier creation scheme, which may be shared between them, reducing code repetition, and do ensure that the same identifier is generated.

5 years agobpo-9495: avoid confusing chained exception in argparse test (GH-17120)
alclarks [Fri, 21 Feb 2020 08:48:36 +0000 (08:48 +0000)] 
bpo-9495: avoid confusing chained exception in argparse test (GH-17120)

5 years agobpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)
Pete Wicken [Fri, 21 Feb 2020 05:53:12 +0000 (05:53 +0000)] 
bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)

Make the definition of the width more explicit that it includes any
extra signs added by other options.

https://bugs.python.org/issue38657

Automerge-Triggered-By: @Mariatta
5 years agocloses bpo-39684: Combine two if/thens and squash uninit var warning. (GH-18565)
Andy Lester [Fri, 21 Feb 2020 04:51:47 +0000 (22:51 -0600)] 
closes bpo-39684: Combine two if/thens and squash uninit var warning. (GH-18565)

5 years agobpo-39576: Prevent memory error for overly optimistic precisions (GH-18581)
Stefan Krah [Fri, 21 Feb 2020 00:52:47 +0000 (01:52 +0100)] 
bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581)

5 years agobpo-39184: Fix incorrect return value (GH-18580)
Steve Dower [Thu, 20 Feb 2020 22:24:44 +0000 (22:24 +0000)] 
bpo-39184: Fix incorrect return value (GH-18580)

https://bugs.python.org/issue39184

Automerge-Triggered-By: @zooba
5 years agoUse the new recommended number of repetitions in the refleak tests. (#18569)
Stefan Krah [Thu, 20 Feb 2020 18:08:53 +0000 (19:08 +0100)] 
Use the new recommended number of repetitions in the refleak tests. (#18569)

5 years agoUpdate runall.bat to the latest Windows build system. (#18571)
Stefan Krah [Thu, 20 Feb 2020 18:07:31 +0000 (19:07 +0100)] 
Update runall.bat to the latest Windows build system. (#18571)

5 years agoValgrind no longer supports --db-attach=yes. (#18568)
Stefan Krah [Thu, 20 Feb 2020 13:39:14 +0000 (14:39 +0100)] 
Valgrind no longer supports --db-attach=yes. (#18568)

5 years agobpo-39479:Add math.lcm() function: Least Common Multiple (#18547)
ananthan-123 [Wed, 19 Feb 2020 18:21:37 +0000 (23:51 +0530)] 
bpo-39479:Add math.lcm() function: Least Common Multiple (#18547)

* Update math.rst

* Update math.rst

* updated whats new

* Update test_math.py

* Update mathmodule.c

* Update mathmodule.c.h

* Update ACKS

* 📜🤖 Added by blurb_it.

* Update 3.9.rst

* Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst

* Update math.rst

* Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst

* Update test_math.py

* Update ACKS

* Update mathmodule.c.h

* Update mathmodule.c

* Update mathmodule.c.h

* Update mathmodule.c.h

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agoRevert "bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed...
Victor Stinner [Wed, 19 Feb 2020 13:23:47 +0000 (14:23 +0100)] 
Revert "bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)" (GH-18553)

This reverts commit d83b6600b25487e4ebffd7949d0f478de9538875.

5 years agobpo-39572: Document ’total’ flag of TypedDict (GH-18554)
ananthan-123 [Wed, 19 Feb 2020 04:33:05 +0000 (10:03 +0530)] 
bpo-39572: Document ’total’ flag of TypedDict (GH-18554)

5 years agoInclude subsections in TOC for PDF version of docs. (GH-9629)
Cheryl Sabella [Tue, 18 Feb 2020 23:01:15 +0000 (18:01 -0500)] 
Include subsections in TOC for PDF version of docs. (GH-9629)

5 years agobpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in the collec...
Victor Stinner [Tue, 18 Feb 2020 15:28:53 +0000 (16:28 +0100)] 
bpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596)" (GH-18545)

This reverts commit ef092fe9905f61ca27889092ca1248a11aa74498.

Update collections __getattr__() and documentation to defer aliases
removal to Python 3.10.

5 years agobpo-37207: Use vectorcall for range() (GH-18464)
Petr Viktorin [Tue, 18 Feb 2020 15:13:17 +0000 (16:13 +0100)] 
bpo-37207: Use vectorcall for range() (GH-18464)

This continues the `range()` part of #13930. The complete pull request is stalled on discussions around dicts, but `range()` should not be controversial. (And I plan to open PRs for other parts if this is merged.)
On top of Mark's change, I unified `range_new` and `range_vectorcall`, which had a lot of duplicate code.

https://bugs.python.org/issue37207

5 years agobpo-36347: stop using RESTRICTED constants (GH-12684)
Jeroen Demeyer [Tue, 18 Feb 2020 13:14:46 +0000 (14:14 +0100)] 
bpo-36347: stop using RESTRICTED constants (GH-12684)

The constants `RESTRICTED` and `PY_WRITE_RESTRICTED` no longer have a meaning in Python 3. Therefore, CPython should not use them.

CC @matrixise

https://bugs.python.org/issue36347

5 years agobpo-1635741: Port _bz2 extension module to multiphase initialization(PEP 489) (GH...
Hai Shi [Tue, 18 Feb 2020 11:17:39 +0000 (19:17 +0800)] 
bpo-1635741: Port _bz2 extension module to multiphase initialization(PEP 489) (GH-18050)

https://bugs.python.org/issue1635741

5 years agobpo-39546: argparse: Honor allow_abbrev=False for specified prefix_chars (GH-18337)
Kyle Meyer [Tue, 18 Feb 2020 09:48:57 +0000 (04:48 -0500)] 
bpo-39546: argparse: Honor allow_abbrev=False for specified prefix_chars (GH-18337)

When `allow_abbrev` was first added, disabling the abbreviation of
long options broke the grouping of short flags ([bpo-26967](https://bugs.python.org/issue26967)).  As a fix,
b1e4d1b603 (contained in v3.8) ignores `allow_abbrev=False` for a
given argument string if the string does _not_ start with "--"
(i.e. it doesn't look like a long option).

This fix, however, doesn't take into account that long options can
start with alternative characters specified via `prefix_chars`,
introducing a regression: `allow_abbrev=False` has no effect on long
options that start with an alternative prefix character.

The most minimal fix would be to replace the "starts with --" check
with a "starts with two prefix_chars characters".  But
`_get_option_tuples` already distinguishes between long and short
options, so let's instead piggyback off of that check by moving the
`allow_abbrev` condition into `_get_option_tuples`.

https://bugs.python.org/issue39546

5 years agobpo-39663: IDLE: Add additional tests for pyparse (GH-18536)
Cheryl Sabella [Tue, 18 Feb 2020 02:47:52 +0000 (21:47 -0500)] 
bpo-39663: IDLE: Add additional tests for pyparse (GH-18536)

Test when find_good_parse_start should return 0.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-1635741: Port _abc extension to multiphase initialization (PEP 489) (GH-18030)
Hai Shi [Mon, 17 Feb 2020 13:50:35 +0000 (21:50 +0800)] 
bpo-1635741: Port _abc extension to multiphase initialization (PEP 489) (GH-18030)

5 years agobpo-1635741: Port _contextvars module to multiphase initialization (PEP 489) (GH...
Hai Shi [Mon, 17 Feb 2020 13:49:26 +0000 (21:49 +0800)] 
bpo-1635741: Port _contextvars module to multiphase initialization (PEP 489) (GH-18374)

5 years agobpo-39500: Fix compile warnings in unicodeobject.c (GH-18519)
Hai Shi [Mon, 17 Feb 2020 13:41:15 +0000 (21:41 +0800)] 
bpo-39500: Fix compile warnings in unicodeobject.c (GH-18519)

5 years agobpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)
Dong-hee Na [Mon, 17 Feb 2020 10:09:15 +0000 (19:09 +0900)] 
bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)

5 years agobpo-36465: Update doc of init_config.rst (GH-18520)
Hai Shi [Mon, 17 Feb 2020 09:18:19 +0000 (17:18 +0800)] 
bpo-36465: Update doc of init_config.rst (GH-18520)

5 years agobpo-1635741: Port _crypt extension module to multiphase initialization (PEP 489)...
Hai Shi [Mon, 17 Feb 2020 09:11:34 +0000 (17:11 +0800)] 
bpo-1635741: Port _crypt extension module to multiphase initialization (PEP 489) (GH-18404)

5 years agobpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)
idomic [Mon, 17 Feb 2020 09:05:11 +0000 (04:05 -0500)] 
bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)

* Hard reset + cherry piciking the changes.

* 📜🤖 Added by blurb_it.

* Added @vstinner News

* Update Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst

Co-Authored-By: Victor Stinner <vstinner@python.org>
* Hard reset to master

* Hard reset to master + latest changes

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-32892: Update the documentation for handling constants in AST. (GH-18514)
Serhiy Storchaka [Mon, 17 Feb 2020 09:03:00 +0000 (11:03 +0200)] 
bpo-32892: Update the documentation for handling constants in AST. (GH-18514)

5 years agobpo-37970: update and improve urlparse and urlsplit doc-strings (GH-16458)
idomic [Sun, 16 Feb 2020 19:17:58 +0000 (14:17 -0500)] 
bpo-37970: update and improve urlparse and urlsplit doc-strings (GH-16458)