Skip to content
Myr

Cleanup `Request` method parameter. (#3378)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent 12be5c4 · Browse files · 2 files+3 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−6 removed

  • other:+3 added−6 removed

2 files+3 added−6 removed

modified:httpx/_models.py+2 added-6 removed
308 unmodified lines
309310class Request:311 def __init__(312 self,313 method: str | bytes,313 method: str,314 url: URL | str,315 *,316 params: QueryParamTypes | None = None,317 headers: HeaderTypes | None = None,
4 unmodified lines
322 json: typing.Any | None = None,323 stream: SyncByteStream | AsyncByteStream | None = None,324 extensions: RequestExtensions | None = None,325 ) -> None:326 self.method = (327 method.decode("ascii").upper()328 if isinstance(method, bytes)329 else method.upper()330 )326 self.method = method.upper()327 self.url = URL(url) if params is None else URL(url, params=params)328 self.headers = Headers(headers)329 self.extensions = {} if extensions is None else extensions330
875 unmodified lines
modified:CHANGELOG.md+1 added
15 unmodified lines
16* Ensure JSON request bodies are compact. (#3363)17* Review URL percent escape sets, based on WHATWG spec. (#3371, #3373)18* Ensure `certifi` and `httpcore` are only imported if required. (#3377)19* Treat `socks5h` as a valid proxy scheme. (#3178)20* Cleanup `Request()` method signature in line with `client.request()` and `httpx.request()`. (#3378)2122## 0.27.2 (27th August, 2024)2324### Fixed
1091 unmodified lines