Commit graph

30241 commits

Author SHA1 Message Date
Erlend E. Aasland
8abd6cef68
gh-115765: Upgrade to GNU Autoconf 2.72 (#128411) 2025-01-03 11:37:54 +00:00
jb2170
830e10651b
gh-127529: Correct asyncio's accept_connection behaviour for handling ConnectionAbortedError (#127532)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-03 10:32:36 +00:00
Zanie Blue
bb2dfadb92
gh-128104: Remove Py_STRFTIME_C99_SUPPORT; require C99-compliant strftime (#128106) 2025-01-03 11:04:03 +01:00
Peter Bierma
c9356feef2
gh-128400: Stop-the-world when manually calling faulthandler (GH-128422) 2025-01-02 13:56:01 -05:00
Zhikang Yan
58e9f95c4a
gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-01-02 17:51:57 +02:00
Sebastian Pipping
8e48a6edc7
gh-126624: Expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4 (#126625)
Expose error code ``XML_ERROR_NOT_STARTED`` in `xml.parsers.expat.errors` which was
introduced in Expat 2.6.4.


Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-02 14:54:38 +02:00
Serhiy Storchaka
a3711d1541
gh-124130: Fix a bug in matching regular expression \B in empty string (GH-127007) 2025-01-02 12:11:21 +00:00
Serhiy Storchaka
8d16919a06
gh-123925: Fix building curses on platforms without libncursesw (GH-128405) 2025-01-02 13:38:21 +02:00
Shin-myoung-serp
e1baa778f6
gh-95371: Add support for other image formats(e.g. PNG) to the turtle… (#95378)
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>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2025-01-02 11:45:07 +02:00
Kirill Podoprigora
d903b17499
gh-121676: Raise a `DeprecationWarning if the Python implementation of functools.reduce is called with function or sequence` as a keyword args (#121677)
Python implementation of `functools` allows calling `reduce`
with `function` or `sequence` as keyword args. This doesn't
match behavior of our C accelerator and our documentation
for `functools.reduce` states that `function`and `sequence`
are positional-only arguments.

Now calling a Python implementation of `functools.reduce`
with `function` or `sequence` as keyword args would raise
a `DeprecationWarning` and is planned to be prohibited in
Python 3.16.


Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-01 13:36:47 +02:00
Serhiy Storchaka
b2ac70a62a
gh-88834: Unify the instance check for typing.Union and types.UnionType (GH-128363)
Union now uses the instance checks against its parameters instead of
the subclass checks.
2024-12-31 10:02:58 +02:00
Pieter Eendebak
34b85ef26c
gh-128118: Speed up copy.copy with fast lookup for atomic and container types (#128119) 2024-12-30 18:18:42 +01:00
Zanie Blue
81376fef76
gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (#128322)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-12-30 09:55:14 +01:00
Bénédikt Tran
7e819ce0f3
gh-123424: add ZipInfo._for_archive to set suitable default properties (#123429)
---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-12-29 18:30:53 +00:00
Calvin Bui
f9a5a3a3ef
gh-128192: support HTTP sha-256 digest authentication as per RFC-7617 (GH-128193)
support sha-256 digest authentication

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-12-28 21:05:34 +00:00
Stephen Hansen
aeb9b65aa2
gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011)
Correct pthread_sigmask in resource_tracker to restore old signals

Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally
cause side effects if the calling parent already had said signals
blocked to begin with and did not intend to unblock them when
creating a pool. Use SIG_SETMASK instead with the previous mask of
blocked signals to restore the original blocked set.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-12-27 14:09:01 -08:00
CF Bolz-Tereick
401bba6b58
gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537) 2024-12-26 17:03:47 -08:00
Pieter Eendebak
3bd7730bbd
gh-126868: Add freelist for compact ints to _PyLong_New (#128181)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-12-26 15:17:22 +00:00
Thomas Grainger
9ddc388527
gh-124761: add socket.SO_REUSEPORT_LB (#124961) 2024-12-26 20:20:20 +05:30
Will Childs-Klein
418114c139
gh-128035: Add ssl.HAS_PHA to detect libssl PHA support (GH-128036)
* Add ssl.HAS_PHA to detect libssl Post-Handshake-Auth support

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-12-24 18:29:27 +00:00
Dima Ryazanov
7ed6c5c696
gh-127847: Fix position in the special-cased zipfile seek (#127856)
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-12-24 15:56:42 +00:00
T. Wouters
180d417e9f
gh-114203: Optimise simple recursive critical sections (#128126)
Add a fast path to (single-mutex) critical section locking _iff_ the mutex
is already held by the currently active, top-most critical section of this
thread. This can matter a lot for indirectly recursive critical sections
without intervening critical sections.
2024-12-23 13:31:33 +01:00
Alyssa Coghlan
831b6de6d7
gh-126180: Remove getopt and optparse deprecation notices (GH-126227)
* Remove getopt and optparse deprecation notices
* Add new docs sections for command line app helper libraries
* Add guidance on choosing a CLI parsing library to the optparse docs
* Link to the new guidance from the argparse and getopt docs
* Reword intro in docs section for superseded stdlib modules
* Reframe the optparse->argparse guide as a migration guide
  rather than as an upgrade guide

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-12-23 14:17:19 +10:00
Zanie Blue
9d3a8f4949
gh-100384: Error on unguarded-availability in macOS builds (#128155)
Generate a build error on ``unguarded-availability`` in portable macOS builds (i.e. using MACOSX_DEPLOYMENT_TARGET), preventing invalid use of symbols that are not available in older versions of the OS.
2024-12-22 11:01:45 -08:00
Petr Viktorin
2a66dd33df
gh-112328: Make EnumDict usable on its own and document it (GH-123669)
Co-authored-by: Rafi <rafi.promit@gmail.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-12-20 11:40:58 -08:00
Nico-Posada
3879ca0100
gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function (#128079) 2024-12-20 19:20:31 +00:00
Mark Shannon
128cc47fbd
GH-127705: Add debug mode for _PyStackRefs inspired by HPy debug mode (GH-128121) 2024-12-20 16:52:20 +00:00
Peter Bierma
ba45e5cdd4
gh-127946: Use a critical section for CFuncPtr attributes (GH-128109) 2024-12-20 14:02:46 +01:00
Shantanu
45e6dd63b8
gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (#128047)
I missed the extra `PyModule_Check` in #127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in #112661.
2024-12-20 00:22:26 -08:00
mpage
255762c09f
gh-127274: Defer nested methods (#128012)
Methods (functions defined in class scope) are likely to be cleaned
up by the GC anyway.

Add a new code flag, `CO_METHOD`, that is set for functions defined
in a class scope. Use that when deciding to defer functions.
2024-12-19 13:03:14 -08:00
Zhikang Yan
e163e8d4e1
gh-128062: Fix the font size and shortcut display of the turtledemo menu (#128063)
Leave the font of the menu bar the default to keep it consistent with the rest of the world. Display the shortcut keys in the right way, using the 'accelerator' option.
---------

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-12-19 15:24:47 -05:00
Mark Shannon
d2f1d917e8
GH-122548: Implement branch taken and not taken events for sys.monitoring (GH-122564) 2024-12-19 16:59:51 +00:00
Sam Gross
7b811d0562
gh-128008: Add PyWeakref_IsDead() (GH-128009)
The `PyWeakref_IsDead()` function tests if a weak reference is dead
without any side effects. Although you can also detect if a weak
reference is dead using `PyWeakref_GetRef()`, that function returns a
strong reference that must be `Py_DECREF()`'d, which can introduce side
effects if the last reference is concurrently dropped (at least in the
free threading build).
2024-12-19 16:17:15 +01:00
Pieter Eendebak
b9b3e4a076
gh-127951: Add build option to enable pystats on Windows (GH-127952) 2024-12-19 14:45:34 +00:00
RUANG (James Roy)
ea578fc6d3
gh-127688: Add SCHED_DEADLINE and SCHED_NORMAL constants to os module (GH-127689) 2024-12-19 14:51:21 +01:00
Thomas Grainger
bad3cdefa8
gh-126639: Add ResourceWarning to NamedTemporaryFile (#126677)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-12-18 10:12:24 +00:00
Bénédikt Tran
2610bccfdf
gh-126742: add NEWS entry for fix of localized error messages (GH-128025) 2024-12-18 09:59:37 +01:00
aeiouaeiouaeiouaeiouaeiouaeiou
329165639f
gh-127897: fix HACL* build on macOS/Catalina (GH-127932)
gh-127897: Update HACL* module from upstream sources to get:

- Lib_Memzero0.c: don't use memset_s() on macOS <10.9
- Use _mm_malloc() for KRML_ALIGNED_MALLOC on macOS <10.15
- Add LEGACY_MACOS macros, use _mm_free() for KRML_ALIGNED_FREE on macOS <10.15
2024-12-17 22:14:16 -08:00
Victor Stinner
559b0e7013
gh-127060: Disable traceback colors in IDLE (#128028)
Set TERM environment variable to "dumb" to disable traceback colors
in IDLE, since IDLE doesn't understand ANSI escape sequences.
2024-12-18 00:35:05 -05:00
Hugo van Kemenade
401bfc69d1 Python 3.14.0a3 2024-12-17 11:50:39 +02:00
Peter Bierma
3b766824fe
gh-126907: make atexit thread safe in free-threading (#127935)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-12-16 19:31:44 +00:00
Edward Xu
4937ba54c0
gh-127085: fix some data races in memoryview in free-threading (#127412) 2024-12-17 00:42:19 +05:30
Hugo van Kemenade
1d276ec6f8
Revert "gh-127586: properly restore blocked signals in resource_tracker.py (GH-127587)" (#127983)
This reverts commit 46006a1b35.
2024-12-16 20:18:02 +02:00
Yuki Kobayashi
52d552cda7
gh-127896: Add missing documentation of PySequence_In (GH-127979)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-12-16 14:56:04 +01:00
Stephen Hansen
46006a1b35
gh-127586: properly restore blocked signals in resource_tracker.py (GH-127587)
* Correct pthread_sigmask in resource_tracker to restore old signals

Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally
cause side effects if the calling parent already had said signals
blocked to begin with and did not intend to unblock them when
creating a pool. Use SIG_SETMASK instead with the previous mask of
blocked signals to restore the original blocked set.

* Adding resource_tracker blocked signals test

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-12-15 11:53:22 -08:00
Ed Nutting
ab05beb8ce
gh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC (#127717)
Previously, `_Py_RefcntAdd` hasn't called 
`_Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC` which is incorrect. 

Now it has been fixed.
2024-12-15 15:51:03 +02:00
Andrey Efremov
0ac40acec0
gh-127353: Allow to force color output on Windows V2 (#127926) 2024-12-14 17:25:49 +02:00
Bénédikt Tran
8bc18182a7
gh-127691: add type checks when using PyUnicodeError objects (GH-127694) 2024-12-13 17:16:22 +01:00
Victor Stinner
6446408d42
gh-102471, PEP 757: Add PyLong import and export API (#121339)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-12-13 14:24:48 +01:00
Victor Stinner
d05a4e6a0d
gh-127906: Test the limited C API in test_cppext (#127916) 2024-12-13 13:23:20 +00:00