]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-44024: Improve the TypeError message in getattr and hasattr (GH-25863)
Géry Ogam [Tue, 18 Jan 2022 20:46:26 +0000 (21:46 +0100)] 
bpo-44024: Improve the TypeError message in getattr and hasattr (GH-25863)

Use common error message for non-string attribute name in the builtin
functions getattr and hasattr.
The special check no longer needed since Python 3.0.

3 years agobpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047)
Thomas Klausner [Tue, 18 Jan 2022 20:38:35 +0000 (21:38 +0100)] 
bpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047)

This fixes hanging tests test_compileall,, test_multiprocessing_fork and test_concurrent_futures.

3 years agobpo-20823: Clarify copyreg.pickle() documentation (GH-30230)
Kumar Aditya [Tue, 18 Jan 2022 19:53:43 +0000 (01:23 +0530)] 
bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)

3 years agobpo-46425: Fix direct invocation of multiple test modules (GH-30666)
Nikita Sobolev [Tue, 18 Jan 2022 19:28:18 +0000 (22:28 +0300)] 
bpo-46425: Fix direct invocation of multiple test modules (GH-30666)

3 years agobpo-43869: Improve epoch docs (GH-25777)
Miguel Brito [Tue, 18 Jan 2022 15:55:16 +0000 (15:55 +0000)] 
bpo-43869: Improve epoch docs (GH-25777)

3 years agobpo-46028: Calculate base_executable by resolving symlinks in a venv (GH-30144)
Steve Dower [Tue, 18 Jan 2022 15:46:26 +0000 (15:46 +0000)] 
bpo-46028: Calculate base_executable by resolving symlinks in a venv (GH-30144)

3 years agobpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663)
Nikita Sobolev [Tue, 18 Jan 2022 14:43:51 +0000 (17:43 +0300)] 
bpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663)

3 years agobpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660)
Erlend Egeberg Aasland [Tue, 18 Jan 2022 12:37:02 +0000 (13:37 +0100)] 
bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660)

Provide some examples of URI parameters in sqlite connect().

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
3 years agobpo-46339: Include clarification on assert in 'get_error_line_from_tokenizer_buffers...
Pablo Galindo Salgado [Tue, 18 Jan 2022 11:13:00 +0000 (11:13 +0000)] 
bpo-46339: Include clarification on assert in 'get_error_line_from_tokenizer_buffers' (#30545)

3 years agobpo-42161: Hoist the _PyLong_GetOne() call out of the inner loop. (GH-30656)
Raymond Hettinger [Tue, 18 Jan 2022 08:02:35 +0000 (02:02 -0600)] 
bpo-42161: Hoist the _PyLong_GetOne() call out of the inner loop. (GH-30656)

3 years agobpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
Irit Katriel [Tue, 18 Jan 2022 07:05:16 +0000 (07:05 +0000)] 
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)

3 years agobpo-44934: Add optional feature AppendPath to Windows MSI installer (GH-27889)
bneuburg [Tue, 18 Jan 2022 00:18:44 +0000 (01:18 +0100)] 
bpo-44934: Add optional feature AppendPath to Windows MSI installer (GH-27889)

The option must be enabled from the command line

3 years agoRestore MSIX signing and ensure expired certificates are not selected (GH-30649)
Steve Dower [Mon, 17 Jan 2022 20:22:52 +0000 (20:22 +0000)] 
Restore MSIX signing and ensure expired certificates are not selected (GH-30649)

Reverts the change in d6c6e6b and applies a better fix.

3 years agobpo-46418: [Enum] simplify `MODULE` declaration in tests (GH-30647)
Nikita Sobolev [Mon, 17 Jan 2022 20:16:56 +0000 (23:16 +0300)] 
bpo-46418: [Enum] simplify `MODULE` declaration in tests (GH-30647)

