]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
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.
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.
Kumar Aditya [Tue, 18 Jan 2022 19:53:43 +0000 (01:23 +0530)]
bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)
Nikita Sobolev [Tue, 18 Jan 2022 19:28:18 +0000 (22:28 +0300)]
bpo-46425: Fix direct invocation of multiple test modules (GH-30666)
Miguel Brito [Tue, 18 Jan 2022 15:55:16 +0000 (15:55 +0000)]
bpo-43869: Improve epoch docs (GH-25777)
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)
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)
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>
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)
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)
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)
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
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.
Nikita Sobolev [Mon, 17 Jan 2022 20:16:56 +0000 (23:16 +0300)]
bpo-46418: [Enum] simplify `MODULE` declaration in tests (GH-30647)
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.
zq1997 [Mon, 17 Jan 2022 17:45:44 +0000 (01:45 +0800)]
bpo-46161: Fix bug in starunpack_helper in compile.c (GH-30235)
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
Kumar Aditya [Mon, 17 Jan 2022 16:30:10 +0000 (22:00 +0530)]
bpo-46405: fix msvc compiler warnings (GH-30627)
Kumar Aditya [Mon, 17 Jan 2022 15:18:13 +0000 (20:48 +0530)]
bpo-40066: [Enum] skip failing doc test (GH-30637)
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).
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.
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 .
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)
Christian Heimes [Sun, 16 Jan 2022 21:52:43 +0000 (23:52 +0200)]
bpo-40280: Add requires_fork test helper (GH-30622)
Brandt Bucher [Sun, 16 Jan 2022 16:06:37 +0000 (08:06 -0800)]
bpo-46361: Fix "small" `int` caching (GH-30583)
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)
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`
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)
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)
Mark Dickinson [Sat, 15 Jan 2022 09:58:04 +0000 (09:58 +0000)]
bpo-46258: Streamline isqrt fast path (#30333)
Christian Heimes [Sat, 15 Jan 2022 08:52:19 +0000 (10:52 +0200)]
bpo-46383: Fix signature of zoneinfo module_free function (GH-30607)
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)
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)
Pablo Galindo [Fri, 14 Jan 2022 21:20:56 +0000 (21:20 +0000)]
Merge remote-tracking branch 'upstream/main'
Pablo Galindo [Fri, 14 Jan 2022 21:20:41 +0000 (21:20 +0000)]
Post 3.11.0a4
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)
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)
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)
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>
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)
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)
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().
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
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
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.
Eric Snow [Thu, 13 Jan 2022 23:33:40 +0000 (16:33 -0700)]
Statically initialize _PyRuntimeState fields. (gh-30588)
https://bugs.python.org/issue45953
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
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)
Pablo Galindo [Thu, 13 Jan 2022 19:36:27 +0000 (19:36 +0000)]
Python 3.11.0a4
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.
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.
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.
Nikita Sobolev [Thu, 13 Jan 2022 14:28:02 +0000 (17:28 +0300)]
bpo-46358: modernize `test_asyncio` (GH-30562)
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.
Irit Katriel [Thu, 13 Jan 2022 12:35:58 +0000 (12:35 +0000)]
bpo-46328: Add sys.exception() (GH-30514)
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)
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)
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)
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)
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
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>
Christian Heimes [Wed, 12 Jan 2022 19:27:37 +0000 (21:27 +0200)]
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
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.
Nikita Sobolev [Wed, 12 Jan 2022 16:48:10 +0000 (19:48 +0300)]
bpo-46348: modernize `test_typing` (GH-30547)
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>
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)
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)
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.
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
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
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
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)
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
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)
Michael Oliver [Tue, 11 Jan 2022 13:59:26 +0000 (13:59 +0000)]
Remove unused `Any` from `Concatenate` example in typing docs (GH-30516)
Mark Shannon [Tue, 11 Jan 2022 11:29:48 +0000 (11:29 +0000)]
News item for issue 46314. (GH-30515)
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)
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.
Nikita Sobolev [Tue, 11 Jan 2022 10:51:34 +0000 (13:51 +0300)]
bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)
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)
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
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)
Nikita Sobolev [Mon, 10 Jan 2022 19:12:34 +0000 (22:12 +0300)]
bpo-46327: [Enum] remove skipped tests (GH-30512)
Nikita Sobolev [Mon, 10 Jan 2022 19:09:00 +0000 (22:09 +0300)]
bpo-46301: [Enum] fix refleak tests (GH30510)
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)
Mark Shannon [Mon, 10 Jan 2022 12:29:02 +0000 (12:29 +0000)]
bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)
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)
Inada Naoki [Mon, 10 Jan 2022 01:38:33 +0000 (10:38 +0900)]
bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745)
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.
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)
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
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)
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)
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>
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
Erlend Egeberg Aasland [Sat, 8 Jan 2022 19:17:09 +0000 (20:17 +0100)]
bpo-46261: Update `sqlite3.Cursor.lastrowid` docs (GH-30407)
Zsolt Dollenstein [Sat, 8 Jan 2022 10:56:35 +0000 (10:56 +0000)]
bpo-46290: Fix parameter names in dataclasses docs (GH-30450)
Dong-hee Na [Sat, 8 Jan 2022 08:14:40 +0000 (17:14 +0900)]
bpo-46299: Improve test_descr (GH-30475)
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)
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).