Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.6 #535

Merged
merged 15 commits into from
Apr 6, 2022
2 changes: 1 addition & 1 deletion .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Some things HTTP Core does do:
* Provides both sync and async interfaces.
* Async backend support for `asyncio` and `trio`.

## Requirements

Python 3.7+

## Installation

For HTTP/1.1 only support, install with:
Expand Down
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Some things HTTP Core does do:
* Provides both sync and async interfaces.
* Async backend support for `asyncio` and `trio`.

## Requirements

Python 3.7+

## Installation

For HTTP/1.1 only support, install with:
Expand Down
2 changes: 1 addition & 1 deletion httpcore/_async/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from contextlib import asynccontextmanager
from typing import AsyncIterator, Optional, Union

from .._compat import asynccontextmanager
from .._models import (
URL,
Origin,
Expand Down
6 changes: 0 additions & 6 deletions httpcore/_compat.py

This file was deleted.

2 changes: 1 addition & 1 deletion httpcore/_sync/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from contextlib import contextmanager
from typing import Iterator, Optional, Union

from contextlib import contextmanager
from .._models import (
URL,
Origin,
Expand Down
12 changes: 7 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@
trio==0.19.0

# Docs
mkdocs==1.2.3
mkdocs==1.3.0
mkdocs-autorefs==0.3.1
mkdocs-material==8.2.3
mkdocs-material-extensions==1.0.3
mkdocstrings==0.17.0
jinja2==3.0.3 # See: https://github.com/mkdocs/mkdocs/issues/2799

# Packaging
twine==3.8.0
wheel==0.37.1
twine
wheel

# Tests & Linting
anyio==3.5.0
autoflake==1.4
black==22.1.0
black==22.3.0
coverage==6.2
flake8==4.0.1
flake8==3.9.2 # See: https://github.com/PyCQA/flake8/pull/1438
isort==5.10.1
mypy==0.931
pytest==7.0.1
pytest-httpbin==1.0.1
pytest-trio==0.7.0
pytest-asyncio==0.16.0
werkzeug<2.1 # See: https://github.com/postmanlabs/httpbin/issues/673
2 changes: 1 addition & 1 deletion scripts/check
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export SOURCE_FILES="httpcore tests"
set -x

${PREFIX}isort --check --diff --project=httpcore $SOURCE_FILES
${PREFIX}black --exclude '/(_sync|sync_tests)/' --check --diff --target-version=py36 $SOURCE_FILES
${PREFIX}black --exclude '/(_sync|sync_tests)/' --check --diff --target-version=py37 $SOURCE_FILES
${PREFIX}flake8 $SOURCE_FILES
${PREFIX}mypy $SOURCE_FILES
scripts/unasync --check
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -x

${PREFIX}autoflake --in-place --recursive --remove-all-unused-imports $SOURCE_FILES
${PREFIX}isort --project=httpcore $SOURCE_FILES
${PREFIX}black --target-version=py36 --exclude '/(_sync|sync_tests)/' $SOURCE_FILES
${PREFIX}black --target-version=py37 --exclude '/(_sync|sync_tests)/' $SOURCE_FILES

# Run unasync last because its `--check` mode is not aware of code formatters.
# (This means sync code isn't prettified, and that's mostly okay.)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ filterwarnings =
ignore:ssl\.PROTOCOL_TLS is deprecated:DeprecationWarning

[coverage:run]
omit = venv/*, httpcore/_sync/*, httpcore/_compat.py
omit = venv/*, httpcore/_sync/*
include = httpcore/*, tests/*
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_packages(package):

setup(
name="httpcore",
python_requires=">=3.6",
python_requires=">=3.7",
version=get_version("httpcore"),
url="https://github.com/encode/httpcore",
project_urls={
Expand Down Expand Up @@ -73,7 +73,6 @@ def get_packages(package):
"Framework :: AsyncIO",
"Framework :: Trio",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down
3 changes: 1 addition & 2 deletions unasync.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!venv/bin/python
import re
import os
import re
import sys

SUBS = [
('from .._compat import asynccontextmanager', 'from contextlib import contextmanager'),
('from ..backends.auto import AutoBackend', 'from ..backends.sync import SyncBackend'),
('import trio as concurrency', 'from tests import concurrency'),
('AsyncByteStream', 'SyncByteStream'),
Expand Down