3 years agoSkip signing side-loadable MSIX for Windows (GH-30644)
Steve Dower [Mon, 17 Jan 2022 18:05:16 +0000 (18:05 +0000)] 
Skip signing side-loadable MSIX for Windows (GH-30644)

We currently do not release these files, and so there's nothing lost by signing them.
Our code signing certificate is somehow incompatible with signing MSIX files. We may be able to re-enable this when we next renew, or if Microsoft updates their signing tool to work with our certificate.

3 years agobpo-46161: Fix bug in starunpack_helper in compile.c (GH-30235)
zq1997 [Mon, 17 Jan 2022 17:45:44 +0000 (01:45 +0800)] 
bpo-46161: Fix bug in starunpack_helper in compile.c (GH-30235)

3 years agobpo-40066: [Enum] fix tests (GH-30643)
Ethan Furman [Mon, 17 Jan 2022 16:52:42 +0000 (08:52 -0800)] 
bpo-40066: [Enum] fix tests (GH-30643)

- skip doctest that changes depending on target system
- skip doctest that only fails on CI
- substitute in values that change depending on target system

3 years agobpo-46405: fix msvc compiler warnings (GH-30627)
Kumar Aditya [Mon, 17 Jan 2022 16:30:10 +0000 (22:00 +0530)] 
bpo-46405: fix msvc compiler warnings (GH-30627)

3 years agobpo-40066: [Enum] skip failing doc test (GH-30637)
Kumar Aditya [Mon, 17 Jan 2022 15:18:13 +0000 (20:48 +0530)] 
bpo-40066: [Enum] skip failing doc test (GH-30637)

3 years agobpo-44133: Skip PyThread_get_thread_native_id() if not available (GH-30636)
Victor Stinner [Mon, 17 Jan 2022 13:49:20 +0000 (14:49 +0100)] 
bpo-44133: Skip PyThread_get_thread_native_id() if not available (GH-30636)

test_capi.test_export_symbols() doesn't check if Python exports the
"PyThread_get_thread_native_id" symbol if the _thread.get_native_id()
function is not available (if the PY_HAVE_THREAD_NATIVE_ID macro is
not defined).

3 years agobpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631)
Victor Stinner [Mon, 17 Jan 2022 13:00:50 +0000 (14:00 +0100)] 
bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631)

Skip test_builtin PTY tests on non-ASCII characters if the readline
module is loaded. The readline module changes input() behavior, but
test_builtin is not intented to test the readline module.

When the readline module is loaded, PyOS_Readline() uses the readline
implementation. In some cases, the Python readline callback
rlhandler() is called by readline with a string without non-ASCII
characters.

3 years agoRevert "bpo-40066: [Enum] update str() and format() output (GH-30582)" (GH-30632)
Victor Stinner [Mon, 17 Jan 2022 12:58:40 +0000 (13:58 +0100)] 
Revert "bpo-40066:  [Enum] update str() and format() output (GH-30582)" (GH-30632)

This reverts commit acf7403f9baea3ae1119fc6b4a3298522188bf96.

3 years agobpo-40280: Change subprocess imports for cleaner error on wasm32 (GH-30620)
Christian Heimes [Mon, 17 Jan 2022 06:23:36 +0000 (08:23 +0200)] 
bpo-40280: Change subprocess imports for cleaner error on wasm32 (GH-30620)

3 years agobpo-40280: Add requires_fork test helper (GH-30622)
Christian Heimes [Sun, 16 Jan 2022 21:52:43 +0000 (23:52 +0200)] 
bpo-40280: Add requires_fork test helper (GH-30622)

3 years agobpo-46361: Fix "small" `int` caching (GH-30583)
Brandt Bucher [Sun, 16 Jan 2022 16:06:37 +0000 (08:06 -0800)] 
bpo-46361: Fix "small" `int` caching (GH-30583)

