Skip to content

Commit

Permalink
Change extensions type (#2803)
Browse files Browse the repository at this point in the history
* Change extensions type

* Update changelog

* install httpcore from the git

* Revert "install httpcore from the git"

This reverts commit 1813c6a.

* bump httpcore version

* fix requirements

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
  • Loading branch information
karpetrosyan and tomchristie committed Sep 11, 2023
1 parent e874351 commit adbcd0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added

* Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#2803)
* Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)
* The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. (#2776)

Expand Down
5 changes: 3 additions & 2 deletions httpx/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Iterator,
List,
Mapping,
MutableMapping,
NamedTuple,
Optional,
Sequence,
Expand Down Expand Up @@ -87,7 +88,7 @@

RequestContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
ResponseExtensions = Mapping[str, Any]
ResponseExtensions = MutableMapping[str, Any]

RequestData = Mapping[str, Any]

Expand All @@ -104,7 +105,7 @@
]
RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]]

RequestExtensions = Mapping[str, Any]
RequestExtensions = MutableMapping[str, Any]


class SyncByteStream:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
]
dependencies = [
"certifi",
"httpcore>=0.17.2,<0.18.0",
"httpcore>=0.18.0,<0.19.0",
"idna",
"sniffio",
]
Expand Down

0 comments on commit adbcd0e

Please sign in to comment.