Commit graph

126492 commits

Author SHA1 Message Date
Bénédikt Tran
5f2ba152a0
gh-131298: eliminate HACL* static libraries for cryptographic modules (GH-132438)
* simplify HACL* build for MD5, SHA1, SHA2 and SHA3 modules

* remove statically linked libraries for HACL* implementation

* is it better now?

* is it better now?

* fixup

* Present HACL* as a static or shared library.

On WASI, extension modules based on HACL* require the HACL*
library to be linked statically. On other platforms, it can
be built dynamically.

* amend whitespace

* remove temporary .so file as it requires more symlinks

* avoid smelly symbols

* fixup checksums

* regen sbom

* fixup shell warnings and comments

* it *should* work
2025-04-20 17:40:17 +00:00
Bénédikt Tran
492e3e6976
gh-129098: avoid using content of _pyrepl/__main__.py when reporting tracebacks (#130721) 2025-04-20 18:24:30 +01:00
Bénédikt Tran
5d8e432d9f
gh-132390: Apply Ruff linting to Tools/build (#132391)
---------

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-04-20 11:21:41 +02:00
Bénédikt Tran
246ed23456
gh-127117: ensure that _initial_thread is the last field of PyInterpreterState when Py_STACKREF_DEBUG is defined (#132721) 2025-04-20 11:53:00 +05:30
Stan Ulbrych
a16586c9e7
gh-129327: revise hashlib documentation to account for FIPS removing sha1 (GH-132729)
* gh-129327: revise hashlib documentation to account for FIPS removing sha1

More generally, the current documentation is a bit scattered, talking
about what terms are "equal" despite those terms not being very
interesting and given the term "secure hash", probably wrong (because
md5 and sha1 are not secure anymore).

Let's talk about cryptographically secure instead, and note that two of
them aren't. And then we can also link to the source for NIST going
through the removal process for SHA1.

* Add Gregors Suggestion

* Clean up

---------

Co-authored-by: Eli Schwartz <eschwartz@gentoo.org>
2025-04-20 01:06:24 +00:00
Tomas R.
71da68d588
gh-131952: Add colour to the `json` module CLI (#132126)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-19 18:11:21 +00:00
Adam Turner
e7c5f60efc
gh-130167: Improve the error case for `textwrap.dedent` (#132666) 2025-04-19 16:18:03 +01:00
Willow Chargin
c821b715b3
Update entry for Willow Chargin in .mailmap and ACKS (#132714) 2025-04-19 14:50:59 +00:00
Stan Ulbrych
e154e4db36
Docs: Fix REPL example in Doc/library/shutil.rst (#132700) 2025-04-19 16:15:00 +02:00
Stan Ulbrych
df85bb37b6
Exclude .mailmap in Codeowners (#132722)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-19 16:34:40 +03:00
Kumar Aditya
5b06d2ceca
gh-127945: add lock held assertions in ctypes arrays (#132720) 2025-04-19 18:27:10 +05:30
Duprat
69cda31261
gh-132308: prevent TracebackException swallowing attributes of a falsey Exception or ExceptionGroup (#132363) 2025-04-19 09:49:18 +00:00
Bénédikt Tran
427e7fc099
gh-132399: ensure correct alignment of PyInterpreterState (#132428) 2025-04-19 11:03:06 +02:00
Bénédikt Tran
8a9c6c4d16
gh-128398: improve error messages when incorrectly using with and async with (#132218)
Improve the error message with a suggestion when an object supporting the synchronous
(resp. asynchronous) context manager protocol is entered using `async with` (resp. `with`)
instead of `with` (resp. `async with`).
2025-04-19 10:44:01 +02:00
Sergey B Kirpichev
95800fe6e7
Correct _PyLong_Frexp() description in comments (GH-132716)
This amends d08c788822, now this function always successful.
2025-04-19 07:42:20 +00:00
Chris Eibl
815061cbab
speedup test_pyrepl (#132688)
speedup test_unix_console.py and test_windows_console.py
2025-04-19 02:12:40 +01:00
Pablo Galindo Salgado
c9a855a9e0
gh-131591: Execute the source and not the file to avoid locking it in Windows (#132712)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2025-04-19 00:38:12 +00:00
Rami
9752c84022
gh-89562: Remove hostflags from PySSLContext (GH-28602)
Remove hostflags from PySSLContext as that was only needed for OpenSSL versions prior to 1.1.1
2025-04-18 15:27:32 -07:00
Jeroen Bogers
ce31ae5209
gh-129719: Restore missing socket.CAN_RAW_ERR_FILTER on Linux (#129721)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-04-18 22:59:37 +03:00
Raymond Hettinger
741c6386b8
Minor doc edit: Make multinomial() the first math example (gh-132697) 2025-04-18 12:41:13 -05:00
Bénédikt Tran
1d5dc5f1c3
gh-132396: Resolve 'redefinition of unused name' errors in `Lib/test/` (#132397)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-18 18:14:54 +01:00
Kumar Aditya
4c3d187d9f
gh-126366: fix thread safety of dict key iterator (#132693) 2025-04-18 21:43:49 +05:30
Kumar Aditya
7fd708b727
gh-132685: fix thread safety of PyMember_GetOne with _Py_T_OBJECT (#132690) 2025-04-18 21:03:42 +05:30
Pieter Eendebak
e77d6784e7
gh-132657: Avoid locking in frozenset.__contains__ (#132659) 2025-04-18 20:20:29 +05:30
sobolevn
678b8e1656
gh-132673: Fix ctypes.Structure with _align_=0 (#132676)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-18 17:32:28 +03:00
Brandt Bucher
40ae88988c
GH-131498: Replace single-element arrays with scalars in bytecodes.c (GH-132615) 2025-04-18 07:16:28 -07:00
Łukasz Langa
a594008d9e
gh-132678: Add --prioritize to regrtest (GH-132679)
This is an option that allows the user to specify, which selected tests should
execute first, even if the order is otherwise randomized.  This is particularly
useful for tests that run the longest.
2025-04-18 15:56:44 +02:00
Pablo Galindo Salgado
d134bd272f
gh-130861: Add clarification to the perf docs on optimization levels (#131098) 2025-04-18 14:42:20 +01:00
Kumar Aditya
b9f0943c1e
gh-127945: skip more tests in ctypes when using parallel threads (#132682) 2025-04-18 13:12:45 +00:00
Pablo Galindo Salgado
2f8b08da47
gh-129958: Properly disallow newlines in format specs in single-quoted f-strings (GH-130063) 2025-04-18 14:30:04 +02:00
Pablo Galindo Salgado
e01e582902
gh-132553: Build the perf tool without buildid cache (GH-132663) 2025-04-18 14:26:59 +02:00
Yuki Kobayashi
7e2672cfcf
gh-132668: Remove outdated description of POP_JUMP_* instructions (#132669) 2025-04-18 14:08:50 +02:00
Bénédikt Tran
2df0f88047
gh-132674: fix _hashopenssl.c compiler warnings on free-threaded build (#132675) 2025-04-18 13:52:17 +02:00
Bénédikt Tran
379352620c
gh-132097: use a macro for semantically casting function pointers (#132406) 2025-04-18 12:24:34 +02:00
Kumar Aditya
f3d877a27a
gh-132643: use atomic load for dict in specializer (#132653) 2025-04-18 15:06:27 +05:30
Chris Eibl
80295a8f9b
GH-131296: fix clang-cl warning on Windows in Objects/longobject.c for 32bit builds (#131604) 2025-04-18 10:45:30 +02:00
Jon Crall
fc0ec29889
gh-103997: Automatically dedent the argument to "-c" (#103998)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-18 17:39:30 +09:00
Bénédikt Tran
50e518e886
gh-132097: allow AC to disable fastcall convention to avoid UBSan failures (#131605) 2025-04-18 10:15:40 +02:00
Adam Turner
ea23c897cd
Remove duplicate includes: Python/importdl.c (#132623) 2025-04-18 02:49:19 +01:00
Alper
22830103e5
gh-131173: Improve exception handling during take_ownership processing (#132620)
Save and restore exceptions during take_ownership processing to preserve
exceptions currently being raised.

Co-authored-by: alperyoney <alperyoney@fb.com>
2025-04-17 13:38:34 -07:00
Ee Durbin
1d529cbc89
Docs: Migrate entirely to PSF hosted plausible for analytics (#132648) 2025-04-17 22:42:40 +03:00
Steve Dower
b87189deae
gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650) 2025-04-17 20:14:00 +01:00
Kumar Aditya
cf59bc3ae7
gh-127945: fix critical sections around ctypes array (#132646) 2025-04-17 18:44:14 +00:00
Tomasz Pytel
a23ed8b379
gh-132284: Don't wrap base PyCFunction slots on class creation if not overridden (#132329) 2025-04-17 18:08:59 +01:00
Jelle Zijlstra
5707837049
gh-132493: Avoid eager import of annotationlib in typing (again) (#132596)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-04-17 16:03:53 +00:00
Sergey Miryanov
e42bda9441
gh-132042: Do not lookup tp_dict each time to speedup class creation (#132619) 2025-04-17 12:04:42 +02:00
Duprat
15c75d7a8b
gh-132561: Fix the public multiprocessing.SemLock.locked method (#132586)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-04-17 11:41:30 +02:00
Sergey B Kirpichev
0c356c865a
gh-101410: Revert loghelper() change in 75f59bb for integer input (GH-132625) 2025-04-17 10:55:00 +03:00
Bartosz Sławecki
954b2cf031
gh-130070: Fix exec(<string>, closure=<non-None>) unexpected path (#130071)
Fixed an assertion error (so, it could be reproduced only in builds with assertions enabled)
for `exec` when the `source` argument is a string and the `closure` argument is not `None`.

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-17 10:14:55 +03:00
Adam Turner
d7df7815f5
Remove duplicate includes: Python/ast_opt.c (#132621) 2025-04-17 10:10:01 +03:00