Commit graph

123532 commits

Author SHA1 Message Date
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
Nikita Sobolev
fc75792594
gh-118998: Handle errors correctly in tmtotuple in timemodule (#118999) 2024-05-14 00:20:59 +03:00
Nikita Sobolev
b04c497f18
gh-119010: Adds docs about __type_params__ to functools.update_wrapper (#119012)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-13 20:01:05 +00:00
Victor Stinner
7d7eec595a
gh-117873: Revert _posixshmem.shm_open() change (#118901) 2024-05-13 16:03:52 +02:00
Tian Gao
f526314194
gh-58933: Make pdb return to caller frame correctly when f_trace is not set (#118979) 2024-05-13 13:38:21 +01:00
I-Shen Leong
d8a82cca12
gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)
Fixes an AttributeError that occurs when checking if ns.temp is an absolute path during building from source on Windows.
2024-05-13 12:30:16 +01:00
Nikita Sobolev
b4ca389281
Improve the rmtree doc for dir_fd param addition in 3.11 (#118964) 2024-05-13 05:04:14 -06:00
Jacob Walls
9c15202441
gh-87106: Fix inspect.signature.bind() handling of positional-only arguments with **kwargs (GH-103404) 2024-05-13 10:56:09 +03:00
pochmann3
a705c1e449
Itertools docs: fix parameter names and indentation in Python equivalents (gh-118977) 2024-05-12 16:11:38 -05:00
Nikita Sobolev
ec1398e117
gh-118899: Add tests for NotImplemented attribute access (#118902) 2024-05-12 14:00:49 +00:00
Savannah Ostrowski
5b941e57c7
GH-118844: Fix build failures when combining --disable-gil with --enable-experimental-jit (GH-118935) 2024-05-11 16:19:31 -07:00
Nice Zombies
abead548af
gh-117655: Prevent test_strptime from raising a DeprecationWarning (GH-117668)
* Fix `test_strptime` raises a DeprecationWarning
* Ignore deprecation warnings where appropriate.
* Update Lib/test/datetimetester.py

This is follow on work to silence unnecessary warnings from the test suite that changes for https://github.com/python/cpython/issues/70647 added.
2024-05-11 14:46:07 -07:00
d.grigonis
cd4cfa6ed2
gh-118932: ChainMap.__contains__ performance improvement (gh-118946) 2024-05-11 15:55:23 -05:00