]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Serhiy Storchaka [Sat, 14 Oct 2023 20:24:33 +0000 (23:24 +0300)]
bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825)
zipinfo now supports the full range of values in the TZ string
determined by RFC 8536 and detects all invalid formats.
Both Python and C implementations now raise exceptions of the same
type on invalid data.
Nikita Sobolev [Sat, 14 Oct 2023 14:20:19 +0000 (17:20 +0300)]
gh-101100: Fix sphinx warnings in `library/time.rst` (#110862)
Thomas Grainger [Sat, 14 Oct 2023 08:24:02 +0000 (01:24 -0700)]
remove redundant call to attach_loop in watcher (#110847)
Kirill Podoprigora [Sat, 14 Oct 2023 07:17:47 +0000 (10:17 +0300)]
gh-110715: Add missing import in zipfile (gh-110822)
Serhiy Storchaka [Sat, 14 Oct 2023 06:13:02 +0000 (09:13 +0300)]
gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)
Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.
The limit is increased to 2**32-1 (was 2**31-1).
Serhiy Storchaka [Sat, 14 Oct 2023 06:09:07 +0000 (09:09 +0300)]
gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507)
Serhiy Storchaka [Sat, 14 Oct 2023 06:07:02 +0000 (09:07 +0300)]
gh-88434: Emit deprecation warnings for non-integer numbers in gettext if translation not found (GH-110574)
Nikita Sobolev [Sat, 14 Oct 2023 06:05:46 +0000 (09:05 +0300)]
gh-101100: Fix sphinx warnings in `usage/cmdline.rst` (#110841)
Serhiy Storchaka [Sat, 14 Oct 2023 05:53:57 +0000 (08:53 +0300)]
gh-110628: Add tests for PyLong C API (GH-110629)
Serhiy Storchaka [Sat, 14 Oct 2023 05:50:41 +0000 (08:50 +0300)]
gh-110392: Fix tty functions (GH-110642)
* tty.setraw() and tty.setcbreak() previously returned partially modified
list of the original tty attributes. Now they return the correct list of
the original tty attributes
* tty.cfmakeraw() and tty.cfmakecbreak() now make a copy of the list of
special characters before modifying it.
Serhiy Storchaka [Sat, 14 Oct 2023 05:50:03 +0000 (08:50 +0300)]
gh-110815: Support non-ASCII keyword names in PyArg_ParseTupleAndKeywords() (GH-110816)
It already mostly worked, except in the case when invalid keyword
argument with non-ASCII name was passed to function with non-ASCII
parameter names. Then it crashed in the debug mode.
Victor Stinner [Sat, 14 Oct 2023 00:25:38 +0000 (02:25 +0200)]
regrtest: --fast-ci/slow-ci no longer imply --rerun-fail (#110849)
Donghee Na [Fri, 13 Oct 2023 16:40:15 +0000 (01:40 +0900)]
gh-109693: Update pyruntimestate._finalizing to use pyatomic.h (gh-110837)
Victor Stinner [Fri, 13 Oct 2023 14:20:18 +0000 (16:20 +0200)]
gh-110697: test_os TimerfdTests uses selectors (#110789)
Replace select.epoll() with selectors.DefaultSelector to support
FreeBSD 14 and newer.
* Merge common code between test_timerfd_epoll()
test_timerfd_ns_epoll().
* Replace "_ = func()" with "func()".
* Add TimerfdTests.read_count_signaled() method.
Russell Keith-Magee [Fri, 13 Oct 2023 14:12:32 +0000 (16:12 +0200)]
gh-110771: Decompose run_forever() into parts (#110773)
Effectively introduce an unstable, private (really: protected) API for subclasses that want to override `run_forever()`.
Alex Waygood [Fri, 13 Oct 2023 13:58:26 +0000 (15:58 +0200)]
Bump sphinx-lint to 0.7.0 (#110830)
paskozdilar [Fri, 13 Oct 2023 13:15:28 +0000 (15:15 +0200)]
gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)
* Remove redundant versionchanged
* Add missing versionchanged
* Update Doc/library/asyncio-task.rst
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
---------
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Serhiy Storchaka [Fri, 13 Oct 2023 13:05:01 +0000 (16:05 +0300)]
gh-110815: Improve tests for PyArg_ParseTupleAndKeywords() (GH-110817)
Petr Viktorin [Fri, 13 Oct 2023 12:51:48 +0000 (14:51 +0200)]
gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813)
* gh-110803: Reorganize docs for what PyType_Slot doesn't cover
- Cover the offset fields first
- Mention the old alternative for MANAGED flags, which is needed
to support older Pythons
- De-emphasize the internal flags: use an inline list.
- Add a note to PyMemberDef saying what to do with it
* Remove an older draft...
Thomas Wouters [Fri, 13 Oct 2023 11:40:12 +0000 (13:40 +0200)]
Merge branch 'main' of https://github.com/python/cpython
Thomas Wouters [Fri, 13 Oct 2023 11:39:00 +0000 (13:39 +0200)]
Post 3.13.0a1
Pablo Galindo Salgado [Fri, 13 Oct 2023 11:04:23 +0000 (13:04 +0200)]
gh-110805: Fix test_peg_generator after the change in the parser for REPL tracebacks (#110814)
Fix test_peg_generator after the change in the parser for REPL tracebacks
Pablo Galindo Salgado [Fri, 13 Oct 2023 09:25:37 +0000 (11:25 +0200)]
gh-110805: Allow the repl to show source code and complete tracebacks (#110775)
Lysandros Nikolaou [Fri, 13 Oct 2023 08:52:30 +0000 (10:52 +0200)]
gh-106212: Raise when using c-analyzer with clang on darwin (#110757)
Thomas Wouters [Fri, 13 Oct 2023 08:50:46 +0000 (10:50 +0200)]
Python 3.13.0a1
T. Wouters [Fri, 13 Oct 2023 08:43:01 +0000 (10:43 +0200)]
Fix the pyspecific SOURCE_URI (#110811)
Lysandros Nikolaou [Fri, 13 Oct 2023 08:30:56 +0000 (10:30 +0200)]
gh-107450: Fix testMemoryErrorBigSource using the bigmemtest decorator (GH-110810)
Nikita Sobolev [Fri, 13 Oct 2023 08:06:25 +0000 (11:06 +0300)]
gh-110525: Delete `test_c_api` method from `set` object (#110688)
Lysandros Nikolaou [Fri, 13 Oct 2023 07:41:00 +0000 (09:41 +0200)]
gh-107450: Fix parser column offset overflow test on Windows (#110768)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Filipe Laíns [Fri, 13 Oct 2023 06:26:27 +0000 (07:26 +0100)]
GH-110796: fix intermittent test failure in test_current_exceptions
Filipe Laíns [Fri, 13 Oct 2023 05:49:55 +0000 (06:49 +0100)]
GH-110786: suppress BrokenPipeError on the sysconfig CLI (#110791)
Filipe Laíns [Fri, 13 Oct 2023 01:13:28 +0000 (02:13 +0100)]
GH-103480: fix sysconfig package not being installed (#110792)
Donghee Na [Fri, 13 Oct 2023 01:07:27 +0000 (10:07 +0900)]
gh-109693: Update _gil_runtime_state.last_holder to use pyatomic.h (#110605)
Filipe Laíns [Thu, 12 Oct 2023 23:41:34 +0000 (00:41 +0100)]
GH-103480: make sysconfig a package (GH-110785)
Jelle Zijlstra [Thu, 12 Oct 2023 23:00:12 +0000 (16:00 -0700)]
gh-110782: Fix crash when TypeVar is constructed with keyword args (#110784)
InSync [Thu, 12 Oct 2023 22:04:36 +0000 (05:04 +0700)]
Remove unnecessary escape in Doc/library/enum.rst (GH-110780)
Alex Waygood [Thu, 12 Oct 2023 22:03:20 +0000 (00:03 +0200)]
gh-109653: Improve the import time of `email.utils` (#109824)
Pablo Galindo Salgado [Thu, 12 Oct 2023 14:52:14 +0000 (16:52 +0200)]
gh-110721: Use the traceback module for PyErr_Display() and fallback to the C implementation (#110702)
Thomas Grainger [Thu, 12 Oct 2023 14:13:57 +0000 (07:13 -0700)]
gh-94597: Add asyncio.EventLoop (#110723)
This is needed to pave the way for deprecating and eventually killing the event loop policy system (which is over-engineered and rarely used).
Tian Gao [Thu, 12 Oct 2023 14:10:21 +0000 (07:10 -0700)]
gh-110752: Reset `ceval.eval_breaker` to 0 in `interpreter_clear` (GH-110753)
Nikita Sobolev [Thu, 12 Oct 2023 13:05:23 +0000 (16:05 +0300)]
gh-109409: Fix inheritance of frozen dataclass from non-frozen dataclass mixins (gh-109437)
Fix inheritance of frozen dataclass from non-frozen dataclass mixins
Irit Katriel [Thu, 12 Oct 2023 10:02:42 +0000 (12:02 +0200)]
gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759)
Mark Shannon [Thu, 12 Oct 2023 09:34:32 +0000 (10:34 +0100)]
GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755)
Lysandros Nikolaou [Thu, 12 Oct 2023 09:34:12 +0000 (11:34 +0200)]
gh-107450: Raise OverflowError when parser column offset overflows (#110754)
Pablo Galindo Salgado [Thu, 12 Oct 2023 09:02:02 +0000 (10:02 +0100)]
gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (#110706)
Erlend E. Aasland [Thu, 12 Oct 2023 08:28:10 +0000 (10:28 +0200)]
gh-71587: Establish global state in `_datetime` (#110475)
* Use explicit initialiser for m_base
* Add module state stub; establish global state on stack
* Put conversion factors in state struct
* Move PyDateTime_TimeZone_UTC to state
* Move PyDateTime_Epoch to state struct
* Fix ref leaks in and clean up initialisation
Hugo van Kemenade [Thu, 12 Oct 2023 07:43:58 +0000 (09:43 +0200)]
gh-106193: Rename and fix duplicated tests in `test_monitoring` (GH-109139)
Lysandros Nikolaou [Thu, 12 Oct 2023 07:34:35 +0000 (09:34 +0200)]
gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)
* Fix test_peg_generator after tokenizer refactoring
* Remove references to tokenizer.c in comments etc.
Filipe Laíns [Thu, 12 Oct 2023 05:52:13 +0000 (06:52 +0100)]
GH-110749: fix unistd.h import in file_tokenizer.c (#110750)
Nikita Sobolev [Thu, 12 Oct 2023 02:20:20 +0000 (05:20 +0300)]
gh-110682: Ignore `__match_args__` from `__instancecheck__` in protocols (#110683)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Victor Stinner [Wed, 11 Oct 2023 22:06:20 +0000 (00:06 +0200)]
gh-85283: _stat extension now uses the limited C API (#110711)
gh-85283: _stat extension uses the limited C API
The _stat C extension is now built with the limited C API.
Victor Stinner [Wed, 11 Oct 2023 21:30:15 +0000 (23:30 +0200)]
gh-110673: test_pty raises on short write (#110677)
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
J. Nick Koston [Wed, 11 Oct 2023 20:59:27 +0000 (10:59 -1000)]
gh-110733: Micro-optimization in BaseEventLoop._run_once (#110735)
Ezio Melotti [Wed, 11 Oct 2023 20:50:55 +0000 (22:50 +0200)]
gh-110631: Fix reST indentation in `Doc/reference` (#110708)
Fix wrong indentation in the Doc/reference dir.
Victor Stinner [Wed, 11 Oct 2023 20:47:54 +0000 (22:47 +0200)]
gh-85283: If Py_LIMITED_API is defined, undefine Py_BUILD_CORE (#110725)
If the Py_LIMITED_API macro is defined, Py_BUILD_CORE,
Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros are now
undefined by Python.h.
Only undefine these 3 macros after including "exports.h" which uses
them to define PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros.
Remove hacks (undefine manually the 3 Py_BUILD_CORE macros) in
Modules/_testcapi/parts.h and Modules/_testclinic_limited.c.
Ezio Melotti [Wed, 11 Oct 2023 20:43:03 +0000 (22:43 +0200)]
gh-110631: Fix reST indentation (#110724)
* Fix wrong indentation in the other dirs.
* Fix more wrong indentation.
Ezio Melotti [Wed, 11 Oct 2023 20:24:12 +0000 (22:24 +0200)]
gh-110631: Fix reST indentation in `Doc/library` (#110685)
Fix wrong indentation in the Doc/library dir.
Tian Gao [Wed, 11 Oct 2023 17:52:14 +0000 (10:52 -0700)]
gh-65052: Prevent pdb from crashing when trying to display objects (#110578)
Hugo van Kemenade [Wed, 11 Oct 2023 16:12:28 +0000 (18:12 +0200)]
gh-109408: Revert pre-commit whitespace checks pending portable solution (#110726)
Victor Stinner [Wed, 11 Oct 2023 15:54:40 +0000 (17:54 +0200)]
gh-110313: Revert "gh-90108: Disable LTO on _freeze_module and _teste… (#110720)
gh-110313: Revert "gh-90108: Disable LTO on _freeze_module and _testembed (#109581)"
This reverts commit
3e3a7da590e1c3e5f03802e538f26c5204889c82 .
Lysandros Nikolaou [Wed, 11 Oct 2023 15:14:44 +0000 (17:14 +0200)]
gh-104169: Refactor tokenizer into lexer and wrappers (#110684)
* The lexer, which include the actual lexeme producing logic, goes into
the `lexer` directory.
* The wrappers, one wrapper per input mode (file, string, utf-8, and
readline), go into the `tokenizer` directory and include logic for
creating a lexer instance and managing the buffer for different modes.
---------
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Serhiy Storchaka [Wed, 11 Oct 2023 13:41:58 +0000 (16:41 +0300)]
gh-110289: C API: Add PyUnicode_EqualToUTF8() and PyUnicode_EqualToUTF8AndSize() functions (GH-110297)
Adam Turner [Wed, 11 Oct 2023 12:57:51 +0000 (13:57 +0100)]
GH-107518: Remove the Argument Clinic How-To (#109900)
* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide
Zackery Spytz [Wed, 11 Oct 2023 11:44:06 +0000 (04:44 -0700)]
gh-84489: Properly handle trailing spaces in Py_BuildValue() format strings (GH-21158)
The docs state that the space, tab, colon, and comma characters are
ignored in Py_BuildValue() format strings.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Wed, 11 Oct 2023 10:52:06 +0000 (13:52 +0300)]
gh-76106: Remove the cleanup lock in test_socket (GH-110539)
It does not already work (because it locks only addCleanup(), not doCleanups()),
and it is no longer needed since the clean up procedure waits for all test threads to join.
Serhiy Storchaka [Wed, 11 Oct 2023 07:08:51 +0000 (10:08 +0300)]
gh-84489: C API: Add tests for Py_BuildValue() (GH-110596)
Ezio Melotti [Wed, 11 Oct 2023 05:34:38 +0000 (07:34 +0200)]
gh-110631: fix wrong indentation in the `Doc/whatsnew` dir (#110632)
Fix wrong indentation in the Doc/whatsnew dir.
Barney Gale [Wed, 11 Oct 2023 03:45:11 +0000 (04:45 +0100)]
GH-110488: Fix two small issues in `pathlib.PurePath.with_name()` (#110651)
Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`
Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.
Victor Stinner [Wed, 11 Oct 2023 02:36:06 +0000 (04:36 +0200)]
gh-110662: multiprocessing test_async_timeout() increase timeout (#110663)
Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
Victor Stinner [Wed, 11 Oct 2023 01:49:09 +0000 (03:49 +0200)]
gh-110666: Fix multiprocessing test_terminate() elapsed (#110667)
multiprocessing test_terminate() and test_wait_socket_slow() no
longer test the CI performance: no longer check maximum elapsed time.
Add CLOCK_RES constant: tolerate a difference of 100 ms.
Victor Stinner [Wed, 11 Oct 2023 00:57:53 +0000 (02:57 +0200)]
gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (#110657)
Skip test_post_fork_child_no_deadlock() if Python is built with ASAN.
Add support.HAVE_ASAN_FORK_BUG.
Victor Stinner [Wed, 11 Oct 2023 00:38:04 +0000 (02:38 +0200)]
gh-108277: test_os tolerates 1 ms diff for timerfd (#110661)
Victor Stinner [Tue, 10 Oct 2023 23:59:43 +0000 (01:59 +0200)]
gh-110647: Fix signal test_stress_modifying_handlers() (#110650)
* cycle_handlers() now waits until at least one signal is received.
* num_received_signals can be equal to num_sent_signals.
Barney Gale [Tue, 10 Oct 2023 23:03:42 +0000 (00:03 +0100)]
GH-110109: Simplify pathlib test setup (#110308)
Use the class under test to create files, directories and symlinks.
Radislav Chugunov [Tue, 10 Oct 2023 22:31:28 +0000 (01:31 +0300)]
gh-108826: Document `dis` module CLI and rename `_test` function to `main` (#108827)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Nikita Sobolev [Tue, 10 Oct 2023 20:15:11 +0000 (23:15 +0300)]
gh-108303: Move all inspect test files to `test_inspect/` (#109607)
Nikita Sobolev [Tue, 10 Oct 2023 16:00:05 +0000 (19:00 +0300)]
gh-110525: Add tests for internal `set` CAPI (GH-110630)
Hugo van Kemenade [Tue, 10 Oct 2023 14:36:19 +0000 (16:36 +0200)]
gh-110631: Set three-space indents for reST in EditorConfig (#110635)
Set three-space indents in EditorConfig
Donghee Na [Tue, 10 Oct 2023 14:17:08 +0000 (23:17 +0900)]
gh-109693: Update pycore_interp.h to use pyatomic.h (#110604)
Adam Turner [Tue, 10 Oct 2023 13:40:08 +0000 (14:40 +0100)]
GH-109408: Move the C file whitespace check from patchcheck to pre-commit (#109890)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Adam Turner [Tue, 10 Oct 2023 12:51:20 +0000 (13:51 +0100)]
Don't doubly-parallelise sphinx-lint (#110617)
Yilei Yang [Tue, 10 Oct 2023 12:16:26 +0000 (05:16 -0700)]
gh-110050: Adjust the newline position in the TypeError message of the random.seed call. (#110051)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Nikita Sobolev [Tue, 10 Oct 2023 11:44:19 +0000 (14:44 +0300)]
gh-101100: Fix sphinx warnings in `library/socketserver.rst` (GH-110207)
Serhiy Storchaka [Tue, 10 Oct 2023 11:42:25 +0000 (14:42 +0300)]
gh-110388: Add tests for tty (GH-110394)
Serhiy Storchaka [Tue, 10 Oct 2023 11:35:15 +0000 (14:35 +0300)]
gh-81002: Add tests for termios (GH-110386)
Nikita Sobolev [Tue, 10 Oct 2023 10:15:12 +0000 (13:15 +0300)]
gh-110590: Fix a bug where _sre.compile would overwrite exceptions (#110591)
TypeError would be overwritten by OverflowError
if 'code' param contained non-ints.
Donghee Na [Tue, 10 Oct 2023 10:00:09 +0000 (19:00 +0900)]
gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667)
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Serhiy Storchaka [Tue, 10 Oct 2023 09:38:40 +0000 (12:38 +0300)]
gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async (#110500)
It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
Alex Waygood [Tue, 10 Oct 2023 09:35:36 +0000 (11:35 +0200)]
gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic (#110603)
Eric Snow [Tue, 10 Oct 2023 09:35:14 +0000 (03:35 -0600)]
gh-84570: Implement Waiting in SendChannel.send() (gh-110565)
We had been faking it (poorly).
We will add timeouts separately.
Nikita Sobolev [Tue, 10 Oct 2023 09:34:48 +0000 (12:34 +0300)]
gh-107652: Fix CIFuzz typo (#110602)
Adam Turner [Tue, 10 Oct 2023 09:17:53 +0000 (10:17 +0100)]
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (#109891)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Brandt Bucher [Tue, 10 Oct 2023 08:45:23 +0000 (10:45 +0200)]
Remove an old macro from executor.c (#110597)
Brandt Bucher [Tue, 10 Oct 2023 08:29:48 +0000 (10:29 +0200)]
GH-104584: Fix refleak when tracing through calls (GH-110593)
Alex Waygood [Tue, 10 Oct 2023 08:21:58 +0000 (10:21 +0200)]
Add some 'meta hooks' to our pre-commit config (#110587)
Hugo van Kemenade [Tue, 10 Oct 2023 08:11:51 +0000 (10:11 +0200)]
gh-109408: Add the docs whitespace check from patchcheck to pre-commit (#109854)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Alex Waygood [Tue, 10 Oct 2023 07:52:39 +0000 (09:52 +0200)]
gh-110558: Run ruff on Argument Clinic in CI (#110559)
Serhiy Storchaka [Tue, 10 Oct 2023 07:43:04 +0000 (10:43 +0300)]
gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH-110499)
contextmanager and asynccontextmanager context managers now close an invalid
underlying generator object that yields more then one value.
Nikita Sobolev [Tue, 10 Oct 2023 06:44:57 +0000 (09:44 +0300)]
Fix CIFuzz build (#110576)
Donghee Na [Mon, 9 Oct 2023 23:26:29 +0000 (08:26 +0900)]
gh-109693: Use pyatomic.h for signal module (gh-110480)