Commit Graph

123667 Commits

Author SHA1 Message Date
Irit Katriel 1a9d8917a3
gh-121404: split compile.c into compile.c and codegen.c (#123651) 2024-09-09 18:21:51 +01: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
Eric Snow d8f3c1e8f9
gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (GH-122865)
In gh-121602, I applied a fix to a builtin types initialization bug.
That fix made sense in the context of some broader future changes,
but introduced a little bit of extra complexity. That fix has turned
out to be incomplete for some of the builtin types we haven't
been testing. I found that out while improving the tests.

A while back, @markshannon suggested a simpler fix that doesn't
have that problem, which I've already applied to 3.12 and 3.13.
I'm switching to that here. Given the potential long-term
benefits of the more complex (but still incomplete) approach,
I'll circle back to it in the future, particularly after I've improved
the tests so no corner cases slip through the cracks.

(This is effectively a "forward-port" of 716c677 from 3.13.)
2024-09-09 16:04:58 +02:00
sobolevn b950831c94
Mention `curl` in `contextvars` docs (#123838) 2024-09-09 16:58:49 +03:00
algonell 9017b95ff2
Fix typos (#123775) 2024-09-09 14:58:26 +02:00
Furkan Onder df4f0cbfad
gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (#123824)
Fix test_posix for unsupported posix_fallocate on NetBSD.
2024-09-09 14:14:23 +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
Bénédikt Tran 32bc2d6141
gh-123834: Add `symtable` to the list of modules with a CLI (#123835) 2024-09-09 13:45:43 +02:00
Bénédikt Tran 05a401a5c3
chore: decimal module macro cleanup (#123791)
* protect macros expansion via `do { ... } while (0)` constructions in `_decimal.c`

* Use public macro `Py_UNUSED`

This replaces the usages of the `UNUSED` macro which
was not consistent with the `Py_UNUSED` macro itself.

In addition, this amends the parameter names so that
they match their semantic meanings.

* Remove redundant `PyCFunction` casts
2024-09-09 11:24:24 +02:00
Adam Turner 93b61bc124
gh-123843: Remove broken links to the Zope DateTimeWiki (#123846)
Co-authored-by: Conrad Bhuiyan-Volkoff <hi@cbv.im>
2024-09-08 22:39:23 -04:00
Donghee Na aa3f11f80a
gh-108219: Add credits to the free-threading entry in What's New (#123802)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Itamar Oren <itamarost@gmail.com>
2024-09-08 21:20:15 +01:00
Sergey B Kirpichev 8ef8354ef1
gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071) 2024-09-08 16:01:54 +03:00
Wulian beee91cdcc
gh-123789: `secrets.randbits` returns only non-negative int (#123801) 2024-09-07 21:17:59 -07:00
Carol Willing 11fa119879
Add willingc to CODEOWNERS for Lang Reference Doc (#123812) 2024-09-07 21:46:56 +03:00
Wei-Hsiang (Matt) Wang 93050e4614
Remove excessive backticks in logging doc (#123813) 2024-09-07 18:09:02 +00: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
Sam Gross 0c080d7c77
gh-123321: Make Parser/myreadline.c locking safe in free-threaded build (#123690)
Use a `PyMutex` to avoid the race in mutex initialization. Use relaxed
atomics to avoid the data race on reading `_PyOS_ReadlineTState` when
checking for re-entrant calls.
2024-09-06 15:07:08 -04:00
Nadeshiko Manju 8a46a2ec50
gh-117657: Fix file descriptor race in test_socket.py (#123697) 2024-09-06 15:00:28 -04:00
Nathan Goldbaum 5a4fb7ea1c
gh-109975: Add links to py-free-threading.github.io (#123776)
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-09-06 20:12:12 +03:00
Stanislav Terliakov 56e4a417ce
gh-123523: Rework typing documentation for generators and coroutines, and link to it from `collections.abc` docs (#123544) 2024-09-06 17:41:06 +01:00
Victor Stinner d343f977ba
gh-121645: Fix typo in PyBytes_Join() doc (#123783) 2024-09-06 16:08:17 +02:00
Victor Stinner ef4b69d2be
gh-123747: Avoid static_assert() in internal header files (#123779) 2024-09-06 15:52:07 +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
Malcolm Smith eca3fe40c2
gh-123780: Make test_pkgutil clean up `spam` module (GH-123036) 2024-09-06 15:23:55 +02:00
Jay Aljelo Ting 782a076362
Fix typo in error message misspelling __slotnames__ (GH-115772) 2024-09-06 13:50:55 +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
Arnon Yaari d683f49a7b
gh-111201: fix auto-indent in pyrepl for muliple pound comments (#123196) 2024-09-06 07:33:40 +00:00
David Caron 67957ea77d
gh-103066: Add links and `help` in site.py constants (#103777)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-06 10:29:28 +03:00
Russell Keith-Magee d359c7c47b
Ensure clang++ is autodetected on iOS. (gh-123749) 2024-09-05 21:36:01 -04:00
Peter Bierma fe24b718d2
gh-123275: Add tests for `PYTHON_GIL=1` and `-Xgil=1` (gh-123754) 2024-09-06 01:15:30 +00: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
Furkan Onder 42f52431e9
gh-123716: Fix 'Bad substitution' syntax error in configure script for NetBSD compatibility (#123717) 2024-09-05 23:49:12 +00: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
Rafael Fontenelle 6e43928831
Swap the and from in sentence in init_config.rst (#120086) 2024-09-05 23:04:15 +03:00
edson duarte 9aea9c100f
gh-85453: Improve instance attributes mark up on datetime.rst (#123655)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-05 20:56:52 +03: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
Pieter Eendebak 327463aef1
gh-123207: Clarify the documentation for the mro lookup for super() (GH-123417) 2024-09-05 15:52:04 +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
Petr Viktorin ce9f84a47b
gh-97588: Move ctypes struct/union layout logic to Python (GH-123352)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-05 11:20:07 +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 d83e30cadd
gh-123700: Update OpenSSL versions in multissltests and CI (#123701)
Remove EOL 1.1.1w from CI and move it to the 'old' set in multissltests,
add latest 3.3.2 to both CI and multissltests.
2024-09-04 14:29:41 -05: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