AbstractDigestAuthHandler.get_authorization() always looked up
credentials using the target request URL (req.full_url), even when
invoked via ProxyDigestAuthHandler, whose credentials are registered
against the proxy's host:port.
The lookup never matched, no Proxy-Authorization header was produced,
and proxy digest auth failed with an unhandled 407.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
If Server.close() ran after a connection was accepted but before its
transport was created, Server._attach() hit an assertion, the error was
reported to the exception handler, and the half-built transport later
raised TypeError from __del__. Close such connections quietly instead,
in both the selector and proactor accept paths.
Co-authored-by: Claude Opus 5.5 <[email protected]>
The server called unwrap() right after corrupting the client's TLS
stream, which sent its own close_notify to a client that was about to
close its socket. That turned the client's close into a TCP reset, and
on Windows a reset discards the client's close_notify that is still
unread, so the server failed with WinError 10054 (or 10053).
Wait for the client's close_notify with recv() before calling unwrap().
A ragged EOF without close_notify still makes unwrap() raise SSLError,
so the test keeps catching the gh-98078 regression.
Co-authored-by: Claude Fable 5.1 <[email protected]>
* gh-151950: Document `async.BaseEventLoop` and fix `asyncio-extending.rst`
* Apply suggestions from code review
Co-authored-by: Stan Ulbrych <[email protected]>
* Update Doc/library/asyncio-extending.rst
Co-authored-by: Hugo van Kemenade <[email protected]>
---------
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Andrew Svetlov <[email protected]>
Discovered by running the test suite from a release build which can map all of `/` into the WASI guest (unlike when running the test suite in a source checkout).
* gh-148919: Make test_redirect_no_path independent of proxy environment variables
* gh-148919: Also make test_redirect_encoding independent of proxy env
test_redirect_encoding uses build_opener(), which installs the default
ProxyHandler, so it failed the same way when http_proxy was set. Move
the environment cleanup into a helper and use EnvironmentVarGuard.unset().
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Senthil Kumaran <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
gh-56689 test case to cover for windows proxy_bypass misbehaving with
trailing ; entries on windows.
Issue was fixed in GH-115210
Co-Authored by Claude Code.
Exceptions raised while reading or parsing the HTTP response, such as
http.client.HTTPException subclasses and OSError subclasses like
TimeoutError, propagate from urlopen() without being wrapped in
URLError. Document this, and that ValueError is raised for an invalid
URL.
Co-authored-by: Claude Opus 5.5 <[email protected]>
`_Py_STDC_VERSION` needs to be defined before its value can be checked.
In 8335bcbf26 (gh-160208: Add a private wrapper around __STDC_VERSION__
(GH-160376), 2026-10-23), the condition `defined(_Py_STDC_VERSION)` is
incorrectly negated, which prevents the fallback definition of
`static_assert` in C11-C17 builds and causes a build error when building
with an old C library that does not define `static_assert`.
Signed-off-by: Ruoyu Zhong <[email protected]>
Document the VMIN/VTIME, TCIFLUSH/TCOFLUSH/TCIOFLUSH,
TCOOFF/TCOON/TCIOFF/TCION and TIOC* window-size constants with
``.. data::`` directives so the ``:const:`` references resolve, and
drop termios.rst from Doc/tools/.nitignore.
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Replace fixed sleeps used for synchronization in multiprocessing tests
with bounded waits to avoid failures on slow or overloaded systems.
Ensure pool cleanup runs even when assertions fail in the imap buffer
tests.
When an import failed with a stack overflow RecursionError, releasing the import locks on the error path could itself raise RecursionError, because the cleanup runs in a new C frame. This left the global import lock or a module lock held forever, and later imports in other threads blocked indefinitely.
_imp.acquire_lock() now raises RecursionError when there is not enough stack left to release the lock. importlib calls it before taking any import lock, so this covers the per-module locks too. The module lock weakref callback skips cleanup in that case instead of
reporting an unraisable exception.