Changelog
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.1.0 - 2026-10-14
The first release of pathapi-requests: RequestsTransport, the HTTP
transport that sends through a requests.Session, as a distribution of its own.
It needs Python 3.9 or newer, pathapi>=0.1.0,<0.2 and
requests>=2.22.0,<3; its one extra, socks, adds requests[socks] for SOCKS
proxies. Under Changed, the migration from the RequestsTransport of
pathlib-next comes in this order: the table of names, then every change of
behaviour with what to do about it.
It is built on pathapi, which was published as pathlib-next up to 0.10.0 (import
name pathlib_next); the old names below are the ones before the move.
Added
pathapi_requests.RequestsTransportandpathapi_requests.__version__.- The distribution declares the
requestsentry of thepathapi.http_transportsgroup. Installing it is all thatpathapi.httpneeds to send through it:HTTPClient(RequestsTransport(session))andPATHAPI_HTTP_TRANSPORT=requestsuse it,pathapi.http.get_transport("requests")loads it, andpathapi.http.transport_names()lists it. RequestsTransport(proxies=provider): an object indexed with the request URL that answers a proxy (a URL, or an object with aurl),Nonefor no proxy, or an iterable of them, of which the first is used.KeyErrorleaves the decision torequests.- A session the transport made is closed when the transport is collected, and a
response that is still open keeps its transport alive, so a dropped transport
leaves no sockets to the garbage collector on any
urllib3. - A
socks4:,socks5:orsocks5h:proxy without PySocks raisesOSError(EPROTONOSUPPORT)namingpathapi-requests[socks]. - The tests
pathapiruns over its own transport run over this one (python -m pathapi.http.testing --http-transports requests) as part of the test suite.
Changed
- Migration from
pathlib-next:
| Was | Is |
|---|---|
pathlib_next.uri.schemes.http.RequestsTransport |
pathapi_requests.RequestsTransport |
RequestsTransport(session=None, **requests_args) |
RequestsTransport(session=None, *, proxies=None, **requests_args) |
the extra pathlib-next[http] |
pip install pathapi-requests |
PATHLIB_NEXT_HTTP_TRANSPORT=requests |
the same, read by pathapi.http; this distribution must be installed |
proxiesis a provider and no longer an argument thatrequestsreceives as it is. Adictkeeps itsrequestsmeaning for the keys"http","https","all"and"scheme://host"(aNonevalue is still no proxy); a"no_proxy"entry of the dict is not read. What to do: putNO_PROXYin the environment, or answerNonefor those URLs.- A
requeststhat cannot be imported raises anImportErrorthat names this distribution, where it named thehttpextra ofpathlib-next. What to do: reinstallpathapi-requests. - A
sessionthat is not an object with arequest()method raisesTypeErrorwhere the transport is built. What to do: pass arequests.Session.