]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-42923: Add Py_FatalError() test in test_capi (GH-24240)
Victor Stinner [Mon, 18 Jan 2021 17:24:29 +0000 (18:24 +0100)] 
bpo-42923: Add Py_FatalError() test in test_capi (GH-24240)

Move faulthandler._fatal_error() to _testcapi.fatal_error().

4 years agobpo-42931: randbytes missing from random.__all__ (GH-24219)
Setrak Balian [Fri, 15 Jan 2021 17:50:42 +0000 (17:50 +0000)] 
bpo-42931: randbytes missing from random.__all__ (GH-24219)

4 years agobpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221)
Irit Katriel [Fri, 15 Jan 2021 15:59:44 +0000 (15:59 +0000)] 
bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221)

4 years agoMark instructions at end of class scope as artificial. (GH-24222)
Mark Shannon [Fri, 15 Jan 2021 13:52:00 +0000 (13:52 +0000)] 
Mark instructions at end of class scope as artificial. (GH-24222)

4 years agobpo-42877: add the 'compact' param to TracebackException's __init__ (#24179)
Irit Katriel [Fri, 15 Jan 2021 02:45:02 +0000 (02:45 +0000)] 
bpo-42877: add the 'compact' param to TracebackException's __init__ (#24179)

Use it to reduce the time and memory taken up by several of traceback's module-level functions.

4 years agobpo-42827: Fix crash on SyntaxError in multiline expressions (GH-24140)
Lysandros Nikolaou [Thu, 14 Jan 2021 21:36:30 +0000 (23:36 +0200)] 
bpo-42827: Fix crash on SyntaxError in multiline expressions (GH-24140)

When trying to extract the error line for the error message there
are two distinct cases:

1. The input comes from a file, which means that we can extract the
   error line by using `PyErr_ProgramTextObject` and which we already
   do.
2. The input does not come from a file, at which point we need to get
   the source code from the tokenizer:
   * If the tokenizer's current line number is the same with the line
     of the error, we get the line from `tok->buf` and we're ready.
   * Else, we can extract the error line from the source code in the
     following two ways:
     * If the input comes from a string we have all the input
       in `tok->str` and we can extract the error line from it.
     * If the input comes from stdin, i.e. the interactive prompt, we
       do not have access to the previous line. That's why a new
       field `tok->stdin_content` is added which holds the whole input for the
       current (multiline) statement or expression. We can then extract the
       error line from `tok->stdin_content` like we do in the string case above.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agoDocs: Remove stray semicolon in init.rst (GH-23974)
Ken Jin [Thu, 14 Jan 2021 15:57:08 +0000 (23:57 +0800)] 
Docs: Remove stray semicolon in init.rst (GH-23974)

Removed stray semicolon which was causing the docs to render weirdly (it's the function right under the one [here](https://docs.python.org/3/c-api/init.html#c._PyInterpreterState_GetEvalFrameFunc)).

4 years agobpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996)
Zackery Spytz [Thu, 14 Jan 2021 09:40:09 +0000 (02:40 -0700)] 
bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996)

4 years agobpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214)
Erlend Egeberg Aasland [Wed, 13 Jan 2021 23:17:33 +0000 (00:17 +0100)] 
bpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214)

4 years agobpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208)
Tobias Holl [Wed, 13 Jan 2021 16:16:40 +0000 (17:16 +0100)] 
bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208)

Before, using the * operator to repeat a bytearray would copy data from the start of
the internal buffer (ob_bytes) and not from the start of the actual data (ob_start).

4 years agoEliminate NOPs in extended blocks. (GH-24209)
Mark Shannon [Wed, 13 Jan 2021 15:05:04 +0000 (15:05 +0000)] 
Eliminate NOPs in extended blocks. (GH-24209)

