Commit graph

126396 commits

Author SHA1 Message Date
Mark Shannon
844596c09f
GH-131498: Cases generator: Allow input and 'peek' variables to be modified (GH-132506) 2025-04-14 12:19:53 +01:00
Kumar Aditya
be763e550e
gh-127945: fix thread safety and add lock held assertions to paramfunc in ctypes (#132473) 2025-04-14 14:05:06 +05:30
Serhiy Storchaka
522766aa23
gh-71339: Use new assertion methods in the email tests (GH-129055) 2025-04-14 09:25:58 +03:00
Serhiy Storchaka
7076d076c2
gh-71339: Use new assertion methods in the http tests (GH-129058) 2025-04-14 09:24:54 +03:00
Serhiy Storchaka
f98b9b4cbb
gh-71339: Use new assertion methods in the urllib tests (GH-129056) 2025-04-14 09:24:41 +03:00
Gregory P. Smith
7a29c9883f
GH-115322: fix ctypes call_function audit hook on 32-bit platforms (GH-132496)
* GH-115322: fix ctypes call_function audit hook on 32-bit platforms.

It was using a signed conversion to communicate the function id (pointer) value.
2025-04-14 06:22:29 +00:00
Serhiy Storchaka
f7b24ffefd
gh-124986: Fix test_no_leaking in test_subprocess on NetBSD and FreeBSD (GH-132476)
On platforms where the file descriptor limit is larger than FD_SETSIZE
that test was always skipped (FreeBSD) or always failing (NetBSD).
2025-04-14 09:15:12 +03:00
Serhiy Storchaka
1fc1df8dcc
gh-132099: Harmonize Bluetooth address handling (GH-132486)
Now all protocols always accept the Bluetooth address as string and
getsockname() always returns the Bluetooth address as string.

* BTPROTO_SCO now accepts not only bytes, but str.
* BTPROTO_SCO now checks address for embedded null.
* On *BSD, BTPROTO_HCI now accepts str instead of bytes.
* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.
* On NetBSD and DragonFly BDS, BTPROTO_HCI now checks address for embedded null.
2025-04-14 08:58:56 +03:00
Barney Gale
ccad61e35d
GH-125866: Support complete "file:" URLs in urllib (#132378)
Add optional *add_scheme* argument to `urllib.request.pathname2url()`; when
set to true, a complete URL is returned. Likewise add optional
*require_scheme* argument to `url2pathname()`; when set to true, a complete
URL is accepted.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-14 01:49:02 +01:00
Jelle Zijlstra
4d3ad0467e
gh-132064: Make annotationlib use __annotate__ if only it is present (#132195) 2025-04-13 16:32:44 -07:00
abhi-jha
a1cd4ca7f4
gh-132388: fix typos in Lib/test/test_hmac.py (#132480)
Fix typos that slipped in GH-132389 (commit 9634085af3).
2025-04-13 22:26:58 +00:00
Tian Gao
084d6dc122
gh-120144: Refactor bdb monitoring backend to match settrace behavior (#132484) 2025-04-13 17:49:35 -04:00
Robin Jadoul
2666a06d33
GH-115322: Add missing audit hooks (GH-115624)
Add extra audit hooks to catch C function calling from ctypes,
reading/writing files through readline and executing external
programs through _posixsubprocess.

* Make audit-tests for open pass when readline.append_history_file is unavailable
* Less direct testing of _posixsubprocess for audit hooks
* Also remove the audit hook from call_cdeclfunction now that _ctypes_callproc does it instead.
* reword the NEWS entry.
* mention readline in NEWS
* add versionchanged markers
* fix audit_events.rst versionadded
* doc lint

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-04-13 21:46:20 +00:00
Kumar Aditya
ce753517a8
gh-86513: improve docs of loop.call_exception_handler (#132466) 2025-04-13 21:39:24 +00:00
Tomas R.
887eabc5a7
gh-132435: Test syntax warnings in a finally block (GH-132436) 2025-04-13 20:44:00 +00:00
Yuki Kobayashi
fc7e4e7bbd
gh-101100: Fix sphinx warnings in library/plistlib.rst (#132422) 2025-04-13 18:35:26 +00:00
Tapeline
281fc338fd
gh-132111: Document dataclasses.InitVar (#132446) 2025-04-13 12:47:44 -04:00
Serhiy Storchaka
1d97488c95
gh-132099: Fix documentation for the BTPROTO_HCI protocol (GH-132118) 2025-04-13 18:39:22 +03:00
Furkan Onder
c7f6535e4a
gh-131624: Fix posix_spawn tests failing on NetBSD with stack limit assertions (GH-131625)
Fix recursive limit assertions on NetBSD for posix_spawn.
2025-04-13 14:06:38 +03:00
Case Zumbrum
00cf5eacc5
gh-129169: update asyncio.ensure_future docs to suggest taskgroups
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-04-13 07:59:22 +00:00
Pieter Eendebak
9d127e83b9
gh-123471: Make concurrent iteration over itertools.repeat safe under free-threading (#131247) 2025-04-13 13:26:58 +05:30
Charles Machalow
5863cd70b8
gh-132106: Ensure that running logging.handlers.QueueListener cannot be started again (GH-132444)
Prevents a thread leak
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-13 08:53:13 +01:00
Felix Scherz
64b066ad29
gh-132354: document return value for asyncio.Task.cancel (#132374) 2025-04-13 13:05:44 +05:30
Yongzi Li
f69b344e09
Fix a typo in c-api/typeobj.rst (#132317) 2025-04-13 07:18:58 +00:00
Yongzi Li
03b18e0d8c
Docs: Fix a typo in Doc/c-api/unicode.rst (#132318) 2025-04-13 07:16:59 +00:00
Serhiy Storchaka
718d234e40
gh-132429: Remove not working test for Bluetooth socket (GH-132459) 2025-04-12 22:35:28 +00:00
Serhiy Storchaka
f2f86d3f45
gh-132429: Fix support of Bluetooth sockets on NetBSD and DragonFly BSD (GH-132431)
* Also add support for cid and bdaddr_type in the BTPROTO_L2CAP address on FreeBSD.
* Return cid in getsockname() for BTPROTO_L2CAP if it is not zero.
* Fix a compiler warning on FreeBSD.
2025-04-12 23:57:34 +03:00
Bénédikt Tran
9634085af3
gh-132388: Increase test coverage for HMAC (#132389)
- Correctly test missing `digestmod` and `digest` parameters.
- Test when chunks of length > 2048 are passed to `update()`.
- Test one-shot HMAC-BLAKE2.
2025-04-12 17:43:11 +00:00
Serhiy Storchaka
842ab81517
gh-132185: Speed up expanduser() test with large password database (GH-132231)
Use only a limited number of randomly selected entries.
2025-04-12 16:17:52 +00:00
da-woods
1e5798e372
Docs: Fix specifications of gcvisitobjects_t (#132433)
`gcvisitobjects_t` callbacks should return 1 for the iteration to continue instead of 0.
2025-04-12 17:36:02 +02:00
Adorilson Bezerra
891465fc7a
gh-58211: Add tests for the __self__ attribute of builtins functions (#113575)
---------

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-12 12:02:43 +00:00
Charles Machalow
517e96b9ed
gh-132106: Allow logging.handlers.QueueListener to be used as a context manager (#132107) 2025-04-12 12:00:04 +00:00
Stan Ulbrych
ad3bbe8fbc
gh-123441: Update Belorussian spelling (GH-132409) 2025-04-12 13:36:01 +03:00
Tomas R.
3d08c8ad20
gh-131927: Prevent emitting optimizer warnings twice in the REPL (#131993) 2025-04-12 11:34:36 +01:00
Serhiy Storchaka
d4e2cdc15b
gh-125434: Fix building on OpenBSD (GH-132393)
pthread_get_name_np is defined in pthread_np.h.
2025-04-12 11:25:35 +03:00
Bénédikt Tran
a81232c769
gh-132399: fix invalid function signatures on the free-threaded build (#132400) 2025-04-12 07:46:33 +00:00
Maksim
292a7248cd
gh-131290: ensure that test files can be executed as standalone scripts (#131371)
---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-12 07:46:19 +00:00
Nicolas Trangez
2aab2db146
GH-132417: ctypes: Fix potential Py_DECREF(NULL) when handling functions returning PyObject * (#132418)
Some functions (such as `PyErr_Occurred`) with a `restype` set to `ctypes.py_object` may return NULL without setting an exception.
2025-04-12 07:40:34 +00:00
Bénédikt Tran
e0dffc54b8
gh-132097: fix runtime UB when calling expat handlers (#132265) 2025-04-12 09:20:11 +02:00
Bénédikt Tran
e1f93ff484
gh-132097: skip tests raising an explicit SIGSEV when UB sanitizer is on (#132398) 2025-04-12 09:18:58 +02:00
Kumar Aditya
05d27a84f4
gh-130322: drop deprecation of asyncio.set_event_loop (#132349) 2025-04-12 12:03:52 +05:30
Tomas R.
e6ef47ac22
gh-132386: Fix a crash when passing a dict subclass to exec (GH-132412)
* Fix crash when passing a dict subclass to exec

* Add news entry
2025-04-12 05:05:03 +08:00
Xuehai Pan
deda47d6e1
Add `.yaml to .editorconfig` (#132410) 2025-04-11 19:23:13 +01:00
Serhiy Storchaka
e5f8b2c703
gh-85302: Add support for BTPROTO_SCO on FreeBSD (GH-131981)
BTPROTO_SCO has been supported on FreeBSD since 2008.
2025-04-11 19:38:17 +03:00
Xuehai Pan
26ae05e95c
gh-127405: Add ABIFLAGS to sysconfig variables on Windows (GH-131799) 2025-04-11 16:19:03 +01:00
Bénédikt Tran
9ded6f0830
gh-111178: fix incorrect function signatures in docs (#132395)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-04-11 14:59:38 +00:00
Karolina Surma
3e1a47bdb4
gh-132356: Find the correct group name in test_group_no_follow_symlinks (#132357)
Find the correct group name in test_group_no_follow_symlinks
2025-04-11 15:58:39 +01:00
Bénédikt Tran
f23052591a
CI: Update outdated references to Python version and GH issues (#132394) 2025-04-11 14:46:33 +00:00
Collin Funk
1b49c8c71b
gh-131127: Minimal build support on systems using LibreSSL (GH-131128) 2025-04-11 15:35:12 +03:00
Mark Shannon
d87e7f3529
GH-127682: Only call __iter__ once in generator expressions. (GH-132351) 2025-04-11 09:37:22 +01:00