Drop EOL Python 3.6 (#2097)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Ofek Lev · committed by GitHub · parent f7a024c · Browse files · 7 files·+5 added−16 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- 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>
Diff stats
7 files+5 added−16 removed
- other:+5 added−16 removed
Provenance
- Commit
67c2970- Tree
30eec40- Author
Ofek Lev <ofekmeister@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
f7a024c
7 files changed+5 added−16 removed
modified:.github/workflows/test-suite.yml+1 added-1 removed
12 unmodified lines1314151617171819202112 unmodified lines12 unmodified lines runs-on: "ubuntu-latest"
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" - uses: "actions/setup-python@v2"12 unmodified linesmodified:docs/index.md-1 removed
119 unmodified linesExpand all12012112212312412412512612724 unmodified lines119 unmodified linesExpand all* `socksio` - SOCKS proxy support. *(Optional, with `httpx[socks]`)** `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 thatmuch of this work follows, as well as to `urllib3` for plenty of designinspiration around the lower-level networking details.24 unmodified linesmodified:httpx/_client.py+1 added-2 removed
1 import datetime2 import enum3 import typing4 import warnings5-from contextlib import contextmanager5+from contextlib import asynccontextmanager, contextmanager6 from types import TracebackType7 8 from .__version__ import __version__9 from ._auth import Auth, BasicAuth, FunctionAuth10-from ._compat import asynccontextmanager10 from ._config import (11 DEFAULT_LIMITS,12 DEFAULT_MAX_REDIRECTS,13 DEFAULT_TIMEOUT_CONFIG,1967 unmodified linesmodified:httpx/_compat.py-7 removed
3 unmodified lines4 """5 import ssl6 import sys7 8-# `contextlib.asynccontextmanager` exists from Python 3.7 onwards.9-# For 3.6 we require the `async_generator` package for a backported version.10-if sys.version_info >= (3, 7):11- from contextlib import asynccontextmanager # type: ignore12-else:13- from async_generator import asynccontextmanager # type: ignore # noqa14-8 # Brotli support is optional9 # The C bindings in `brotli` are recommended for CPython.10 # The CFFI bindings in `brotlicffi` are recommended for PyPy and everything else.11 try:29 unmodified linesmodified:README_chinese.md+2 added-3 removed
84 unmodified lines85 * 分段文件上传86 * 支持HTTP(S) 代理87 * 支持设定timeout88 * 流式下载89-* 支持 .netrc 89+* 支持 .netrc90 * 接收Chunked编码91 92 ## 安装93 16 unmodified lines110 项目文档现已就绪,请访问 [https://www.python-httpx.org/](https://www.python-httpx.org/) 来阅读!111 112 想学习基础知识?请访问 [快速开始](https://www.python-httpx.org/quickstart/).113 114-想获得进阶帮助? 请访问 [Advanced Usage](https://www.python-httpx.org/advanced/) 来获得答案, 不妨来看看 [异步支持](https://www.python-httpx.org/async/) 或者 [HTTP/2](https://www.python-httpx.org/http2/) 114+想获得进阶帮助? 请访问 [Advanced Usage](https://www.python-httpx.org/advanced/) 来获得答案, 不妨来看看 [异步支持](https://www.python-httpx.org/async/) 或者 [HTTP/2](https://www.python-httpx.org/http2/)115 116 [Developer Interface](https://www.python-httpx.org/api/) 提供了全面的API参考。117 118 要了解与HTTPX集成的工具, 请访问 [第三方包](https://www.python-httpx.org/third_party_packages/).16 unmodified lines135 * `sniffio` - Async library autodetection.136 * `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*137 * `click` - Command line client support. *(Optional, with `httpx[cli]`)*138 * `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx[brotli]`)*139-* `async_generator` - Backport support for `contextlib.asynccontextmanager`. *(Only required for Python 3.6)*139 140 A huge amount of credit is due to `requests` for the API layout that141 much of this work follows, as well as to `urllib3` for plenty of design142 inspiration around the lower-level networking details.3 unmodified linesmodified:README.md-1 removed
138 unmodified lines139 * `socksio` - SOCKS proxy support. *(Optional, with `httpx[socks]`)*140 * `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*141 * `click` - Command line client support. *(Optional, with `httpx[cli]`)*142 * `brotli` or `brotlicffi` - Decoding for "brotli" compressed responses. *(Optional, with `httpx[brotli]`)*143-* `async_generator` - Backport support for `contextlib.asynccontextmanager`. *(Only required for Python 3.6)*143 144 A huge amount of credit is due to `requests` for the API layout that145 much of this work follows, as well as to `urllib3` for plenty of design146 inspiration around the lower-level networking details.4 unmodified linesmodified:setup.py+1 added-1 removed
35 unmodified lines36 37 38 setup(39 name="httpx",40- python_requires=">=3.6",40+ python_requires=">=3.7",41 version=get_version("httpx"),42 url="https://github.com/encode/httpx",43 project_urls={44 "Changelog": "https://github.com/encode/httpx/blob/master/CHANGELOG.md",55 unmodified lines