Commit graph

122194 commits

Author SHA1 Message Date
Sebastian Rittau
e406b399f9
[docs] TypeVarTuple default is keyword-only (#119215) 2024-05-20 15:31:45 +00:00
Erlend E. Aasland
642b25b9a8
gh-115119: Fall back to bundled libmpdec if system libmpdec is not found (#119196) 2024-05-20 10:58:08 -04:00
David Foster
72d07dd30b
typing docs: Fix formatting issue (#119210) 2024-05-20 14:32:51 +00:00
Thanos
05e1dce76d
gh-119185: Fix typo in _pyrepl.pager: tempfilepager should be tempfile_pager (#118881)
Fix typo in `_pyrepl.pager`: `tempfilepager` should be `tempfile_pager`

The name with no underscore doesn't exist.
2024-05-20 10:31:43 -04:00
Roy Hyunjin Han
bbb49888a7
gh-103134: Update multiprocessing.managers.ListProxy and DictProxy (GH-103133) 2024-05-20 14:28:36 +00:00
Erlend E. Aasland
1db4695644
gh-118928: Remove unneeded sqlite3 NEWS entry (#119208)
The regression in d8e0e0091 was never part of an official release.
2024-05-20 09:51:02 -04:00
Erlend E. Aasland
af359cee75
gh-118928: sqlite3: correctly bail if sequences of params are used with named placeholders (#119197) 2024-05-20 09:44:42 -04:00
Alex Waygood
0883fd22e6
Enable some stricter mypy settings on Lib/_pyrepl (#119077) 2024-05-20 08:52:32 -04:00
Nikita Sobolev
16b46ebd2b
gh-119121: Fix and test async.staggered.staggered_race (#119173) 2024-05-20 14:06:50 +03:00
Terry Jan Reedy
357f5a1f73
IDLE: fix url in config.py comment (#119198) 2024-05-20 06:04:50 +00:00
pulkin
0abf997e75
gh-119105: difflib: improve recursion for degenerate cases (#119131)
Code from https://github.com/pulkin, in PR
https://github.com/python/cpython/pull/119131

Greatly speeds `Differ` when there are many identically scoring pairs, by splitting the recursion near the inputs' midpoints instead of degenerating (as now) into just peeling off the first two lines.

Co-authored-by: Tim Peters <tim.peters@gmail.com>
2024-05-19 16:46:37 -05:00
Barney Gale
3c28510b98
GH-119113: Raise TypeError from pathlib.PurePath.with_suffix(None) (#119124)
Restore behaviour from 3.12 when `path.with_suffix(None)` is called.
2024-05-19 17:04:56 +01:00
Barney Gale
4b76671728
GH-118447: Fix FreeBSD test failures. (#119170)
Apparently only macOS requires read permission to call `readlink()` on a
symlink.
2024-05-19 16:39:00 +01:00
Savannah Ostrowski
5307f44fb9
GH-119146: Don't run JIT CI on unrelated changes (GH-119147)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-19 12:59:12 +00:00
Jelle Zijlstra
697465ff88
marshal docs: Remove reference to "Sun" (#119161)
Nobody has been using a Sun machine for a long time. When I saw
this sentence in a lightning talk just now, I thought it was talking
about sending Python code on a spacecraft.
2024-05-18 22:15:14 -04:00
Tim Peters
ba8af84864
Try to repair oddball test bots timing out in test_int (#119166)
Various test bots (outside the ones GH normally runs) are timing out during test_int after ecd8664 (asymptotically faster str->int). Best guess is that they don't build the C _decimal module. So require that module in the most likely tests to time out then. Flying mostly blind, though!
2024-05-18 20:54:23 -05:00
Tim Peters
ecd8664f11
gh-118750: Asymptotically faster int(string) (#118751)
Asymptotically faster (O(n log n)) str->int for very large strings, leveraging the faster multiplication scheme in the C-coded `_decimal` when available. This is used instead of the current Karatsuba-limited method starting at 2 million digits.

Lots of opportunity remains for fine-tuning. Good targets include changing BYTELIM, and possibly changing the internal output base (from 256 to a higher number of bytes).

Doing this was substantial work, and many of the new lines are actually comments giving correctness proofs. The obvious approaches sticking to integers were too slow to be useful, so this is doing variable-precision decimal floating-point arithmetic. Much faster, but worst-possible rounding errors have to be wholly accounted for, using as little precision as possible.

Special thanks to Serhiy Storchaka for asking many good questions in his code reviews!

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: sstandre <43125375+sstandre@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-05-18 19:19:57 -05:00
Barney Gale
caf6064a1b
GH-118447: Fix handling of unreadable symlinks in os.path.realpath() (#118489)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-05-18 22:40:51 +00:00
Victor Stinner
30b4e9f9c4
gh-119050: Add type hints to libregrtest/results.py (#119144)
Sort also 'omitted' in TestResults.display_result().
2024-05-18 16:21:05 -04:00
Donghee Na
c141d43937
gh-119132: Update sys.version to identify free-threaded or not. (gh-119134) 2024-05-18 19:44:40 +00:00
Rafael Fontenelle
691429702f
docs: make mimalloc license text literal (#119046) 2024-05-18 12:22:54 -04:00
Victor Stinner
74072a3ffc
gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (#119140) 2024-05-18 09:24:22 -04:00
Nice Zombies
0f5e8bed63
gh-119078: Clarify venv tutorial (GH-119129) 2024-05-18 12:44:02 +01:00
Raymond Hettinger
81c3130c51
Minor improvements to the docs for itertools.tee() (gh-119135) 2024-05-18 01:32:34 -05:00
Kirill Podoprigora
31a28cbae0
gh-119049: Defer import warnings in pathlib._local (#119111) 2024-05-17 17:12:02 +01:00
Lysandros Nikolaou
447edb6e98
gh-112066: Fix versionadded in PyDict_SetDefaultRef docs (#118696) 2024-05-17 12:10:21 -04:00
Xie Yanbo
65de194dd8
Fix typos in documentation (#119092)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-17 10:37:35 +00:00
Alex Waygood
033f5c87f1
Improve pyrepl type-annotation coverage (#119081) 2024-05-17 06:13:24 -04:00
Kirill Podoprigora
100c7ab00a
gh-119049: Fix incorrect display of warning which is constructed by C API (GH-119063)
The source line was not displayed if the warnings module had not yet
been imported.
2024-05-16 20:27:59 +00:00
Brandt Bucher
4702b7b5bd
GH-118943: Fix a race condition when generating jit_stencils.h (GH-118957) 2024-05-16 12:11:42 -04:00
Miro Hrončok
ab73bcdf73
Explain how to install LLVM on Fedora (GH-118983)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-05-16 12:09:52 -04:00
Shantanu
17cba55786
gh-108267: Fix object.__setattr__ regression in dataclasses docs (#119082) 2024-05-16 09:39:37 -04:00
Serhiy Storchaka
b6839942a8
Add Tkinter tests for different events (GH-118778) 2024-05-16 08:16:46 +00:00
Serhiy Storchaka
0152dc4ff5
gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065) 2024-05-16 10:25:10 +03:00
Wulian233
0142a2292c
Fix typos in test_buffer.py and update numpy issue links (#118963) 2024-05-15 22:16:34 -07:00
Rafael Fontenelle
66b73e9724
Use literal syntax in origin property (#119029) 2024-05-15 22:13:47 -07:00
Xie Yanbo
4d3ef8056a
Docs: fix typos in documentation (gh-118941) 2024-05-15 18:38:32 -05:00
Rafael Fontenelle
fb0cf7d140
gh-119009: Add gettext target (#119006) 2024-05-15 12:13:52 -06:00
Serhiy Storchaka
5b88d95cc5
gh-118760: Fix errors in calling Tkinter bindings on Windows (GH-118782)
For unknown reasons some arguments for Tkinter binding can be created
as a 1-tuple containing a Tcl_Obj when wantobjects is 2.
2024-05-15 19:49:00 +03:00
Thomas Grainger
7d722b7d3a
Remove references to private symbols from zipimport module docstring (GH-119015) 2024-05-15 11:21:52 -05:00
Steve Dower
94591dca51
gh-118486: Simplify test_win32_mkdir_700 to check the exact ACL (GH-119056) 2024-05-15 11:59:41 +01:00
Jelle Zijlstra
ee13797dec
3.13 What's New: Add PEP 702 (#118922)
I honestly forgot this slipped into 3.13, but I think it's worth highlighting more, as it is a PEP-sized change that makes the type system significantly more powerful.

@Yhg1s I think it's also worth mentioning in your release announcements.
2024-05-14 22:39:12 -04:00
Barney Gale
7d8725ac6f
GH-74033: Drop deprecated pathlib.Path keyword arguments (#118793)
Remove support for supplying keyword arguments to `pathlib.Path()`. This
has been deprecated since Python 3.12.
2024-05-14 20:14:07 +00:00
Barney Gale
fbe6a0988f
GH-101357: Suppress OSError from pathlib.Path.exists() and is_*() (#118243)
Suppress all `OSError` exceptions from `pathlib.Path.exists()` and `is_*()`
rather than a selection of more common errors as we do presently. Also
adjust the implementations to call `os.path.exists()` etc, which are much
faster on Windows thanks to GH-101196.
2024-05-14 17:53:15 +00:00
Erlend E. Aasland
d8e0e00919
gh-118928: sqlite3: disallow sequences of params with named placeholders (#118929)
Follow-up of gh-101693. The previous DeprecationWarning is replaced with 
raising sqlite3.ProgrammingError.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-05-14 16:10:55 +00:00
Raymond Hettinger
7a97ee570f
Misc improvements to the itertools docs (gh-119040) 2024-05-14 10:18:19 -05:00
Alex Waygood
a9328e2b6e
typing tests: remove some unnecessary uses of exec() (#119005) 2024-05-14 07:16:14 -07:00
Serhiy Storchaka
331d385af9
Add yet few cases for urlparse/urlunparse roundtrip tests (GH-119031)
Add yet few cases for urlparse/urlunparse tests
2024-05-14 16:59:21 +03:00
Serhiy Storchaka
e237b25a4f
gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) 2024-05-14 12:24:37 +03:00
Michał Górny
e04cd964eb
GH-118836: Fix JIT build error when SHT_NOTE section is present (GH-119000) 2024-05-13 14:37:02 -07:00