3 years agobpo-46386: improve `test_typing:test_immutability_by_copy_and_pickle` (GH-30613)
Nikita Sobolev [Sun, 16 Jan 2022 07:32:11 +0000 (10:32 +0300)] 
bpo-46386: improve `test_typing:test_immutability_by_copy_and_pickle` (GH-30613)

3 years agobpo-40066: [Enum] update str() and format() output (GH-30582)
Ethan Furman [Sun, 16 Jan 2022 06:41:43 +0000 (22:41 -0800)] 
bpo-40066:  [Enum] update str() and format() output (GH-30582)

Undo rejected PEP-663 changes:

- restore `repr()` to its 3.10 status
- restore `str()` to its 3.10 status

New changes:

- `IntEnum` and `IntFlag` now leave `__str__` as the original `int.__str__` so that str() and format() return the same result
- zero-valued flags without a name have a slightly changed repr(), e.g. `repr(Color(0)) == '<Color: 0>'`
- update `dir()` for mixed-in types to return all the methods and attributes of the mixed-in type
- added `_numeric_repr_` to `Flag` to control display of unnamed values
- enums without doc strings have a more comprehensive doc string added
- `ReprEnum` added -- inheriting from this makes it so only `__repr__` is replaced, not `__str__` nor `__format__`; `IntEnum`, `IntFlag`, and `StrEnum` all inherit from `ReprEnum`

