Drop EOL Python 3.6 (#2097)
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com> Co-authored-by: Tom Christie <tom@tomchristie.com> Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
f7a024cee3
commit
67c297069f
2
.github/workflows/test-suite.yml
vendored
2
.github/workflows/test-suite.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v2"
|
||||
|
||||
@ -140,7 +140,6 @@ As well as these optional installs:
|
||||
* `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*
|
||||
* `click` - Command line client support. *(Optional, with `httpx[cli]`)*
|
||||
* `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx[brotli]`)*
|
||||
* `async_generator` - Backport support for `contextlib.asynccontextmanager`. *(Only required for Python 3.6)*
|
||||
|
||||
A huge amount of credit is due to `requests` for the API layout that
|
||||
much of this work follows, as well as to `urllib3` for plenty of design
|
||||
|
||||
@ -86,7 +86,7 @@ HTTPX将并为您提供以下功能:
|
||||
* 支持HTTP(S) 代理
|
||||
* 支持设定timeout
|
||||
* 流式下载
|
||||
* 支持 .netrc
|
||||
* 支持 .netrc
|
||||
* 接收Chunked编码
|
||||
|
||||
## 安装
|
||||
@ -111,7 +111,7 @@ HTTPX 要求 Python 3.6版本或更高.
|
||||
|
||||
想学习基础知识?请访问 [快速开始](https://www.python-httpx.org/quickstart/).
|
||||
|
||||
想获得进阶帮助? 请访问 [Advanced Usage](https://www.python-httpx.org/advanced/) 来获得答案, 不妨来看看 [异步支持](https://www.python-httpx.org/async/) 或者 [HTTP/2](https://www.python-httpx.org/http2/)
|
||||
想获得进阶帮助? 请访问 [Advanced Usage](https://www.python-httpx.org/advanced/) 来获得答案, 不妨来看看 [异步支持](https://www.python-httpx.org/async/) 或者 [HTTP/2](https://www.python-httpx.org/http2/)
|
||||
|
||||
[Developer Interface](https://www.python-httpx.org/api/) 提供了全面的API参考。
|
||||
|
||||
@ -136,7 +136,6 @@ HTTPX项目依赖于这些优秀的库:
|
||||
* `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*
|
||||
* `click` - Command line client support. *(Optional, with `httpx[cli]`)*
|
||||
* `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx[brotli]`)*
|
||||
* `async_generator` - Backport support for `contextlib.asynccontextmanager`. *(Only required for Python 3.6)*
|
||||
|
||||
A huge amount of credit is due to `requests` for the API layout that
|
||||
much of this work follows, as well as to `urllib3` for plenty of design
|
||||
|
||||
@ -121,7 +121,6 @@ As well as these optional installs:
|
||||
* `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*
|
||||
* `click` - Command line client support. *(Optional, with `httpx[cli]`)*
|
||||
* `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx[brotli]`)*
|
||||
* `async_generator` - Backport support for `contextlib.asynccontextmanager`. *(Only required for Python 3.6)*
|
||||
|
||||
A huge amount of credit is due to `requests` for the API layout that
|
||||
much of this work follows, as well as to `urllib3` for plenty of design
|
||||
|
||||
@ -2,12 +2,11 @@ import datetime
|
||||
import enum
|
||||
import typing
|
||||
import warnings
|
||||
from contextlib import contextmanager
|
||||
from contextlib import asynccontextmanager, contextmanager
|
||||
from types import TracebackType
|
||||
|
||||
from .__version__ import __version__
|
||||
from ._auth import Auth, BasicAuth, FunctionAuth
|
||||
from ._compat import asynccontextmanager
|
||||
from ._config import (
|
||||
DEFAULT_LIMITS,
|
||||
DEFAULT_MAX_REDIRECTS,
|
||||
|
||||
@ -5,13 +5,6 @@ Python environments. It is excluded from the code coverage checks.
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
# `contextlib.asynccontextmanager` exists from Python 3.7 onwards.
|
||||
# For 3.6 we require the `async_generator` package for a backported version.
|
||||
if sys.version_info >= (3, 7):
|
||||
from contextlib import asynccontextmanager # type: ignore
|
||||
else:
|
||||
from async_generator import asynccontextmanager # type: ignore # noqa
|
||||
|
||||
# Brotli support is optional
|
||||
# The C bindings in `brotli` are recommended for CPython.
|
||||
# The CFFI bindings in `brotlicffi` are recommended for PyPy and everything else.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user