4 years agobpo-42908: Mark cleanup code at end of try-except and with artificial (#24202)
Mark Shannon [Wed, 13 Jan 2021 12:05:43 +0000 (12:05 +0000)] 
bpo-42908: Mark cleanup code at end of try-except and with artificial (#24202)

* Mark bytecodes at end of try-except as artificial.

* Make sure that the CFG is consistent throughout optimiization.

* Extend line-number propagation logic so that implicit returns after 'try-except' or 'with' have the correct line numbers.

* Update importlib

4 years agobpo-1635741: Fix PyModule_AddObjectRef to use EXPORT_FUNC (GH-24205)
Dong-hee Na [Wed, 13 Jan 2021 10:15:40 +0000 (19:15 +0900)] 
bpo-1635741: Fix PyModule_AddObjectRef to use EXPORT_FUNC (GH-24205)

4 years agobpo-42901: [Enum] move member creation to `__set_name__` (GH-24196)
Ethan Furman [Wed, 13 Jan 2021 07:47:57 +0000 (23:47 -0800)] 
bpo-42901: [Enum] move member creation to `__set_name__` (GH-24196)

`type.__new__` calls `__set_name__` and `__init_subclass__`, which means
that any work metaclasses do after calling `super().__new__()` will not
be available to those two methods.  In particular, `Enum` classes that
want to make use of `__init_subclass__` will not see any members.

Almost all customization is therefore moved to before the
`type.__new__()` call, including changing all members to a proto member
descriptor with a `__set_name__` that will do the final conversion of a
member to be an instance of the `Enum` class.

4 years agobpo-37324: Remove ABC aliases from collections (GH-23754)
Hugo van Kemenade [Tue, 12 Jan 2021 23:16:37 +0000 (01:16 +0200)] 
bpo-37324: Remove ABC aliases from collections (GH-23754)

Remove deprecated aliases to Abstract Base Classes from the
collections module.

4 years agobpo-42848: remove recursion from TracebackException (GH-24158)
Irit Katriel [Tue, 12 Jan 2021 22:14:27 +0000 (22:14 +0000)] 
bpo-42848: remove recursion from TracebackException (GH-24158)

4 years agobpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200)
Paul Ganssle [Tue, 12 Jan 2021 18:17:52 +0000 (13:17 -0500)] 
bpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200)

According to [bpo-42874](), some versions of grep do not support the `-q` and `-E` options. Although both options are used elsewhere in the configure script, this particular bit of validation can be achieved without them,
so there's no real harm in using a grep call with no flags.

Would be good to get some people taking advantage of the `--with-tzpath` arguments in the wild to try this out.. Local testing seems to indicate that this does the same thing, but I don't know that we have any buildbots using this option. Maybe @pablogsal?

[bpo-42874]():

4 years agobpo-41994: Fix refcount issues in Python/import.c (GH-22632)
Serhiy Storchaka [Tue, 12 Jan 2021 14:43:32 +0000 (16:43 +0200)] 
bpo-41994: Fix refcount issues in Python/import.c (GH-22632)

https://bugs.python.org/issue41994

4 years agobpo-42882: Add test_embed.test_unicode_id_init() (GH-24198)
Victor Stinner [Tue, 12 Jan 2021 10:26:26 +0000 (11:26 +0100)] 
bpo-42882: Add test_embed.test_unicode_id_init() (GH-24198)

Test that _PyUnicode_FromId() works when Python is initialized
multiples times.

4 years agobpo-42882: _PyRuntimeState_Init() leaves unicode next_index unchanged (GH-24193)
Victor Stinner [Tue, 12 Jan 2021 09:29:45 +0000 (10:29 +0100)] 
bpo-42882: _PyRuntimeState_Init() leaves unicode next_index unchanged (GH-24193)

Fix the _PyUnicode_FromId() function (_Py_IDENTIFIER(var) API) when
Py_Initialize() / Py_Finalize() is called multiple times:
preserve _PyRuntime.unicode_ids.next_index value.

Use _PyRuntimeState_INIT macro instead memset(0) to reset
_PyRuntimeState members to zero.

4 years agobpo-42870: Document change in argparse help output. (GH-24190)
Tomáš Hrnčiar [Tue, 12 Jan 2021 00:41:35 +0000 (01:41 +0100)] 
bpo-42870: Document change in argparse help output. (GH-24190)

4 years agoFix various ParamSpec errors in typing (GH-24176)
Ken Jin [Mon, 11 Jan 2021 00:11:41 +0000 (08:11 +0800)] 
Fix various ParamSpec errors in typing (GH-24176)

1. ParamSpec -> TypeVar for ``typing.Concatenate``
2. ParamSpec's call signature should align with its documentation.
Noticed in GH-24169

4 years agobpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183)
Terry Jan Reedy [Sun, 10 Jan 2021 06:59:47 +0000 (01:59 -0500)] 
bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183)