3 years agobpo-46387: test all pickle protos in `test_field_descriptor` in `test_collections...
Nikita Sobolev [Sun, 16 Jan 2022 04:33:28 +0000 (07:33 +0300)] 
bpo-46387: test all pickle protos in `test_field_descriptor` in `test_collections` (GH-30614)

3 years agobpo-46388: Test NotImplemented code path for functools.total_ordering (GH-30616)
Russel Webber [Sat, 15 Jan 2022 22:15:32 +0000 (22:15 +0000)] 
bpo-46388: Test NotImplemented code path for functools.total_ordering (GH-30616)

3 years agobpo-46258: Streamline isqrt fast path (#30333)
Mark Dickinson [Sat, 15 Jan 2022 09:58:04 +0000 (09:58 +0000)] 
bpo-46258: Streamline isqrt fast path (#30333)

3 years agobpo-46383: Fix signature of zoneinfo module_free function (GH-30607)
Christian Heimes [Sat, 15 Jan 2022 08:52:19 +0000 (10:52 +0200)] 
bpo-46383: Fix signature of zoneinfo module_free function (GH-30607)

3 years agobpo-20281, bpo-29964: update datetime docs to refer %z and %Z to a pre-existing footn...
Hugo van Kemenade [Fri, 14 Jan 2022 22:49:12 +0000 (00:49 +0200)] 
bpo-20281, bpo-29964: update datetime docs to refer %z and %Z to a pre-existing footnote (GH-30354)

3 years agobpo-46242: [Enum] better error message for extending `Enum` with members (GH-30357)
Nikita Sobolev [Fri, 14 Jan 2022 22:18:00 +0000 (01:18 +0300)] 
bpo-46242: [Enum] better error message for extending `Enum` with members (GH-30357)

3 years agoMerge remote-tracking branch 'upstream/main'
Pablo Galindo [Fri, 14 Jan 2022 21:20:56 +0000 (21:20 +0000)] 
Merge remote-tracking branch 'upstream/main'

3 years agoPost 3.11.0a4
Pablo Galindo [Fri, 14 Jan 2022 21:20:41 +0000 (21:20 +0000)] 
Post 3.11.0a4

3 years agobpo-46380: Apply tests to both C and Python version (GH-30606)
Nikita Sobolev [Fri, 14 Jan 2022 21:13:45 +0000 (00:13 +0300)] 
bpo-46380: Apply tests to both C and Python version (GH-30606)

3 years agobpo-45569: Change PYLONG_BITS_IN_DIGIT default to 30 (GH-30497)
Mark Dickinson [Fri, 14 Jan 2022 18:54:56 +0000 (18:54 +0000)] 
bpo-45569: Change PYLONG_BITS_IN_DIGIT default to 30 (GH-30497)

3 years agobpo-40280: Block more syscalls that are causing crashes in tests (GH-30601)
Christian Heimes [Fri, 14 Jan 2022 17:48:44 +0000 (19:48 +0200)] 
bpo-40280: Block more syscalls that are causing crashes in tests (GH-30601)

3 years agobpo-23183: Document the timeit output (GH-30359)
Hugo van Kemenade [Fri, 14 Jan 2022 17:25:36 +0000 (19:25 +0200)] 
bpo-23183: Document the timeit output (GH-30359)

Co-authored-by: Robert Collins <robertc@robertcollins.net>
3 years agobpo-46362: Ensure abspath() tests pass through environment variables to subprocess...
neonene [Fri, 14 Jan 2022 15:31:15 +0000 (00:31 +0900)] 
bpo-46362: Ensure abspath() tests pass through environment variables to subprocess (GH-30595)

3 years agobpo-40280: Build WASM stdlib bundle and more modules for node (GH-30597)
Christian Heimes [Fri, 14 Jan 2022 11:11:49 +0000 (13:11 +0200)] 
bpo-40280: Build WASM stdlib bundle and more modules for node (GH-30597)

3 years agobpo-46280: Fix tracemalloc_copy_domain() (GH-30591)
Victor Stinner [Fri, 14 Jan 2022 04:11:38 +0000 (05:11 +0100)] 
bpo-46280: Fix tracemalloc_copy_domain() (GH-30591)

Test if tracemalloc_copy_traces() failed to allocated memory in
tracemalloc_copy_domain().

3 years agobpo-45953: Statically initialize all the non-object PyInterpreterState fields we...
Eric Snow [Fri, 14 Jan 2022 00:17:28 +0000 (17:17 -0700)] 
bpo-45953: Statically initialize all the non-object PyInterpreterState fields we can. (gh-30589)

https://bugs.python.org/issue45953

3 years agobpo-45953: Statically initialize all the PyThreadState fields we can. (gh-30590)
Eric Snow [Fri, 14 Jan 2022 00:09:24 +0000 (17:09 -0700)] 
bpo-45953: Statically initialize all the PyThreadState fields we can. (gh-30590)

https://bugs.python.org/issue45953

3 years agobpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571)
neonene [Thu, 13 Jan 2022 23:35:42 +0000 (08:35 +0900)] 
bpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571)

This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.

3 years agoStatically initialize _PyRuntimeState fields. (gh-30588)
Eric Snow [Thu, 13 Jan 2022 23:33:40 +0000 (16:33 -0700)] 
Statically initialize _PyRuntimeState fields. (gh-30588)

https://bugs.python.org/issue45953

3 years agobpo-46370: Move the static initializer for _PyRuntime to its own header file. (gh...
Eric Snow [Thu, 13 Jan 2022 22:54:36 +0000 (15:54 -0700)] 
bpo-46370: Move the static initializer for _PyRuntime to its own header file. (gh-30587)

https://bugs.python.org/issue46370

3 years agobpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
Christian Heimes [Thu, 13 Jan 2022 20:47:42 +0000 (22:47 +0200)] 
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)

3 years agoPython 3.11.0a4 v3.11.0a4
Pablo Galindo [Thu, 13 Jan 2022 19:36:27 +0000 (19:36 +0000)] 
Python 3.11.0a4

3 years agobpo-46070: _PyGC_Fini() untracks objects (GH-30577)
Victor Stinner [Thu, 13 Jan 2022 18:28:32 +0000 (19:28 +0100)] 
bpo-46070: _PyGC_Fini() untracks objects (GH-30577)

Py_EndInterpreter() now explicitly untracks all objects currently
tracked by the GC. Previously, if an object was used later by another
interpreter, calling PyObject_GC_UnTrack() on the object crashed if
the previous or the next object of the PyGC_Head structure became a
dangling pointer.

3 years agobpo-44133: Link Python executable with object files (GH-30556)
Victor Stinner [Thu, 13 Jan 2022 18:24:28 +0000 (19:24 +0100)] 
bpo-44133: Link Python executable with object files (GH-30556)

When Python is built without --enable-shared, the "python" program is
now linked to object files, rather than being linked to the Python
library (libpython.a), to make sure that all symbols are exported.
Previously, the linker omitted some symbols like the Py_FrozenMain()
function.

When Python is configured with --without-static-libpython, the Python
static library (libpython.a) is no longer built.

* Check --without-static-libpython earlier in configure.ac
* Add LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variables to Makefile.
* test_capi now ensures that the "Py_FrozenMain" symbol is exported.

3 years ago bpo-46355: Document PyFrameObject and PyThreadState changes (GH-30558)
Victor Stinner [Thu, 13 Jan 2022 18:21:50 +0000 (19:21 +0100)] 
 bpo-46355: Document PyFrameObject and PyThreadState changes (GH-30558)

Document PyFrameObject and PyThreadState changes in What's New in
Python 3.11 and explain how to port code.

3 years agobpo-46358: modernize `test_asyncio` (GH-30562)
Nikita Sobolev [Thu, 13 Jan 2022 14:28:02 +0000 (17:28 +0300)] 
bpo-46358: modernize `test_asyncio` (GH-30562)

3 years agobpo-46359: Modernize `test_typing` by removing checks for EOL Python versions (GH...
Nikita Sobolev [Thu, 13 Jan 2022 13:09:40 +0000 (16:09 +0300)] 
bpo-46359: Modernize `test_typing` by removing checks for EOL Python versions (GH-30563)

Also removes unused tests meant for older versions of Python.

3 years agobpo-46328: Add sys.exception() (GH-30514)
Irit Katriel [Thu, 13 Jan 2022 12:35:58 +0000 (12:35 +0000)] 
bpo-46328: Add sys.exception() (GH-30514)

3 years agobpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544)
Irit Katriel [Thu, 13 Jan 2022 12:34:38 +0000 (12:34 +0000)] 
bpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544)

3 years agobpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455)
Christian Heimes [Thu, 13 Jan 2022 08:46:38 +0000 (10:46 +0200)] 
bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455)

3 years agobpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507)
Christian Heimes [Thu, 13 Jan 2022 08:46:04 +0000 (10:46 +0200)] 
bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507)

3 years agobpo-46345: Add a test case for implicit `Optional` class attribute (GH-30535)
Nikita Sobolev [Wed, 12 Jan 2022 23:35:44 +0000 (02:35 +0300)] 
bpo-46345: Add a test case for implicit `Optional` class attribute (GH-30535)

3 years agobpo-45953: Statically allocate the main interpreter (and initial thread state). ...
Eric Snow [Wed, 12 Jan 2022 23:28:46 +0000 (16:28 -0700)] 
bpo-45953: Statically allocate the main interpreter (and initial thread state). (gh-29883)

Previously, the main interpreter was allocated on the heap during runtime initialization.  Here we instead embed it into _PyRuntimeState, which means it is statically allocated as part of the _PyRuntime global.  The same goes for the initial thread state (of each interpreter, including the main one).  Consequently there are fewer allocations during runtime/interpreter init, fewer possible failures, and better memory locality.

FYI, this also helps efforts to consolidate globals, which in turns helps work on subinterpreter isolation.

https://bugs.python.org/issue45953

3 years agobpo-46342: make @typing.final introspectable (GH-30530)
Jelle Zijlstra [Wed, 12 Jan 2022 19:38:25 +0000 (11:38 -0800)] 
bpo-46342: make @typing.final introspectable (GH-30530)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
3 years agobpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
Christian Heimes [Wed, 12 Jan 2022 19:27:37 +0000 (21:27 +0200)] 
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)

3 years agobpo-46020: Optimize long_pow for the common case (GH-30555)
Tim Peters [Wed, 12 Jan 2022 18:55:02 +0000 (12:55 -0600)] 
bpo-46020: Optimize long_pow for the common case (GH-30555)

This cuts a bit of overhead by not initializing the table of small
odd powers unless it's needed for a large exponent.

3 years agobpo-46348: modernize `test_typing` (GH-30547)
Nikita Sobolev [Wed, 12 Jan 2022 16:48:10 +0000 (19:48 +0300)] 
bpo-46348: modernize `test_typing` (GH-30547)

3 years agobpo-40280: Add --with-emscripten-target to build for browser or node (GH-30552)
Christian Heimes [Wed, 12 Jan 2022 15:08:19 +0000 (17:08 +0200)] 
bpo-40280: Add --with-emscripten-target to build for browser or node (GH-30552)

Co-authored-by: Ethan Smith <ethan@ethanhs.me>
3 years agobpo-46347: Yet another fix in the erorr path of PyEval_EvalCodeEx (#30554)
Yury Selivanov [Wed, 12 Jan 2022 00:35:19 +0000 (16:35 -0800)] 
bpo-46347: Yet another fix in the erorr path of PyEval_EvalCodeEx (#30554)

3 years agobpo-46347: Fix PyEval_EvalCodeEx to correctly cleanup in error paths (#30551)
Yury Selivanov [Tue, 11 Jan 2022 23:37:09 +0000 (15:37 -0800)] 
bpo-46347: Fix PyEval_EvalCodeEx to correctly cleanup in error paths (#30551)

3 years agobpo-46303: Fix fileutils.h compiler warnings (GH-30550)
Victor Stinner [Tue, 11 Jan 2022 23:35:26 +0000 (00:35 +0100)] 
bpo-46303: Fix fileutils.h compiler warnings (GH-30550)

Add missing pycore_fileutils.h include in _tkinter.c and
_testconsole.c.

3 years agobpo-46347: Fix memory leak in PyEval_EvalCodeEx. (#30546)
Yury Selivanov [Tue, 11 Jan 2022 22:25:28 +0000 (14:25 -0800)] 
bpo-46347: Fix memory leak in PyEval_EvalCodeEx. (#30546)

First introduced in 0332e569c12d3dc97171546c6dc10e42c27de34b

3 years agobpo-46307: Add string.Template.get_identifiers() method (GH-30493)
Ben Kehoe [Tue, 11 Jan 2022 19:15:42 +0000 (12:15 -0700)] 
bpo-46307: Add string.Template.get_identifiers() method (GH-30493)

Add `string.Template.get_identifiers()` method that returns the identifiers within the template. By default, raises an error if it encounters an invalid identifier (like `substitute()`). The keyword-only argument `raise_on_invalid` can be set to `False` to ignore invalid identifiers (like `safe_substitute()`).

Automerge-Triggered-By: GH:warsaw
3 years agobpo-45953: Statically allocate and initialize global bytes objects. (gh-30096)
Eric Snow [Tue, 11 Jan 2022 16:37:24 +0000 (09:37 -0700)] 
bpo-45953: Statically allocate and initialize global bytes objects. (gh-30096)

The empty bytes object (b'') and the 256 one-character bytes objects were allocated at runtime init.  Now we statically allocate and initialize them.

https://bugs.python.org/issue45953

3 years ago[doc] Add license_url for python-docs-theme 2022.1. (GH-30527)
Julien Palard [Tue, 11 Jan 2022 16:32:42 +0000 (17:32 +0100)] 
[doc] Add license_url for python-docs-theme 2022.1. (GH-30527)

3 years agobpo-46339: Fix crash in the parser when computing error text for multi-line f-strings...
Pablo Galindo Salgado [Tue, 11 Jan 2022 16:30:39 +0000 (16:30 +0000)] 
bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529)

Automerge-Triggered-By: GH:pablogsal
3 years agocloses bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current...
Julian Gilbey [Tue, 11 Jan 2022 14:33:06 +0000 (14:33 +0000)] 
closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387)

3 years agoRemove unused `Any` from `Concatenate` example in typing docs (GH-30516)
Michael Oliver [Tue, 11 Jan 2022 13:59:26 +0000 (13:59 +0000)] 
Remove unused `Any` from `Concatenate` example in typing docs (GH-30516)

3 years agoNews item for issue 46314. (GH-30515)
Mark Shannon [Tue, 11 Jan 2022 11:29:48 +0000 (11:29 +0000)] 
News item for issue 46314. (GH-30515)

3 years agobpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)
Mark Shannon [Tue, 11 Jan 2022 11:28:30 +0000 (11:28 +0000)] 
bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)

3 years agobpo-46303: Move fileutils.h private functions to internal C API (GH-30484)
Victor Stinner [Tue, 11 Jan 2022 10:56:16 +0000 (11:56 +0100)] 
bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)

Move almost all private functions of Include/cpython/fileutils.h to
the internal C API Include/internal/pycore_fileutils.h.

Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's
used by _testcapi which must not use the internal C API.

Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi
to _testinternalcapi, since the C API moved to the internal C API.

3 years agobpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)
Nikita Sobolev [Tue, 11 Jan 2022 10:51:34 +0000 (13:51 +0300)] 
bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)

3 years agobpo-46205: exit if no workers are alive in runtest_mp (GH-30470)
Sam Gross [Tue, 11 Jan 2022 03:03:09 +0000 (22:03 -0500)] 
bpo-46205: exit if no workers are alive in runtest_mp (GH-30470)

3 years agobpo-46244: Remove __slots__ from typing.TypeVar, .ParamSpec (#30444)
Arie Bovenberg [Mon, 10 Jan 2022 23:43:39 +0000 (00:43 +0100)] 
bpo-46244: Remove __slots__ from typing.TypeVar, .ParamSpec (#30444)

* add missing __slots__ to typing._TypeVarLike

* add news entry

* remove slots from _TypeVarLike base classes

* cleanup diff

* fix broken link in blurb

3 years agobpo-45331: [Enum] add rule to docs that mixin type must be subclassable (GH-30521)
Nikita Sobolev [Mon, 10 Jan 2022 23:42:45 +0000 (02:42 +0300)] 
bpo-45331: [Enum] add rule to docs that mixin type must be subclassable (GH-30521)

3 years agobpo-46327: [Enum] remove skipped tests (GH-30512)
Nikita Sobolev [Mon, 10 Jan 2022 19:12:34 +0000 (22:12 +0300)] 
bpo-46327: [Enum] remove skipped tests (GH-30512)

3 years agobpo-46301: [Enum] fix refleak tests (GH30510)
Nikita Sobolev [Mon, 10 Jan 2022 19:09:00 +0000 (22:09 +0300)] 
bpo-46301: [Enum] fix refleak tests (GH30510)

3 years agobpo-46332: use raise..from instead of assigning __cause__ and raising (GH-30517)
Irit Katriel [Mon, 10 Jan 2022 18:59:21 +0000 (18:59 +0000)] 
bpo-46332: use raise..from instead of assigning __cause__ and raising (GH-30517)

3 years agobpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)
Mark Shannon [Mon, 10 Jan 2022 12:29:02 +0000 (12:29 +0000)] 
bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)

3 years agobpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504)
Raymond Hettinger [Mon, 10 Jan 2022 02:02:06 +0000 (20:02 -0600)] 
bpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504)

3 years agobpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745)
Inada Naoki [Mon, 10 Jan 2022 01:38:33 +0000 (10:38 +0900)] 
bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745)

3 years agobpo-46272: Fix two heading comments in python.gram (GH-30499)
Mark Dickinson [Sun, 9 Jan 2022 16:22:54 +0000 (16:22 +0000)] 
bpo-46272: Fix two heading comments in python.gram (GH-30499)

One typo fix and one heading change, both in comments. No functional changes.

3 years agobpo-37295: Use constant-time comb() and perm() for larger n depending on k (GH-30305)
Serhiy Storchaka [Sun, 9 Jan 2022 13:32:25 +0000 (15:32 +0200)] 
bpo-37295: Use constant-time comb() and perm() for larger n depending on k (GH-30305)

3 years agobpo-40280: Disable epoll_create in Emscripten config.site (GH-30494)
Ethan Smith [Sun, 9 Jan 2022 10:58:59 +0000 (02:58 -0800)] 
bpo-40280: Disable epoll_create in Emscripten config.site (GH-30494)

Co-authored-by: nick.pope@infogrid.io
3 years agoAdd a (conservative) timeout for Windows builds on GitHub Actions (GH-30301)
Mark Dickinson [Sun, 9 Jan 2022 10:28:34 +0000 (10:28 +0000)] 
Add a (conservative) timeout for Windows builds on GitHub Actions (GH-30301)

3 years agobpo-46308: Fix unportable test(1) operator in configure script (GH-30490)
Thomas Klausner [Sun, 9 Jan 2022 00:54:13 +0000 (01:54 +0100)] 
bpo-46308: Fix unportable test(1) operator in configure script (GH-30490)

3 years agobpo-46306: simplify `CodeType` attribute access in `doctest.py` (GH-30481)
Nikita Sobolev [Sat, 8 Jan 2022 20:13:42 +0000 (23:13 +0300)] 
bpo-46306: simplify `CodeType` attribute access in `doctest.py` (GH-30481)

Assume co_firstlineno always exists on types.CodeType objects.

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agobpo-46301: [Enum] test uncomparable values in `_convert_` (GH-30472)
Nikita Sobolev [Sat, 8 Jan 2022 19:43:42 +0000 (22:43 +0300)] 
bpo-46301: [Enum] test uncomparable values in `_convert_` (GH-30472)

add tests that cover different types, and same non-comparable types

3 years agobpo-46261: Update `sqlite3.Cursor.lastrowid` docs (GH-30407)
Erlend Egeberg Aasland [Sat, 8 Jan 2022 19:17:09 +0000 (20:17 +0100)] 
bpo-46261: Update `sqlite3.Cursor.lastrowid` docs (GH-30407)

3 years agobpo-46290: Fix parameter names in dataclasses docs (GH-30450)
Zsolt Dollenstein [Sat, 8 Jan 2022 10:56:35 +0000 (10:56 +0000)] 
bpo-46290: Fix parameter names in dataclasses docs (GH-30450)

3 years agobpo-46299: Improve test_descr (GH-30475)
Dong-hee Na [Sat, 8 Jan 2022 08:14:40 +0000 (17:14 +0900)] 
bpo-46299: Improve test_descr (GH-30475)

3 years agobpo-46299: improve `test_descr.py` with stricter error handling (GH-30471)
Nikita Sobolev [Sat, 8 Jan 2022 03:51:51 +0000 (06:51 +0300)] 
bpo-46299: improve `test_descr.py` with stricter error handling (GH-30471)

3 years agobpo-46235: Do all ref-counting at once during list/tuple multiplication (GH-30346)
Dennis Sweeney [Sat, 8 Jan 2022 03:47:58 +0000 (22:47 -0500)] 
bpo-46235: Do all ref-counting at once during list/tuple multiplication (GH-30346)

When multiplying lists and tuples by `n`, increment each element's refcount, by `n`, just once.

Saves `n-1` increments per element, and allows for a leaner & faster copying loop.

Code by  sweeneyde (Dennis Sweeney).