Commit graph

125443 commits

Author SHA1 Message Date
s-hamann
d7672e5d5a
gh-127712: Fix secure argument of logging.handlers.SMTPHandler (GH-127726)
GH-127712: Fix `secure` argument of `logging.handlers.SMTPHandler`

Python 3.12 removed support for the `keyfile` and `certfile` parameters
in `smtplib.SMTP.starttls()`, requiring a `ssl.SSLContext` instead.
`SMTPHandler` now creates a context from the `secure` tuple and passes
that to `starttls`.
2025-02-10 12:34:27 +00:00
Kumar Aditya
94cd2e0dde
gh-129289: fix crash when task finalizer is not called in asyncio (#129840) 2025-02-10 17:03:59 +05:30
Vinay Sajip
7c156a63d3
gh-129143: Fix incorrect documentation for logging.Handler.close(). (GH-129950) 2025-02-10 11:13:52 +00:00
Stéphane Bidoul
b8f7bddd6c
gh-129583: update bundled pip to 25.0.1 (#129909)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-02-10 12:21:04 +02:00
Bénédikt Tran
a1a6df282d
gh-111178: fix UBSan failures in Modules/_dbmmodule.c (#129775)
This fixes UBSan failures for `dbmobject`.

In addition, we perform some minor cleanup changes such as renaming
some `args` parameter to `dummy` in some `METH_NOARGS` methods and
suppressing an unused return value in `_dbm_module_free`.
2025-02-10 11:02:47 +01:00
Peter Marko
978211c8a8
gh-126554: correct detection of gcc for TestNullDlsym.test_null_dlsym (GH-129872)
In case gcc is not available, the test will fail with FileNotFoundError.
So catch the exception to skip the test correctly.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
2025-02-10 10:51:56 +01:00
Kumar Aditya
bff4bfeae1
gh-128002: add fast path for native tasks in asyncio.all_tasks (#129943) 2025-02-10 15:04:33 +05:30
Kumar Aditya
7246b9124c
gh-128002: simplify asyncio.all_tasks to use PyList_Extend instead of manual iteration (#129942) 2025-02-10 14:26:32 +05:30
Victorien
2abb6a4f13
Fix typo in 3.14 pdb whatsnew entry (#129886) 2025-02-09 22:17:05 -08:00
Stan Ulbrych
d9bf3c16e5
gh-68400: Remove outdated 2.7 comment (#129919) 2025-02-09 23:53:32 -05:00
Erlend E. Aasland
7e6ee50b6b
gh-129603: Don't segfault if sqlite3.Row description is None (#129604) 2025-02-10 00:27:28 +01:00
Victorien
d05053a203
Fix typo in enum documentation (#129920) 2025-02-09 21:48:11 +00:00
Erlend E. Aasland
cda83cade0
gh-129870: Skip test_dump_virtual_tables if SQLite lacks FTS4 support (#129913) 2025-02-09 21:43:23 +01:00
Yan Yanchii
91d9544112
gh-126835: Make CFG optimizer skip over NOP's when looking for const sequence construction (#129703)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-02-09 18:00:41 +00:00
Ken Jin
8f9c6fa077
Trigger tail call CI on more files (GH-129906) 2025-02-10 00:52:58 +08:00
Nikola Savic
c53730171f
gh-129892: Doc: Remove unnecessary role directive in graphlib.py (#129896)
Change `:exec:ValueError` to `ValueError` in `TopologicalSorter.done()` docstring
2025-02-09 18:22:57 +03:00
Kumar Aditya
f7c7decc4c
gh-129874: improve test_events to use correct task implementation (#129891) 2025-02-09 18:36:16 +05:30
Kumar Aditya
ce0cf7a73a
gh-129874: improve test_tasks in asyncio to use correct internal functions (#129890) 2025-02-09 13:02:11 +00:00
Kumar Aditya
09fe550ecc
gh-129874: improve asyncio tests to use correct internal functions (#129887) 2025-02-09 12:05:39 +00:00
Barney Gale
c88dacb391
GH-125413: Move pathlib.Path.copy() implementation alongside Path.info (#129856)
Move pathlib's private `CopyReader`, `LocalCopyReader`, `CopyWriter` and
`LocalCopyWriter` classes into `pathlib._os`, where they can live alongside
the low-level copying functions (`copyfileobj()` etc) and high-level path
querying interface (`PathInfo`).

This sets the stage for merging `LocalCopyReader` into `PathInfo`.

No change of behaviour; just moving some code around.
2025-02-09 12:05:23 +00:00
Kumar Aditya
d5796e64e0
gh-129874: avoid mixing pure python and C implementation of asyncio (#129875) 2025-02-09 15:57:00 +05:30
Stan Ulbrych
6fbf15f98e
gh-129873: IDLE: Improve help.py's method of parsing HTML (#129859)
In `help.copy_strip`, only copy the text `<section>`.  In `help.HelpParser.handle_starttag` and elsewhere, remove code to skip the no longer present html.  Add a reminder at the top of idle.rst to run copy_strip after changes.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-09 08:17:35 +00:00
Terry Jan Reedy
0d9c4e260d
gh-129876: Initial 3.14 News3.txt entries (#129881) 2025-02-09 07:24:34 +00:00
Terry Jan Reedy
f72977b2f4
gh-112953: Update news to finish 3.13 as main (#129877)
Entry for patch to 3.13.rc3
2025-02-09 06:13:43 +00:00
Tian Gao
29f8a67ae0
Provide curframe_locals for backward compatibility but deprecate it (#125951) 2025-02-08 23:35:28 +00:00
Sam Gross
c1f352bf08
gh-128657: Run test_hashlib with --parallel-threads (GH-129833)
* gh-128657: Run test_hashlib with `--parallel-threads`

This catches the race in `py_digest_by_name` that is fixed separately
in gh-128886.

* Adjust assertion order
2025-02-08 12:12:21 -08:00
Gregory P. Smith
5ce70ad129
gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (#129866)
mention AF_INET6 and IPv6 in socketserver docs.
2025-02-08 12:06:28 -08:00
Ned Batchelder
f2ae79d29e
Docs: more explanation of the implications of new tail-call interpreter (GH-129863)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-02-08 19:28:35 +00:00
Stan Ulbrych
33a7094aa6
gh-129699: Add description to IDLE doc title (#129727)
Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-08 14:26:07 -05:00
Hugo van Kemenade
1bccd6c34f
gh-128317: Move CLI calendar highlighting to private class (#129625)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-08 15:56:57 +00:00
Bénédikt Tran
a56ead089c
gh-129173: Use _PyUnicodeError_GetParams in PyCodec_NameReplaceErrors (GH-129135) 2025-02-08 16:01:57 +01:00
Erlend E. Aasland
167cf3ace0
gh-115806: Don't mangle gdbm header dependency detection output (#129390)
Replace AC_CACHE_VAL/AC_CHECK_HEADER with a cleaner variant using
AC_CACHE_CHECK/AC_PREPROC_IFELSE.

The former would produce garbled output when config.cache was reused. It
also required directly manipulating GNU Autoconf cache variables.
2025-02-08 15:38:11 +01:00
Bénédikt Tran
d046421f4e
gh-111178: fix UBSan failures in Objects/frameobject.c (GH-129777)
fix UBSan failures for `PyFrameObject`, `PyFrameLocalsProxyObject`
2025-02-08 14:54:34 +01:00
Bénédikt Tran
12e1d3011b
gh-111178: fix UBSan failures in Objects/floatobject.c (GH-129776)
fix UBSan failures for `PyFloatObject`
2025-02-08 14:47:19 +01:00
Bénédikt Tran
624b93ed67
gh-111178: fix UBSan failures in Modules/arraymodule.c (GH-129772)
* fix UBSan failures for `arrayobject`, `arrayiterobject`
* suppress unused return values
2025-02-08 14:26:14 +01:00
Bénédikt Tran
1988003625
gh-111178: fix UBSan failures in Modules/_io/*.c (GH-129083)
* fix UBSan failures for `buffered`, `rwpair`, `bytesio`, `bytesiobuf`, `iobase`, `stringio`, `nldecoder_object`, `textio`, `winconsoleio`

* arg names: use 'dummy' for NOARGS method and 'args' for others
2025-02-08 14:21:32 +01:00
Brian Ward
421ea1291d
gh-119349: Add ctypes.util.dllist -- list loaded shared libraries (GH-122946)
Add function to list the currently loaded libraries to ctypes.util

The dllist() function calls platform-specific APIs in order to
list the runtime libraries loaded by Python and any imported modules.
On unsupported platforms the function may be missing.


Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-08 14:02:36 +01:00
Stan Ulbrych
0f128b9435
gh-129842: warnings.py: Remove obsolete requirement reference (GH-129845) 2025-02-08 13:57:17 +01:00
Diego Russo
80b9e79d84
Use ubuntu-22.04-arm image for Arm runners. (#129834)
GitHub suggested us to try the 22.04 images for the Arm runners while
they are invetigating the failures we've been having using 24.04.
2025-02-08 08:56:19 +02:00
Barney Gale
707d066193
GH-129835: Yield path with trailing slash from ReadablePath.glob('') (#129836)
In the private pathlib ABCs, make `ReadablePath.glob('')` yield a path with
a trailing slash (if it yields anything at all). As a result, `glob()`
works similarly to `joinpath()` when given a non-magic pattern.

In the globbing implementation, we preemptively add trailing slashes to
intermediate paths if there are pattern parts remaining; this removes the
need to check for existing trailing slashes (in the removed `add_slash()`
method) at subsequent steps.
2025-02-08 06:47:09 +00:00
Tomasz Pytel
6c67904e79
gh-128657: fix _hashopenssl ref/data race (GH-128886) 2025-02-07 18:47:45 -08:00
Tian Gao
d3b60fff58
gh-124703: Add documentation and whatsnew entry for pdb exit change (#129818) 2025-02-07 21:02:46 -05:00
Barney Gale
718ab66299
GH-125413: Add pathlib.Path.info attribute (#127730)
Add `pathlib.Path.info` attribute, which stores an object implementing the `pathlib.types.PathInfo` protocol (also new). The object supports querying the file type and internally caching `os.stat()` results. Path objects generated by `Path.iterdir()` are initialised with status information from `os.DirEntry` objects, which is gleaned from scanning the parent directory.

The `PathInfo` protocol has four methods: `exists()`, `is_dir()`, `is_file()` and `is_symlink()`.
2025-02-08 01:16:45 +00:00
Irit Katriel
a1417b211f
gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700) 2025-02-07 22:39:54 +00:00
Sam Gross
2248a9c153
gh-129825: Skip test_faulthandler.test_register_chain under TSAN (gh-129827)
The test hangs when run under TSAN due to an interaction between TSAN's
signal interception and our attempt to call the previous signal handler.
2025-02-07 17:35:59 -05:00
Brandt Bucher
5fa7e1b7fd
GH-129715: Remove _DYNAMIC_EXIT (GH-129716) 2025-02-07 11:41:17 -08:00
Ken Jin
e4a00f70b1
Fix link in 3.14 whatsnew (#129828) 2025-02-07 19:30:23 +00:00
Ken Jin
7b2e01bb55
Remove tail-calling wording as it is confusing (GH-129823) 2025-02-07 18:49:28 +00:00
Kumar Aditya
49bd47d5f1
improve test_log_destroyed_pending_task in asyncio (#129821) 2025-02-07 18:00:59 +00:00
Garrett Gu
662e88db64
Fix Garrett Gu name misspelling in 3.14 whatsnew (GH-129822)
Update 3.14.rst to fix typo
2025-02-07 17:56:46 +00:00