Skip to content

Commit 17b03a4

Browse files
authoredMay 30, 2022
Drop Python 3.6 (encode#458)
1 parent 69cdccf commit 17b03a4

File tree

6 files changed

+8
-17
lines changed

6 files changed

+8
-17
lines changed
 

‎.github/workflows/test-suite.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
17+
python-version: ["3.7", "3.8", "3.9", "3.10"]
1818

1919
services:
2020
mysql:

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Databases is suitable for integrating against any async Web framework, such as [
1919

2020
**Documentation**: [https://www.encode.io/databases/](https://www.encode.io/databases/)
2121

22-
**Requirements**: Python 3.6+
22+
**Requirements**: Python 3.7+
2323

2424
---
2525

‎databases/core.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import contextlib
33
import functools
44
import logging
5-
import sys
65
import typing
6+
from contextvars import ContextVar
77
from types import TracebackType
88
from urllib.parse import SplitResult, parse_qsl, unquote, urlsplit
99

@@ -13,11 +13,6 @@
1313
from databases.importer import import_from_string
1414
from databases.interfaces import DatabaseBackend, Record
1515

16-
if sys.version_info >= (3, 7): # pragma: no cover
17-
from contextvars import ContextVar
18-
else: # pragma: no cover
19-
from aiocontextvars import ContextVar
20-
2116
try: # pragma: no cover
2217
import click
2318

‎docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ expression language, and provides support for PostgreSQL, MySQL, and SQLite.
1717
Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
1818
[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
1919

20-
**Requirements**: Python 3.6+
20+
**Requirements**: Python 3.7+
2121

2222
---
2323

‎requirements.txt

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# Notes...
2-
# The JSONField tests require sqlalchemy 1.3+. Other cases work at lower versions.
3-
# The aiocontextvars package is only required as a backport for Python 3.6.
41
-e .
52

63
# Async database drivers
7-
asyncmy;python_version>"3.6"
8-
aiomysql;python_version<"3.10"
4+
asyncmy
5+
aiomysql
96
aiopg
107
aiosqlite
118
asyncpg

‎setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_packages(package):
3737
setup(
3838
name="databases",
3939
version=get_version("databases"),
40-
python_requires=">=3.6",
40+
python_requires=">=3.7",
4141
url="https://github.com/encode/databases",
4242
license="BSD",
4343
description="Async database support for Python.",
@@ -47,7 +47,7 @@ def get_packages(package):
4747
author_email="tom@tomchristie.com",
4848
packages=get_packages("databases"),
4949
package_data={"databases": ["py.typed"]},
50-
install_requires=["sqlalchemy>=1.4,<1.5", 'aiocontextvars;python_version<"3.7"'],
50+
install_requires=["sqlalchemy>=1.4,<1.5"],
5151
extras_require={
5252
"postgresql": ["asyncpg"],
5353
"asyncpg": ["asyncpg"],
@@ -66,7 +66,6 @@ def get_packages(package):
6666
"Operating System :: OS Independent",
6767
"Topic :: Internet :: WWW/HTTP",
6868
"Programming Language :: Python :: 3",
69-
"Programming Language :: Python :: 3.6",
7069
"Programming Language :: Python :: 3.7",
7170
"Programming Language :: Python :: 3.8",
7271
"Programming Language :: Python :: 3.9",

0 commit comments

Comments
 (0)
Please sign in to comment.