If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.

4 years agobpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170)
Erlend Egeberg Aasland [Sat, 9 Jan 2021 11:25:55 +0000 (12:25 +0100)] 
bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170)

4 years agobpo-42802: Remove distutils bdist_wininst command (GH-24043)
Victor Stinner [Fri, 8 Jan 2021 23:35:01 +0000 (00:35 +0100)] 
bpo-42802: Remove distutils bdist_wininst command (GH-24043)

The distutils bdist_wininst command deprecated in Python 3.8 has been
removed. The distutils bidst_wheel command is now recommended to
distribute binary packages on Windows.

* Remove Lib/distutils/command/bdist_wininst.py
* Remove PC/bdist_wininst/ project
* Remove Lib/distutils/command/wininst-*.exe programs
* Remove all references to bdist_wininst

4 years agoFix a typo in docs for typing.Concatenate (#24169)
Johan Dahlin [Fri, 8 Jan 2021 18:08:21 +0000 (15:08 -0300)] 
Fix a typo in docs for typing.Concatenate (#24169)

Return param spec should be R, not T

4 years agobpo-42866: Add traverse func to _multibytecodec.MultibyteCodec (GH-24166)
Victor Stinner [Fri, 8 Jan 2021 14:43:59 +0000 (15:43 +0100)] 
bpo-42866: Add traverse func to _multibytecodec.MultibyteCodec (GH-24166)

Convert _multibytecodec.MultibyteCodec type to a GC type and adds a
traverse function.

4 years agobpo-42866: Fix refleak in CJK getcodec() (GH-24165)
Victor Stinner [Fri, 8 Jan 2021 14:01:38 +0000 (15:01 +0100)] 
bpo-42866: Fix refleak in CJK getcodec() (GH-24165)

Fix a reference leak in the getcodec() function of CJK codecs.

4 years agobpo-42846: Convert CJK codec extensions to multiphase init (GH-24157)
Victor Stinner [Thu, 7 Jan 2021 23:15:22 +0000 (00:15 +0100)] 
bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157)

Convert the 6 CJK codec extension modules (_codecs_cn, _codecs_hk,
_codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw) to the
multiphase initialization API (PEP 489).

Remove getmultibytecodec() local cache: always import
_multibytecodec. It should be uncommon to get a codec. For example,
this function is only called once per CJK codec module.

Fix a reference leak in register_maps() error path.

4 years agobpo-42860: Remove type error from grammar (GH-24156)
Lysandros Nikolaou [Thu, 7 Jan 2021 22:31:25 +0000 (00:31 +0200)] 
bpo-42860: Remove type error from grammar (GH-24156)

This is only there so that alternative implementations written in statically-typed languages can use this grammar without
having type errors in the way.

Automerge-Triggered-By: GH:lysnikolaou
4 years agobpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154)
Ethan Furman [Thu, 7 Jan 2021 21:17:55 +0000 (13:17 -0800)] 
bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154)

Solution to support calls to `__init_subclass__` with members defined is too brittle and breaks with certain mixins.

4 years agoUpdate frame.f_lineno before any call to the (C) tracing function. (GH-24150)
Mark Shannon [Thu, 7 Jan 2021 16:49:02 +0000 (16:49 +0000)] 
Update frame.f_lineno before any call to the (C) tracing function.  (GH-24150)

* Minimizes breakage of C extensions and ensures PyFrame_GetLineNumber is efficient.

4 years agobpo-42783: Documentation for asyncio.sleep(0) (#24002)
Simon Willison [Thu, 7 Jan 2021 02:03:18 +0000 (18:03 -0800)] 
bpo-42783: Documentation for asyncio.sleep(0) (#24002)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147)
Erlend Egeberg Aasland [Thu, 7 Jan 2021 00:36:35 +0000 (01:36 +0100)] 
bpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147)

Convert from ISO-8859-1 to UTF-8.

4 years agobpo-40823: Use loadTestsFromTestCase() iso. makeSuite() in sqlite3 tests (GH-20538)
Erlend Egeberg Aasland [Thu, 7 Jan 2021 00:05:07 +0000 (01:05 +0100)] 
bpo-40823: Use loadTestsFromTestCase() iso. makeSuite() in sqlite3 tests (GH-20538)

4 years agobpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096)
Hai Shi [Wed, 6 Jan 2021 19:47:19 +0000 (03:47 +0800)] 
bpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096)

