Bénédikt Tran
c19e36cc4e
gh-131316: fix invalid DECREF
in _md5.md5.copy()
( #135291 )
...
This amends commit 261633bd3f48607478f50d12d8025cd4bb36f6f4.
2025-06-09 09:10:32 +00:00
Edward Z. Yang
8441b263af
bpo-45210: Document that error indicator may be set in tp_dealloc ( #28358 )
...
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-06-09 08:56:32 +00:00
Bénédikt Tran
3cb109796d
gh-135004: rewrite and cleanup blake2module.c
( #135006 )
...
* Cleanup imports and update module docstring.
* Simplify detection of SIMD support.
* Correctly guard `update()` cases.
* Rewrite `py_blake2b_or_s_new` and rename it to `py_blake2_new`.
* Rewrite `blake2_blake2b_copy_locked` and `py_blake2_clear`.
* Refactor computations of `digest` and `hexdigest`.
* Simplify `py_blake2b_get_name` and `py_blake2b_get_block_size`.
* Add `hacl_get_blake2_info` to extract static BLAKE-2 information.
This new helper is used by `py_blake2b_get_digest_size`, but can
be later used to expose `key_length` more easily.
2025-06-09 09:17:43 +02:00
Bénédikt Tran
83b94e856e
gh-135234: improve _hashlib
exceptions when reporting an OpenSSL function failure ( #135250 )
...
- Refactor `get_openssl_evp_md_by_utf8name` error branches.
- Refactor `HASH.{digest,hexdigest}` computations.
- Refactor `_hashlib_HASH_copy_locked` and `locked_HMAC_CTX_copy`.
2025-06-09 09:13:29 +02:00
Ezio Melotti
2677dd017a
Use f-strings in csv docs example ( #135245 )
2025-06-08 15:28:37 -07:00
Vladyslav Lazoryk
8d17a412da
gh-135263: Fix typo in token.NAME documentation ( #135275 )
2025-06-08 22:59:26 +03:00
Jason R. Coombs
8d6eb0c262
gh-135276: Refresh zipfile.Path
from zipp 3.23 ( #135277 )
...
Apply changes from zipp 3.23
2025-06-08 19:20:20 +00:00
Alper
aac22ea212
Add compile_commands.json to .gitignore ( #135111 )
2025-06-08 17:55:12 +01:00
Stan Ulbrych
254bdac711
Update tutorial for new "Copy" button ( #135007 )
...
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-06-08 19:33:19 +03:00
Bénédikt Tran
aee45fd03f
gh-134531: refactor _hashlib
logic for handling NIDs and EVP_MDs ( #135254 )
2025-06-08 12:34:57 +00:00
Yongzi Li
158e5162bf
gh-134976: document the exception type that can be raised by s[i]
( #134977 )
2025-06-08 14:28:55 +02:00
LamentXU
1cb7163872
gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 ( #135226 )
...
This aligns with the recommendations of RFC 9562, Section 6.10, paragraph 3 [1].
[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-6.10-3 .
---------
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-08 11:46:16 +00:00
Bénédikt Tran
4372011928
gh-134531: fix _hashlib
clinic directive post GH-134626 ( #135249 )
2025-06-08 07:43:32 +00:00
Jiucheng(Oliver)
bcb6b45cb8
gh-134151 Fix TypeError
in email.utils.decode_params
when sorting RFC 2231 continuations ( #134687 )
...
- Fix sorting logic in `email.utils.decode_params` to handle None values.
- Update tests for RFC 2231 continuation sorting.
2025-06-08 09:13:21 +02:00
Bénédikt Tran
d610f11d21
gh-133579: correctly report C curses errors in _curses_panel
( #134629 )
...
This is a follow-up to ee36db550076e5a9185444ffbc53eaf8157ef04c.
2025-06-08 09:10:52 +02:00
Amit Lavon
8fdbbf8b18
GH-131798: Type-propagate string/list/tuple slices (GH-134671)
2025-06-07 14:08:44 -07:00
Daniel Golding
ac9c3431cc
gh-134876: Add fallback for when process_vm_readv fails with ENOSYS ( #134878 )
2025-06-07 19:32:06 +01:00
Petr Viktorin
24069fbca8
Revert "gh-133390: Support SQL keyword completion for sqlite3 CLI ( #133393 )" temporarily (GH-135232)
...
This reverts commit 62b3d2d443785c4ea5262edb4f9f7040440f9463,
which broke buildbots
2025-06-07 08:56:43 +00:00
Tomas R.
46151648ca
GH-131798: Optimize away type(x) in the JIT when the result is known (GH-135194)
2025-06-06 16:44:43 -07:00
Yuki Kobayashi
f00512db20
Docs: Update PyExc_*
tables in the c-api documentation (GH-131640)
...
Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
2025-06-06 17:51:47 +02:00
Tan Long
62b3d2d443
gh-133390: Support SQL keyword completion for sqlite3 CLI ( #133393 )
2025-06-06 16:52:41 +02:00
Petr Viktorin
b22b964a5c
gh-57089: Note _layout_ in the bitfield docs (GH-134148)
...
Co-authored-by: Meador Inge <meadori@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-06-06 16:51:40 +02:00
Petr Viktorin
1adca08d65
gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174)
...
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2025-06-06 14:08:58 +00:00
Petr Viktorin
e413e26719
gh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (GH-134892)
2025-06-06 15:51:00 +02:00
Jean-Louis GUENEGO
343182853f
feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. ( #135181 )
...
Giving the right example incitates the tutorial readers to do the same in the future.
2025-06-06 15:16:12 +02:00
Rafael Fontenelle
39859fcac5
Fix versionadded directive rendering in c-api/arg.rst ( #135199 )
2025-06-06 14:23:07 +02:00
Victor Stinner
82415acf62
gh-134036: Update test_syntax for gh-133999 ( #135204 )
2025-06-06 12:22:14 +00:00
Victor Stinner
e004cf8fd5
gh-134993: Add os.lstat() to os.supports_dir_fd ( #135188 )
2025-06-06 14:11:49 +02:00
Serhiy Storchaka
6ef06fad84
gh-135120: Add test.support.subTests() (GH-135121)
2025-06-06 13:52:48 +02:00
sobolevn
0d9ccc87a2
gh-134036: Improve error messages for invalid raise
statements ( #134077 )
2025-06-06 01:51:06 +01:00
Weipeng Hong
a7d41e8aab
gh-135155: Added dependencies required for compiling the _zstd module (GH-135156)
2025-06-06 00:44:25 +00:00
Mark Shannon
b90ecea9e6
GH-132554: Fix tier2 FOR_ITER
implementation and optimizations (GH-135137)
2025-06-05 18:53:57 +01:00
Sergey Miryanov
d9cad074d5
gh-134155: fix AttributeError in email._header_value_parser.get_address ( #134194 )
...
Append the defect to defects instead of to the parse tree.
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-06-05 13:28:11 -04:00
Weipeng Hong
1b55e12766
gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
2025-06-05 17:00:07 +01:00
rialbat
8919cb4ad9
gh-135161: Remove redundant NULL check for 'exc' after dereference in ceval.c ( #135162 )
2025-06-05 17:08:48 +02:00
Victor Stinner
9258f3da91
gh-134989: Fix Py_RETURN_NONE in the limited C API (GH-135165)
...
Fix Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE macros in the
limited C API 3.11 and older:
Don't treat Py_None, Py_True and Py_False as immortal.
2025-06-05 14:43:47 +02:00
Emma Smith
4b44b3409a
gh-134938: Add set_pledged_input_size() to ZstdCompressor (GH-135010)
2025-06-05 14:31:49 +03:00
Victor Stinner
3d396ab759
gh-135124: Change stdout errors in regrtest worker process ( #135138 )
...
Set sys.stdout encoder error handler to backslashreplace in regrtest
workers to avoid UnicodeEncodeError when printing a traceback
or any other non-encodable character.
Move the code from the Regrtest class to setup_process().
Call setup_process() earlier, before displaying regrtest headers.
2025-06-05 11:17:03 +02:00
Malcolm Smith
2e1544fd2b
gh-131531: android.py enhancements to support cibuildwheel ( #132870 )
...
Modifies the environment handling and execution arguments of the Android management
script to support the compilation of third-party binaries, and the use of the testbed to
invoke third-party test code.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-06-05 13:46:16 +08:00
mpage
6b77af257c
gh-134889: Fix handling of a few opcodes when optimizing LOAD_FAST
( #134958 )
...
We were incorrectly handling a few opcodes that leave their operands on the stack. Treat all of these conservatively; assume that they always leave operands on the stack.
2025-06-04 16:07:58 -07:00
T. Wouters
e598eecf4c
gh-135144: Add _remote_debugging
to the MSI (legacy) Windows installers. ( #135145 )
...
Add _remote_debugging to the MSI (legacy) installers.
2025-06-04 21:39:00 +02:00
Brett Cannon
a10b321a58
Update the devcontainer image to the latest version (GH-135143)
...
Fixes an issue where the WASI tools were being incorrectly installed under the ARM image.
2025-06-04 17:06:10 +00:00
Terry Jan Reedy
0df15d0d4d
gh-129876: Update IDLE News3.txt to May 2025 ( #135139 )
2025-06-04 11:26:19 -04:00
Victor Stinner
c21113072c
gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API (GH-135021)
2025-06-04 15:07:52 +02:00
Thomas Grainger
40c8be0008
gh-126483: disable warnings filters mutation in concurrent test (GH-132694)
...
The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()`
modified the global warnings filters via `warnings_helper.check_no_resource_warning()`.
Only check for warnings when the context aware warnings feature is enabled, which makes
the warnings filter context-local and thread-safe.
2025-06-04 09:00:25 -04:00
Daniel Hollas
bc00ce941e
gh-135074: Fix exception messages in test.support module (GH-135076)
2025-06-04 14:58:34 +02:00
Furkan Onder
5b3865418c
gh-135108: Fix utmp.h inclusion in posixmodule.c on NetBSD (GH-135109)
2025-06-04 08:51:18 -04:00
Pablo Galindo Salgado
1f51510444
Use a more clear example for the PEP 758 what's new section ( #135118 )
2025-06-04 09:23:08 +00:00
Sam Gross
cc581f32bf
gh-135099: Only wait on _PyOS_SigintEvent()
in main thread (GH-135100)
...
On Windows, the `_PyOS_SigintEvent()` event handle is used to interrupt
the main thread when Ctrl-C is pressed. Previously, we also waited on
the event from other threads, but ignored the result. However, this can
race with interpreter shutdown because the main thread closes the handle
in `_PySignal_Fini` and threads may still be running and using mutexes
during interpreter shtudown.
Only use `_PyOS_SigintEvent()` in the main thread in parking_lot.c, like
we do in other places in the CPython codebase.
2025-06-04 09:35:56 +02:00
Christian Veenhuis
8f778f7bb9
gh-135103: Remove an unused local variable in Lib/code.py (GH-135104)
...
remove unused local variable
2025-06-04 13:57:31 +09:00