Petr Viktorin
0c74fc8af0
gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212)
...
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2025-09-05 16:23:18 +02:00
Christoph Walcher
ed53c63769
gh-138401: Check arg count>=0 in os.sendfile() ( #138403 )
...
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-09-05 09:16:55 +00:00
Serhiy Storchaka
482fd0c811
gh-60462: Fix locale.strxfrm() on Solaris (GH-138242)
...
It should interpret the result of wcsxfrm() as a sequence of abstract
integers, not a sequence of Unicode code points or using other encoding
scheme that does not preserve ordering.
2025-09-03 15:49:28 +03:00
Serhiy Storchaka
7274d07607
gh-78502: Add a trackfd parameter to mmap.mmap() on Windows (GH-138238)
...
If trackfd is False, the file handle corresponding to fileno
will not be duplicated.
2025-09-03 11:31:34 +03:00
Serhiy Storchaka
4a33077fdb
gh-138264: Fix gcc 14 compiler warnings (GH-138265)
2025-09-03 11:26:56 +03:00
Bénédikt Tran
572df47840
gh-116946: fully implement GC protocol for _curses_panel.panel ( #138333 )
...
This commit fixes possible reference loops via `panel.set_userptr`
by implementing `tp_clear` and `tp_traverse` for panel objects.
2025-09-03 10:17:17 +02:00
Bénédikt Tran
51244ba16a
gh-116946: add Py_TPFLAGS_IMMUTABLETYPE to _random.Random ( #138341 )
2025-09-03 09:55:53 +02:00
Adam Turner
98b4cd6fe9
GH-135763: AC: Use `Py_ssize_t(allow_negative=False)` ( #138394 )
2025-09-02 21:29:05 +01:00
Zackery Spytz
32032ee376
gh-87595: Support mmap.size() for anonymous mapping on Unix (GH-24781)
...
Previously, the size would be returned on Windows and an OSError would
be raised on Unix.
Also, raise ValueError instead of OSError for trackfd=False.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-09-02 23:24:06 +03:00
Bénédikt Tran
3ff00c76c9
gh-116946: add Py_TPFLAGS_IMMUTABLETYPE to select.poll and select.epoll ( #138340 )
2025-09-02 17:53:44 +00:00
Serhiy Storchaka
33fcb0c4a0
gh-138204: Forbid expansion of a shared anonymous mmap on Linux (GH-138220)
...
This is a Linux kernel bug which caused a bus error.
https://bugzilla.kernel.org/show_bug.cgi?id=8691
2025-09-02 19:00:39 +03:00
jadonduff
c19db1d2b8
gh-138004: Fix setting a thread name on OpenIndiana (GH-138017)
...
Encode Solaris/Illumos thread names to ASCII, since
OpenIndiana does not support non-ASCII names.
Add tests for setting non-ASCII name for the main thread.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-09-02 15:26:25 +00:00
Christoph Walcher
47bc10e6b3
gh-135763: AC: Implement `allow_negative for Py_ssize_t` ( #138150 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-09-01 22:55:22 +01:00
Victor Stinner
aec006be97
gh-135755: Make Py_MAX_SCRIPT_PATH_SIZE private ( #138350 )
2025-09-01 20:01:01 +01:00
Peter Bierma
4f6ecd10c2
gh-138342: Use a common utility for visiting an object's type (GH-138343)
...
Add `_PyObject_VisitType` in place of `tp_traverse` functions that only visit the object's type.
2025-09-01 16:20:33 +00:00
Bénédikt Tran
c9b252c2c0
gh-116946: Revert GC protocol for immutable empty heap types (GH-138266, GH-138288, GH-138289) ( #138338 )
...
* Revert "gh-116946: fully implement GC protocol for `bz2` objects (#138266 )"
This reverts commit 9be91f6a20 .
* Revert "gh-116946: fully implement GC protocol for `lzma` objects (#138288 )"
This reverts commit 3ea16f990f .
* Revert "gh-116946: fully implement GC protocol for `_hashlib` objects (#138289 )"
This reverts commit 6f1dd9551a .
2025-09-01 21:15:11 +05:30
Bénédikt Tran
2a54acf3c3
gh-116946: fully implement GC protocol for zlib objects ( #138290 )
2025-09-01 10:24:23 +02:00
Bénédikt Tran
6f1dd9551a
gh-116946: fully implement GC protocol for _hashlib objects ( #138289 )
2025-09-01 10:23:01 +02:00
Bénédikt Tran
3ea16f990f
gh-116946: fully implement GC protocol for lzma objects ( #138288 )
2025-09-01 10:22:43 +02:00
Bénédikt Tran
9be91f6a20
gh-116946: fully implement GC protocol for bz2 objects ( #138266 )
2025-09-01 10:21:39 +02:00
Pieter Eendebak
43573028c6
gh-116738: Make _json module thread-safe in the free-threading ( #119438 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-31 09:42:45 +05:30
Ron Frederick
bacb7771fb
gh-137197: Add SSLContext.set_ciphersuites to set TLSv1.3 ciphers ( #137198 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-08-30 09:32:11 +00:00
Sergey B Kirpichev
ef4dd1d655
gh-73487: Convert _decimal to use Argument Clinic (part 6) (GH-138015)
2025-08-28 12:36:00 +02:00
Jakub Kulík
bbcb75c986
bpo-41839: Fix error checking in sched_get_priority_ functions (GH-22374)
2025-08-27 20:41:14 +03:00
Rani Pinchuk
fd8f42d3d1
gh-135427: Fix DeprecationWarning for os.fork when run in threads with -Werror (GH-136796)
...
Don't ignore errors raised by `PyErr_WarnFormat` in `warn_about_fork_with_threads`
Instead, ignore the warnings in all test code that forks. (That's a lot of functions.)
In `test_support`, make `ignore_warnings` a context manager (as well as decorator),
and add a `message` argument to it.
Also add a `ignore_fork_in_thread_deprecation_warnings` helper for the deadlock-in-fork
warning.
2025-08-26 15:33:21 +02:00
Serhiy Storchaka
aa1dbd4dde
gh-137986: Fix and improve the csv functions docstrings (GH-137987)
...
The csv.register_dialect() docstring no longer imply that it returns a
dialect.
All functions have now signatures.
Co-authored-by: maurycy <5383+maurycy@users.noreply.github.com>
2025-08-24 11:13:31 +03:00
Bénédikt Tran
e545bae55a
gh-134531: simplify code for computing HMAC digests ( #138046 )
2025-08-22 09:19:04 +00:00
vict-Yang
ce70a57bc0
gh-137920: Fix semantically relevant typo in curses.window.attron ( #137940 )
2025-08-22 10:27:02 +02:00
Sergey B Kirpichev
bb8791c0b7
gh-73487: Convert `_decimal` to use Argument Clinic (part 5) ( #137948 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-21 23:12:17 +01:00
Adam Turner
79aeeb880e
GH-132775: Fix argument parsing for `_interpqueues.put()` ( #137686 )
2025-08-22 00:00:58 +02:00
Sergey B Kirpichev
c056a089d8
gh-73487: Convert `_decimal` to use Argument Clinic (part 4) ( #137931 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-20 22:59:40 +01:00
Steve Dower
7d06a0af17
gh-120037: Disable user site packages when a ._pth file is used (GH-137428)
2025-08-19 21:28:28 +01:00
Petr Viktorin
719e5c3f71
gh-123681: Check NORMALIZE_CENTURY behavior at runtime; require C99 (GH-136022)
...
A runtime check is needed to support cross-compiling.
Remove the _Py_NORMALIZE_CENTURY macro.
Remove _pydatetime.py's _can_support_c99.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-19 12:59:03 +02:00
Adam Turner
bb75dec87f
gh-95534: Convert `ZlibDecompressor.__new__` to AC ( #137923 )
2025-08-19 09:52:13 +01:00
Sergey B Kirpichev
9cb91305ab
gh-73487: Convert `_decimal` to use Argument Clinic (part 3) ( #137844 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-19 09:20:06 +01:00
Serhiy Storchaka
6e2b9a2130
gh-137512: Add new constants in the resource module (GH-137513)
...
* RLIMIT_NTHR
* RLIMIT_THREADS
* RLIMIT_UMTXP
* RLIM_SAVED_CUR
* RLIM_SAVED_MAX
* Document RLIMIT_PIPEBUF. Other doc fixes.
2025-08-19 08:52:45 +02:00
Adam Turner
918e3ba6c0
GH-137623: Use an AC decorator for docstring line length enforcement ( #137690 )
2025-08-18 18:29:00 +01:00
Serhiy Storchaka
0324c726de
gh-137044: Make resource.RLIM_INFINITY always positive (GH-137511)
...
It is now a positive integer larger larger than any limited resource value.
This simplifies comparison of the resource values.
Previously, it could be negative, such as -1 or -3, depending on platform.
Deprecation warning is emitted if the old negative value is passed.
2025-08-18 19:28:56 +03:00
Sergey B Kirpichev
83387e033d
gh-73487: Convert `_decimal` to use Argument Clinic (part 2) ( #137637 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-18 14:21:00 +01:00
Victor Stinner
5c0231c27a
gh-137725: Convert faulthandler to Argument Clinic ( #137726 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-16 15:16:04 +02:00
Kumar Aditya
31bbea1477
gh-137808: use argument clinic for _thread.lock and _thread.RLock ( #137809 )
2025-08-15 13:58:10 +00:00
Justin Applegate
781294019d
gh-135241: Make unpickling of booleans in protocol 0 more strict (GH-135242)
...
The Python pickle module looks for "00" and "01" but _pickle only looked
for 2 characters that parsed to 0 or 1, meaning some payloads like "+0" or
" 0" would lead to different results in different implementations.
2025-08-14 22:22:37 +03:00
Zachary Ware
7a703c8f19
gh-132339: Add support for OpenSSL 3.5 (GH-137720)
...
* Add OpenSSL 3.5.2 definitions to Modules/_ssl_data_35.h (moved from Modules/_ssl_data_34.h)
* Demote OpenSSL 3.1 to "old", remove it from CI
* Update all OpenSSL versions to latest patchlevel in CI config and multissltests defaults
* Add OpenSSL 3.5.2 to CI configuration and multissltests default list
* Fix a typo in the argument parser description of multissltests.py
2025-08-13 23:18:03 -05:00
Sergey B Kirpichev
70730ad041
gh-73487: Convert _decimal to use Argument Clinic (part 1) ( #137606 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-08-13 14:41:57 +02:00
Adam Turner
797c2c33e1
GH-137630: Argument Clinic: Reduce use of 'as' for renaming in `_interpretersmodule.c` ( #137680 )
2025-08-12 23:28:38 +01:00
Adam Turner
6baf552484
GH-137623: Begin enforcing docstring length in Argument Clinic ( #137624 )
2025-08-12 20:17:35 +00:00
Adam Turner
be56464c4b
GH-137630: Convert `_interpreters` to use Argument Clinic ( #137631 )
2025-08-12 16:23:13 +01:00
László Kiss Kollár
4497ad409e
gh-135953: Profile a module or script with sampling profiler ( #136777 )
2025-08-11 12:36:43 +01:00
Peter Bierma
55788a9096
gh-137583: Only lock the SSL context, not the SSL socket (GH-137588)
...
Fixes a deadlock in 3.13.6.
2025-08-10 14:47:11 +00:00
Serhiy Storchaka
046a4e39b3
gh-136571: Convert more code in datetime to Argument Clinic (GH-136573)
...
This adds signatures for some classes and methods.
date.fromisocalendar() can now raise OverflowError for arguments that
don't fit in the C int.
2025-08-09 18:25:49 +00:00