4 years agobpo-41798: Allocate _socket module C API on the heap (GH-24126)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 19:43:06 +0000 (20:43 +0100)] 
bpo-41798: Allocate _socket module C API on the heap (GH-24126)

4 years agobpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH...
Yair Frid [Wed, 6 Jan 2021 17:42:10 +0000 (19:42 +0200)] 
bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100)

Automerge-Triggered-By: GH:brettcannon
4 years agobpo-41798: Allocate _decimal extension module C API on the heap (GH-24117)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 11:47:28 +0000 (12:47 +0100)] 
bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117)

4 years agobpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)
Antonio Cuni [Wed, 6 Jan 2021 11:38:26 +0000 (12:38 +0100)] 
bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)

I think that none of these API calls can fail, but only few of them are
documented as such. Add the sentence "This function always succeeds" (which is
the same already used e.g. by PyNumber_Check) to all of them.

4 years agobpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
Berker Peksag [Wed, 6 Jan 2021 02:14:42 +0000 (04:14 +0200)] 
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)

4 years agobpo-40959: Remove unused declarations from sqlite3 headers (GH-20828)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 00:56:05 +0000 (01:56 +0100)] 
bpo-40959: Remove unused declarations from sqlite3 headers (GH-20828)

4 years agobpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 00:36:04 +0000 (01:36 +0100)] 
bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)

4 years agobpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)
Vladimir [Wed, 6 Jan 2021 00:18:46 +0000 (16:18 -0800)] 
bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)

4 years agobpo-40810: Require SQLite 3.7.15 (GH-24106)
Erlend Egeberg Aasland [Wed, 6 Jan 2021 00:02:43 +0000 (01:02 +0100)] 
bpo-40810: Require SQLite 3.7.15 (GH-24106)

4 years agobpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)
Erlend Egeberg Aasland [Tue, 5 Jan 2021 23:57:25 +0000 (00:57 +0100)] 
bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)

4 years agobpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)
Erlend Egeberg Aasland [Tue, 5 Jan 2021 22:01:56 +0000 (23:01 +0100)] 
bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)

4 years agobpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)
Steve Dower [Tue, 5 Jan 2021 21:35:01 +0000 (21:35 +0000)] 
bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)

4 years agobpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099)
Mark Shannon [Tue, 5 Jan 2021 12:04:10 +0000 (12:04 +0000)] 
bpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099)

* Add test for frame.f_lineno with/without tracing.

* Make sure that frame.f_lineno is correct regardless of whether frame.f_trace is set.

* Update importlib

* Add NEWS

4 years agobpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
Cheryl Sabella [Tue, 5 Jan 2021 07:26:43 +0000 (02:26 -0500)] 
bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)

Make menu items work with formatter, add docstrings, add 100% tests.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-42681: Fix test_curses failures related to color pairs (GH-24089)
Serhiy Storchaka [Tue, 5 Jan 2021 07:13:15 +0000 (09:13 +0200)] 
bpo-42681: Fix test_curses failures related to color pairs (GH-24089)

On ncurses 6.1 pair numbers are limited by SHORT_MAX-1, even
with extended color support.

Improve error reporting and tests for color functions.

4 years agobpo-40636: Remove overly-strict zip pickling tests (GH-24109)
Brandt Bucher [Tue, 5 Jan 2021 07:05:29 +0000 (23:05 -0800)] 
bpo-40636: Remove overly-strict zip pickling tests (GH-24109)

4 years agoFix broken NEWS markup (GH-24110)
Brandt Bucher [Tue, 5 Jan 2021 06:55:14 +0000 (22:55 -0800)] 
Fix broken NEWS markup (GH-24110)

4 years agobpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)
Erlend Egeberg Aasland [Mon, 4 Jan 2021 23:16:43 +0000 (00:16 +0100)] 
bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)

Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.html#version_3_7_15):
_"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_

4 years agobpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095)
Erlend Egeberg Aasland [Mon, 4 Jan 2021 21:33:45 +0000 (22:33 +0100)] 
bpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095)

Convert the _multibytecodec extension module (CJK codecs) to multi-phase
initialization (PEP 489).

