Skip to content
Myr

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

7 files+5 added−16 removed

modified:.github/workflows/test-suite.yml+1 added-1 removed
modified:docs/index.md-1 removed
modified:httpx/_client.py+1 added-2 removed
1import datetime2import enum3import typing4import warnings5from contextlib import contextmanager5from contextlib import asynccontextmanager, contextmanager6from types import TracebackType78from .__version__ import __version__9from ._auth import Auth, BasicAuth, FunctionAuth10from ._compat import asynccontextmanager10from ._config import (11 DEFAULT_LIMITS,12 DEFAULT_MAX_REDIRECTS,13 DEFAULT_TIMEOUT_CONFIG,
1967 unmodified lines
modified:httpx/_compat.py-7 removed
3 unmodified lines
4"""5import ssl6import sys78# `contextlib.asynccontextmanager` exists from Python 3.7 onwards.9# For 3.6 we require the `async_generator` package for a backported version.10if sys.version_info >= (3, 7):11 from contextlib import asynccontextmanager # type: ignore12else:13 from async_generator import asynccontextmanager # type: ignore # noqa148# 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.11try:
29 unmodified lines
modified:README_chinese.md+2 added-3 removed
84 unmodified lines
85* 分段文件上传86* 支持HTTP(S) 代理87* 支持设定timeout88* 流式下载89* 支持 .netrc 89* 支持 .netrc90* 接收Chunked编码9192## 安装93
16 unmodified lines
110项目文档现已就绪,请访问 [https://www.python-httpx.org/](https://www.python-httpx.org/) 来阅读!111112想学习基础知识?请访问 [快速开始](https://www.python-httpx.org/quickstart/).113114想获得进阶帮助? 请访问 [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/)115116[Developer Interface](https://www.python-httpx.org/api/) 提供了全面的API参考。117118要了解与HTTPX集成的工具, 请访问 [第三方包](https://www.python-httpx.org/third_party_packages/).
16 unmodified lines
135* `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)*139140A huge amount of credit is due to `requests` for the API layout that141much of this work follows, as well as to `urllib3` for plenty of design142inspiration around the lower-level networking details.
3 unmodified lines
modified:README.md-1 removed
138 unmodified lines
139* `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)*143144A huge amount of credit is due to `requests` for the API layout that145much of this work follows, as well as to `urllib3` for plenty of design146inspiration around the lower-level networking details.
4 unmodified lines
modified:setup.py+1 added-1 removed
35 unmodified lines
363738setup(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