Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
T-256 authored Sep 23, 2024
2 parents 6a8c408 + f06171f commit d6711e4
Show file tree
Hide file tree
Showing 20 changed files with 9,974 additions and 104 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased
## 0.27.2 (27th August, 2024)

## Added
### Fixed

* Reintroduced supposedly-private `URLTypes` shortcut. (#2673)

## 0.27.1 (27th August, 2024)

### Added

* Support for `zstd` content decoding using the python `zstandard` package is added. Installable using `httpx[zstd]`. (#3139)

### Fixed

* Improved error messaging for `InvalidURL` exceptions. (#3250)
* Fix `app` type signature in `ASGITransport`. (#3109)

## 0.27.0 (21st February, 2024)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and async APIs**.
Install HTTPX using pip:

```shell
pip install httpx
$ pip install httpx
```

Now, let's get started:
Expand All @@ -43,7 +43,7 @@ Now, let's get started:
Or, using the command-line client.

```shell
pip install 'httpx[cli]' # The command line client is an optional dependency.
$ pip install 'httpx[cli]' # The command line client is an optional dependency.
```

Which now allows us to use HTTPX directly from the command-line...
Expand Down Expand Up @@ -94,13 +94,13 @@ Plus all the standard features of `requests`...
Install with pip:

```shell
pip install httpx
$ pip install httpx
```

Or, to include the optional HTTP/2 support, use:

```shell
pip install httpx[http2]
$ pip install httpx[http2]
```

HTTPX requires Python 3.8+.
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This is an optional feature that requires an additional third-party library be i
You can install SOCKS support using `pip`:

```shell
pip install httpx[socks]
$ pip install httpx[socks]
```

You can now configure a client to make requests via a proxy using the SOCKS protocol:
Expand Down
18 changes: 9 additions & 9 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ Then clone your fork with the following command replacing `YOUR-USERNAME` with
your GitHub username:

```shell
git clone https://github.com/YOUR-USERNAME/httpx
$ git clone https://github.com/YOUR-USERNAME/httpx
```

You can now install the project and its dependencies using:

```shell
cd httpx
scripts/install
$ cd httpx
$ scripts/install
```

## Testing and Linting
Expand All @@ -64,7 +64,7 @@ and documentation building workflow.
To run the tests, use:

```shell
scripts/test
$ scripts/test
```

!!! warning
Expand All @@ -76,19 +76,19 @@ Any additional arguments will be passed to `pytest`. See the [pytest documentati
For example, to run a single test script:

```shell
scripts/test tests/test_multipart.py
$ scripts/test tests/test_multipart.py
```

To run the code auto-formatting:

```shell
scripts/lint
$ scripts/lint
```

Lastly, to run code checks separately (they are also run as part of `scripts/test`), run:

```shell
scripts/check
$ scripts/check
```

## Documenting
Expand All @@ -98,7 +98,7 @@ Documentation pages are located under the `docs/` folder.
To run the documentation site locally (useful for previewing changes), use:

```shell
scripts/docs
$ scripts/docs
```

## Resolving Build / CI Failures
Expand All @@ -122,7 +122,7 @@ This job failing means there is either a code formatting issue or type-annotatio
You can look at the job output to figure out why it's failed or within a shell run:

```shell
scripts/check
$ scripts/check
```

It may be worth it to run `$ scripts/lint` to attempt auto-formatting the code
Expand Down
2 changes: 1 addition & 1 deletion docs/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ trying out our HTTP/2 support. You can do so by first making sure to install
the optional HTTP/2 dependencies...

```shell
pip install httpx[http2]
$ pip install httpx[http2]
```

And then instantiating a client with HTTP/2 support enabled:
Expand Down
Binary file added docs/img/speakeasy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ HTTPX is a fully featured HTTP client for Python 3, which provides sync and asyn
Install HTTPX using pip:

```shell
pip install httpx
$ pip install httpx
```

Now, let's get started:
Expand All @@ -50,7 +50,7 @@ Or, using the command-line client.

```shell
# The command line client is an optional dependency.
pip install 'httpx[cli]'
$ pip install 'httpx[cli]'
```

Which now allows us to use HTTPX directly from the command-line...
Expand Down Expand Up @@ -130,19 +130,19 @@ inspiration around the lower-level networking details.
Install with pip:

```shell
pip install httpx
$ pip install httpx
```

Or, to include the optional HTTP/2 support, use:

```shell
pip install httpx[http2]
$ pip install httpx[http2]
```

To include the optional brotli and zstandard decoders support, use:

```shell
pip install httpx[brotli,zstd]
$ pip install httpx[brotli,zstd]
```

HTTPX requires Python 3.8+
Expand Down
54 changes: 54 additions & 0 deletions docs/overrides/partials/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{% import "partials/nav-item.html" as item with context %}

<!-- Determine class according to configuration -->
{% set class = "md-nav md-nav--primary" %}
{% if "navigation.tabs" in features %}
{% set class = class ~ " md-nav--lifted" %}
{% endif %}
{% if "toc.integrate" in features %}
{% set class = class ~ " md-nav--integrated" %}
{% endif %}

<!-- Main navigation -->
<nav
class="{{ class }}"
aria-label="{{ lang.t('nav.title') }}"
data-md-level="0"
>

<!-- Site title -->
<label class="md-nav__title" for="__drawer">
<a
href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}"
title="{{ config.site_name | e }}"
class="md-nav__button md-logo"
aria-label="{{ config.site_name }}"
data-md-component="logo"
>
{% include "partials/logo.html" %}
</a>
{{ config.site_name }}
</label>

<!-- Repository information -->
{% if config.repo_url %}
<div class="md-nav__source">
{% include "partials/source.html" %}
</div>
{% endif %}

<!-- Navigation list -->
<ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %}
{% set path = "__nav_" ~ loop.index %}
{{ item.render(nav_item, path, 1) }}
{% endfor %}
</ul>

<ul class="md-nav__list" data-md-scrollfix style="padding-top: 15px; padding-left: 10px">
<div>
<a href="https://speakeasy.com"><img src="/img/speakeasy.png" width=150px style=></img></a>
</div>
</ul>
</nav>

2 changes: 1 addition & 1 deletion httpx/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__title__ = "httpx"
__description__ = "A next generation HTTP client, for Python 3."
__version__ = "0.27.0"
__version__ = "0.27.2"
20 changes: 10 additions & 10 deletions httpx/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
RequestData,
RequestFiles,
TimeoutTypes,
URLTypes,
VerifyTypes,
)
from ._urls import URL

__all__ = [
"delete",
Expand All @@ -37,7 +37,7 @@

def request(
method: str,
url: URLTypes,
url: URL | str,
*,
params: QueryParamTypes | None = None,
content: RequestContent | None = None,
Expand Down Expand Up @@ -132,7 +132,7 @@ def request(
@contextmanager
def stream(
method: str,
url: URLTypes,
url: URL | str,
*,
params: QueryParamTypes | None = None,
content: RequestContent | None = None,
Expand Down Expand Up @@ -185,7 +185,7 @@ def stream(


def get(
url: URLTypes,
url: URL | str,
*,
params: QueryParamTypes | None = None,
headers: HeaderTypes | None = None,
Expand Down Expand Up @@ -225,7 +225,7 @@ def get(


def options(
url: URLTypes,
url: URL | str,
*,
params: QueryParamTypes | None = None,
headers: HeaderTypes | None = None,
Expand Down Expand Up @@ -265,7 +265,7 @@ def options(


def head(
url: URLTypes,
url: URL | str,
*,
params: QueryParamTypes | None = None,
headers: HeaderTypes | None = None,
Expand Down Expand Up @@ -305,7 +305,7 @@ def head(


def post(
url: URLTypes,
url: URL | str,
*,
content: RequestContent | None = None,
data: RequestData | None = None,
Expand Down Expand Up @@ -350,7 +350,7 @@ def post(


def put(
url: URLTypes,
url: URL | str,
*,
content: RequestContent | None = None,
data: RequestData | None = None,
Expand Down Expand Up @@ -395,7 +395,7 @@ def put(


def patch(
url: URLTypes,
url: URL | str,
*,
content: RequestContent | None = None,
data: RequestData | None = None,
Expand Down Expand Up @@ -440,7 +440,7 @@ def patch(


def delete(
url: URLTypes,
url: URL | str,
*,
params: QueryParamTypes | None = None,
headers: HeaderTypes | None = None,
Expand Down
Loading

0 comments on commit d6711e4

Please sign in to comment.