4 years agoPost 3.10.0a4
Pablo Galindo [Mon, 4 Jan 2021 21:17:03 +0000 (21:17 +0000)] 
Post 3.10.0a4

4 years agoMerge tag 'v3.10.0a4'
Pablo Galindo [Mon, 4 Jan 2021 21:16:13 +0000 (21:16 +0000)] 
Merge tag 'v3.10.0a4'

Python 3.10.0a4

4 years agoDo not remove x bit from published directories (GH-24101)
Steve Dower [Mon, 4 Jan 2021 20:56:32 +0000 (20:56 +0000)] 
Do not remove x bit from published directories (GH-24101)

4 years agobpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091)
Mark Shannon [Mon, 4 Jan 2021 18:06:55 +0000 (18:06 +0000)] 
bpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091)

* Mark jumps at end of if and try statements as artificial.

* Update importlib

* Add comment explaining the purpose of ADDOP_JUMP_NOLINE.

4 years agoPython 3.10.0a4 v3.10.0a4
Pablo Galindo [Mon, 4 Jan 2021 17:24:56 +0000 (17:24 +0000)] 
Python 3.10.0a4

4 years agoFix 'make suspicious' for the itertools module (GH-24097)
Pablo Galindo [Mon, 4 Jan 2021 17:24:22 +0000 (17:24 +0000)] 
Fix 'make suspicious' for the itertools module (GH-24097)

4 years agobpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222)
Mohamed Koubaa [Mon, 4 Jan 2021 14:34:26 +0000 (08:34 -0600)] 
bpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222)

4 years agoDelete the now unused c_do_not_emit_bytecode field. (#24094)
Mark Shannon [Mon, 4 Jan 2021 13:51:17 +0000 (13:51 +0000)] 
Delete the now unused c_do_not_emit_bytecode field. (#24094)

4 years agobpo-42692: fix __builtin_available check on older compilers (GH-23873)
Joshua Root [Mon, 4 Jan 2021 10:36:58 +0000 (21:36 +1100)] 
bpo-42692: fix __builtin_available check on older compilers (GH-23873)

A compiler that doesn't define `__has_builtin` will error out when it is
used on the same line as the check for it.

Automerge-Triggered-By: GH:ronaldoussoren
4 years agobpo-42789: Enable using /dev/tty in test_curses. (GH-24085)
Serhiy Storchaka [Mon, 4 Jan 2021 10:30:20 +0000 (12:30 +0200)] 
bpo-42789: Enable using /dev/tty in test_curses. (GH-24085)

It was temporary disabled for debugging.

4 years agoUpdate Sphinx version for macOS installer build. (GH-24082)
Ned Deily [Mon, 4 Jan 2021 09:43:53 +0000 (04:43 -0500)] 
Update Sphinx version for macOS installer build. (GH-24082)

4 years agobpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081)
Ned Deily [Mon, 4 Jan 2021 09:43:11 +0000 (04:43 -0500)] 
bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081)

As of 2021-01-03, Tcl/Tk 8.6.11rc2 is expected to be the final release.

4 years agobpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080)
Ned Deily [Mon, 4 Jan 2021 09:39:47 +0000 (04:39 -0500)] 
bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080)

4 years agobpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674)
Erlend Egeberg Aasland [Mon, 4 Jan 2021 04:48:19 +0000 (05:48 +0100)] 
bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674)

4 years agobpo-42681: Fix range checks for color and pair numbers in curses (GH-23874)
Serhiy Storchaka [Sun, 3 Jan 2021 20:51:11 +0000 (22:51 +0200)] 
bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874)

4 years agobpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)
Hai Shi [Sun, 3 Jan 2021 15:47:44 +0000 (23:47 +0800)] 
bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)

4 years agobpo-40077: Add traverse/clear/free to arraymodule (GH-24066)
Erlend Egeberg Aasland [Sun, 3 Jan 2021 13:11:15 +0000 (14:11 +0100)] 
bpo-40077: Add traverse/clear/free to arraymodule (GH-24066)

4 years agobpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919)
Zackery Spytz [Sun, 3 Jan 2021 12:35:26 +0000 (05:35 -0700)] 
bpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919)

4 years agobpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073)
Zackery Spytz [Sun, 3 Jan 2021 12:18:25 +0000 (05:18 -0700)] 
bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073)

In is_typing_name(), va_end() is not always called before the
function returns.  It is undefined behavior to call va_start()
without also calling va_end().

