Commit Graph

29744 Commits

Author SHA1 Message Date
Rafael Fontenelle 33eeccf6d4
Use pep role instead of url (#121611) 2024-09-17 16:02:14 +03:00
Savannah Ostrowski 14e5bdceff
GH-123945: Update regex for parsing negative numbers that contain underscores (#123970)
---------

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-09-16 23:30:17 -07:00
Rafael Fontenelle 0a32c6959c
GH-103484: Fix permanently redirects reported by linkcheck (GH-124144)
Fix redirects reported by linkcheck, update docs conf.py checks.
2024-09-17 02:53:38 +00:00
Peter Bierma 3b45df03a4
gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (#124078)
Tracing references is not currently thread-safe in the free-threaded build.
2024-09-16 16:03:16 -04:00
Nate Ohlson 44052b5f18
gh-124064: Make warning emitting compiler options opt-in (#124070)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-09-16 20:22:30 +03:00
Russell Keith-Magee ef530ce7c6
gh-123748: Add conditional compilation rules for HACL SIMD256 and SIMD128 on macOS (#123989)
Add conditional compilation rules to allow HACL SIMD256 and SIMD128 to be ignored on the ARM64 pass of universal2 macOS builds.
2024-09-16 12:23:05 +08:00
Hugo van Kemenade ea77973718
Revert "gh-112301: Enable warning emitting options and ignore warnings in CI (#123020)" (#124065) 2024-09-13 22:47:12 +03:00
Wenzel Jakob 74330d992b
gh-100554: Add ``Py_tp_vectorcall`` slot to set ``PyTypeObject.tp_vectorcall`` using the ``PyType_FromSpec`` function family. (#123332) 2024-09-13 17:40:25 +02:00
Benjamin Peterson bb904e063d
closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
Irit Katriel a9594a34c6
gh-124022: Fix bug where class docstring is removed in interactive mode (#124023)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-13 14:06:06 +00:00
Nate Ohlson cfe6074d1f
gh-112301: Enable warning emitting options and ignore warnings in CI (#123020)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-09-13 13:40:04 +00:00
Petr Viktorin 432bf31327
gh-123909: PyType_From*: Disallow metaclasses with custom tp_new (GH-123947) 2024-09-13 13:18:49 +02:00
Yngve Mardal Moe 584cdf8d41
gh-123614: Add save function to turtle.py (#123617) 2024-09-12 21:36:17 -07:00
Jason R. Coombs a47cd21890
gh-123976: Refresh docs around custom providers. (#123977)
* gh-123976: Refresh docs around custom providers.

* Remove excess whitespace.
2024-09-13 02:29:08 +00:00
Miro Hrončok f4e5643df6
gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 (#124028)
pyrepl: Support Del, PgUp, and PgDn on TERM=vt100

From Fedora's /etc/inputrc:

    "\e[5~": history-search-backward
    "\e[6~": history-search-forward
    "\e[3~": delete-char

Fixes https://github.com/python/cpython/issues/124027
2024-09-13 02:07:23 +01:00
Jason R. Coombs a53812df12
gh-123085: Fix issue in inferred caller when resources package has no source (#123102)
gh-123085: Fix issue in inferred caller when resources package has no source.

From importlib_resources 6.4.3 (python/importlib_resources#314).
2024-09-12 19:08:06 +00:00
Sam Gross b2afe2aae4
gh-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` (#123924)
Use a `_PyStackRef` and defer the reference to `f_executable` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.
2024-09-12 12:37:06 -04:00
Anders Kaseorg a362c41bc9
gh-123968: Fix lower bound for `python -m random --float` (#123971) 2024-09-12 16:54:18 +03:00
sobolevn ac918ccad7
gh-123935: Fix typo in `_get_slots` in `dataclasses.py` (#123941) 2024-09-12 10:29:06 +03:00
Jason R. Coombs ba687d9481
gh-121735: Fix module-adjacent references in zip files (#123037)
* gh-116608: Apply style and compatibility changes from importlib_metadata.

* gh-121735: Ensure module-adjacent resources are loadable from a zipfile.

* gh-121735: Allow all modules to be processed by the ZipReader.

* Add blurb

* Remove update-zips script, unneeded.

* Remove unnecessary references to removed static fixtures.

* Remove zipdata fixtures, unused.
2024-09-11 22:33:07 -04:00
Hugo van Kemenade eb169f4027
Update Sphinx Lint and fix unnecessary parentheses in `:func:`s (#123960) 2024-09-11 21:05:15 +03:00
Irit Katriel e07154fd1e
gh-123958: apply docstring removal optimization in ast_opt instead of codegen (#123959) 2024-09-11 17:02:28 +00:00
Serhiy Storchaka a1dbf2ea69
gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)
Now a memoryview object can only be cleared if there are no buffers
that refer it.
2024-09-11 12:05:46 +03:00
adang1345 00ffdf2736
gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918) 2024-09-10 19:52:49 +00:00
Tushar Sadhwani 3597642ed5
gh-122239: Add actual count in unbalanced unpacking error message when possible (#122244) 2024-09-10 16:07:30 +01:00
Victor Stinner fb1b51a58d
gh-123892: Add "_wmi" to sys.stdlib_module_names (#123893) 2024-09-10 09:54:17 +00:00
Serhiy Storchaka c0c2aa7644
gh-122213: Add notes for pickle serialization errors (GH-122214)
This allows to identify the source of the error.
2024-09-09 21:28:55 +03:00
Jérôme Duval 65fcaa38ad
gh-84808: socket.connect_ex: Handle negative errno (GH-122304)
POSIX allows errno to be negative.
Even though all currently supported platforms have non-negative errno,
relying on a quirk like that would make Python less portable.
2024-09-09 14:59:13 +00:00
algonell 9017b95ff2
Fix typos (#123775) 2024-09-09 14:58:26 +02:00
Serhiy Storchaka b2a8c38bb2
gh-122311: Improve and unify pickle errors (GH-122771)
* Raise PicklingError instead of UnicodeEncodeError, ValueError
  and AttributeError in both implementations.
* Chain the original exception to the pickle-specific one as __context__.
* Include the error message of ImportError and some AttributeError in
  the PicklingError error message.
* Unify error messages between Python and C implementations.
* Refer to documented __reduce__ and __newobj__ callables instead of
  internal methods (e.g. save_reduce()) or pickle opcodes (e.g. NEWOBJ).
* Include more details in error messages (what expected, what got).
* Avoid including a potentially long repr of an arbitrary object in
  error messages.
2024-09-09 15:04:51 +03:00
Seth Michael Larson 76a1c5d183
gh-122792: Make IPv4-mapped IPv6 address properties consistent with IPv4 (GH-122793)
Make IPv4-mapped IPv6 address properties consistent with IPv4.
2024-09-07 11:05:58 -07:00
Łukasz Langa 033510e11d
gh-120221: Support KeyboardInterrupt in asyncio REPL (#123795)
This switches the main pyrepl event loop to always be non-blocking so that it
can listen to incoming interruptions from other threads.

This also resolves invalid display of exceptions from other threads
(gh-123178).

This also fixes freezes with pasting and an active input hook.
2024-09-06 21:28:29 +02:00
aorcajo e95984826e
gh-119310: Fix encoding when reading old history file (#121779)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-06 15:40:29 +02:00
neonene 853588e24c
gh-123657: Fix crash and refleak in `decimal.getcontext()` (GH-123703) 2024-09-06 13:15:23 +02:00
Victor Stinner 8311b11800
gh-119034, REPL: Change page up/down keys to search in history (#123607)
Change <page up> and <page down> keys of the Python REPL to history
search forward/backward.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-06 13:15:00 +02:00
Furkan Onder f8f7500168
gh-123718: Fix implicit declaration of 'explicit_memset' for NetBSD 10.0 (#123719)
Fix implicit declaration of 'explicit_memset' for NetBSD 10.0 in Lib_Memzero0.c.
2024-09-06 00:09:04 +00:00
Peter Bierma 84ad264ce6
gh-123275: Support `-Xgil=1` and `PYTHON_GIL=1` on non-free-threaded builds (gh-123276) 2024-09-06 08:53:47 +09:00
nkinnan b5aa271f86
gh-123476: Add support for TCP_QUICKACK socket setting to Windows (#123478)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2024-09-05 22:59:48 +02:00
Savannah Ostrowski 1fbc118c5d
GH-123545: Remove duplicate Py_DECREF when handling _PyOptimizer_Optimize errors (GH-123546) 2024-09-05 10:56:07 -07:00
sobolevn aa1339aaaa
gh-123240: Raise input audit events in the new REPL (#123274) 2024-09-05 17:17:24 +02:00
Zachary Ware 092abc4060
gh-123418: Update macOS installer to use OpenSSL 3.0.15 (#123684) 2024-09-05 14:29:36 +02:00
Petr Viktorin 16be8db6be
gh-123465: Allow Py_RELATIVE_OFFSET for __*offset__ members (GH-123474) 2024-09-05 14:14:05 +02:00
Zachary Ware 1fdfce9452
gh-123418: Update Android build to use OpenSSL 3.0.15 (GH-123685) 2024-09-04 17:42:58 -05:00
Seth Michael Larson 40bdb0deee
gh-123678: Upgrade libexpat 2.6.3 (#123689)
Upgrade libexpat 2.6.3
2024-09-04 12:57:16 -07:00
Zachary Ware 56b00f4705
gh-123418: Update CI to use fresh OpenSSL releases (GH-123675)
Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads
2024-09-04 13:16:53 -05:00
Zachary Ware d2eafe2f48
gh-123418: Update OpenSSL to 3.0.15 on Windows (GH-123673) 2024-09-04 17:08:02 +00:00
Bar Harel a4562fedad
gh-123321: Fix Parser/myreadline.c to prevent a segfault during a multi-threaded race (#123323) 2024-09-04 17:21:30 +02:00
Nice Zombies c530ce1e9d
gh-118710: Make IPv*Address.version & max_prefixlen available on the class (GH-120698) 2024-09-04 15:51:12 +02:00
Victor Stinner 0d6b6e34a2
gh-107954, PEP 741: Add PyInitConfig_AddModule() function (#123668) 2024-09-04 11:41:57 +00:00
Wulian 7bd964dbbe
gh-121423: Improve import time of `socket` (#121424)
Improve import time of `socket` by writing `socket.errorTab`
as a constant and lazy import modules.

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-09-04 12:00:37 +02:00