4 years agobpo-42093: Tweak the what's new message about the new LOAD_ATTR opcode cache (GH...
Pablo Galindo [Sun, 3 Jan 2021 04:37:46 +0000 (04:37 +0000)] 
bpo-42093: Tweak the what's new message about the new LOAD_ATTR opcode cache (GH-24070)

4 years agobpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067)
Pablo Galindo [Sun, 3 Jan 2021 01:11:41 +0000 (01:11 +0000)] 
bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067)

4 years agobpo-40631: Disallow single parenthesized star target (GH-24027)
Lysandros Nikolaou [Sat, 2 Jan 2021 23:14:21 +0000 (01:14 +0200)] 
bpo-40631: Disallow single parenthesized star target (GH-24027)

4 years agoNo need to test "istep==1" twice. (GH-24064)
Raymond Hettinger [Sat, 2 Jan 2021 20:09:56 +0000 (12:09 -0800)] 
No need to test "istep==1" twice. (GH-24064)

4 years agobpo-42772: Step argument ignored when stop is None. (GH-24018)
Raymond Hettinger [Sat, 2 Jan 2021 18:24:51 +0000 (10:24 -0800)] 
bpo-42772: Step argument ignored when stop is None. (GH-24018)

4 years agobpo-42789: Don't skip curses tests on non-tty. (GH-24009)
Serhiy Storchaka [Sat, 2 Jan 2021 17:35:15 +0000 (19:35 +0200)] 
bpo-42789: Don't skip curses tests on non-tty. (GH-24009)

If __stdout__ is not attached to terminal, try to use __stderr__
if it is attached to terminal, or open the terminal device, or
use regular file as terminal, but some functions will be untested
in the latter case.

4 years agobpo-42809: Improve pickle tests for recursive data. (GH-24060)
Serhiy Storchaka [Sat, 2 Jan 2021 17:32:47 +0000 (19:32 +0200)] 
bpo-42809: Improve pickle tests for recursive data. (GH-24060)

4 years agobpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124)
Erlend Egeberg Aasland [Sat, 2 Jan 2021 16:38:47 +0000 (17:38 +0100)] 
bpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124)

4 years agobpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union...
Ken Jin [Sat, 2 Jan 2021 16:19:15 +0000 (00:19 +0800)] 
bpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union (GH-24059)

Previously this didn't raise an error. Now it will:
```python
from collections.abc import Callable
isinstance(int, list | Callable[..., str])
```
Also added tests in Union since there were previously none for stuff like ``isinstance(list, list | list[int])`` either.

Backport to 3.9 not required.

Automerge-Triggered-By: GH:gvanrossum
4 years agohandle empty string in variable executable in platform.libc_ver() (#23140)
Kurochan [Sat, 2 Jan 2021 16:03:53 +0000 (01:03 +0900)] 
handle empty string in variable executable in platform.libc_ver() (#23140)

4 years agobpo-41559: Documentation for PEP 612 (GH-24000)
Ken Jin [Sat, 2 Jan 2021 00:45:50 +0000 (08:45 +0800)] 
bpo-41559: Documentation for PEP 612 (GH-24000)

4 years agobpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeo...
Ross [Fri, 1 Jan 2021 17:20:25 +0000 (17:20 +0000)] 
bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969)

4 years agoBring Python into the new year. (GH-24036)
Dong-hee Na [Fri, 1 Jan 2021 15:37:23 +0000 (00:37 +0900)] 
Bring Python into the new year. (GH-24036)

4 years agobpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)
Dong-hee Na [Fri, 1 Jan 2021 14:20:33 +0000 (23:20 +0900)] 
bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)

4 years agobpo-42781: Document the mechanics of cached_property from a user viewpoint (GH-24031)
Raymond Hettinger [Fri, 1 Jan 2021 01:05:58 +0000 (17:05 -0800)] 
bpo-42781: Document the mechanics of cached_property from a user viewpoint (GH-24031)

4 years agobpo-37193: Remove thread objects which finished process its request (GH-23127)
Jason R. Coombs [Thu, 31 Dec 2020 20:19:30 +0000 (15:19 -0500)] 
bpo-37193: Remove thread objects which finished process its request (GH-23127)

This reverts commit aca67da4fe68d5420401ac1782203d302875eb27.

4 years agoFixes a typo in importlib.metadata. (#23921)
Tao He [Thu, 31 Dec 2020 19:37:53 +0000 (03:37 +0800)] 
Fixes a typo in importlib.metadata. (#23921)

Signed-off-by: Tao He <sighingnow@gmail.com>
4 years agobpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor...
Jason R. Coombs [Thu, 31 Dec 2020 19:08:03 +0000 (14:08 -0500)] 
bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor) (#23010)

* Add test capturing missed expectation with uname_result._replace.

* bpo-42163: Override uname_result._make to allow uname_result._replace to work (for everything but 'processor'.

* Replace hard-coded length with one derived from the definition.

* Add test capturing missed expectation with copy/deepcopy on namedtuple (bpo-42189).

* bpo-42189: Exclude processor parameter when constructing uname_result.

* In _make, rely on __new__ to strip processor.

* Add blurb.

* iter is not necessary here.

* Rely on num_fields in __new__

* Add test for slices on uname

* Add test for copy and pickle.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* import pickle

* Fix equality test after pickling.

* Simply rely on __reduce__ for pickling.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-42382: In importlib.metadata, `EntryPoint` objects now expose `dist` (#23758)
Jason R. Coombs [Thu, 31 Dec 2020 17:56:43 +0000 (12:56 -0500)] 
bpo-42382: In importlib.metadata, `EntryPoint` objects now expose `dist` (#23758)

* bpo-42382: In importlib.metadata, `EntryPoint` objects now expose a `.dist` object referencing the `Distribution` when constructed from a `Distribution`.

Also, sync importlib_metadata 3.3:

- Add support for package discovery under package normalization rules.
- The object returned by `metadata()` now has a formally-defined protocol called `PackageMetadata` with declared support for the `.get_all()` method.

* Add blurb

* Remove latent footnote.

4 years agobpo-42393: Raise OverflowError iso. DeprecationWarning on overflow in socket.ntohs...
Erlend Egeberg Aasland [Thu, 31 Dec 2020 13:16:50 +0000 (14:16 +0100)] 
bpo-42393: Raise OverflowError iso. DeprecationWarning on overflow in socket.ntohs and socket.htons (GH-23980)

4 years agobpo-39068: Fix race condition in base64 (GH-17627)
Brandon Stansbury [Thu, 31 Dec 2020 09:44:46 +0000 (01:44 -0800)] 
bpo-39068: Fix race condition in base64 (GH-17627)

There was a race condition in base64 in lazy initialization of multiple globals.

4 years agoMinor improvements to the convolve() recipe (GH-24012)
Raymond Hettinger [Wed, 30 Dec 2020 20:51:19 +0000 (12:51 -0800)] 
Minor improvements to the convolve() recipe (GH-24012)

* Minor improvement to speed and space efficiency for the convolve() recipe
* Don't require convolve's kernel to be a sequence.

4 years agobpo-42773: fix tests not being run on pushes (GH-24004)
Filipe Laíns [Wed, 30 Dec 2020 14:53:58 +0000 (14:53 +0000)] 
bpo-42773: fix tests not being run on pushes (GH-24004)

There was a typo, we were checking if the "GITHUB_BASE_REF" string
literal was empty instead of the $GITHUB_BASE_REF value. When
$GITHUB_BASE_REF is empty, the action that triggered the run was not a
pull request, so we always run the full test suite.

Signed-off-by: Filipe Laíns <lains@riseup.net>
4 years agobpo-27640: Add --disable-test-modules configure option (GH-23886)
pxinwr [Wed, 30 Dec 2020 12:50:39 +0000 (20:50 +0800)] 
bpo-27640: Add --disable-test-modules configure option (GH-23886)

Added --disable-test-modules option to the configure script:
don't build nor install test modules.

Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin.

Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
4 years agobpo-27794: Add `name` attribute to `property` class (GH-23967)
Yurii Karabas [Wed, 30 Dec 2020 09:51:24 +0000 (11:51 +0200)] 
bpo-27794: Add `name` attribute to `property` class (GH-23967)

4 years agobpo-40137: Fix refleak in _functools_exec() (GH-24006)
Victor Stinner [Wed, 30 Dec 2020 01:24:43 +0000 (02:24 +0100)] 
bpo-40137: Fix refleak in _functools_exec() (GH-24006)