Skip to content

Commit

Permalink
Drop Python 3.6 (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored May 30, 2022
1 parent 69cdccf commit 17b03a4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
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"]

services:
mysql:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Databases is suitable for integrating against any async Web framework, such as [

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

**Requirements**: Python 3.6+
**Requirements**: Python 3.7+

---

Expand Down
7 changes: 1 addition & 6 deletions databases/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import contextlib
import functools
import logging
import sys
import typing
from contextvars import ContextVar
from types import TracebackType
from urllib.parse import SplitResult, parse_qsl, unquote, urlsplit

Expand All @@ -13,11 +13,6 @@
from databases.importer import import_from_string
from databases.interfaces import DatabaseBackend, Record

if sys.version_info >= (3, 7): # pragma: no cover
from contextvars import ContextVar
else: # pragma: no cover
from aiocontextvars import ContextVar

try: # pragma: no cover
import click

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ expression language, and provides support for PostgreSQL, MySQL, and SQLite.
Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].

**Requirements**: Python 3.6+
**Requirements**: Python 3.7+

---

Expand Down
7 changes: 2 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Notes...
# The JSONField tests require sqlalchemy 1.3+. Other cases work at lower versions.
# The aiocontextvars package is only required as a backport for Python 3.6.
-e .

# Async database drivers
asyncmy;python_version>"3.6"
aiomysql;python_version<"3.10"
asyncmy
aiomysql
aiopg
aiosqlite
asyncpg
Expand Down
5 changes: 2 additions & 3 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="databases",
version=get_version("databases"),
python_requires=">=3.6",
python_requires=">=3.7",
url="https://github.com/encode/databases",
license="BSD",
description="Async database support for Python.",
Expand All @@ -47,7 +47,7 @@ def get_packages(package):
author_email="[email protected]",
packages=get_packages("databases"),
package_data={"databases": ["py.typed"]},
install_requires=["sqlalchemy>=1.4,<1.5", 'aiocontextvars;python_version<"3.7"'],
install_requires=["sqlalchemy>=1.4,<1.5"],
extras_require={
"postgresql": ["asyncpg"],
"asyncpg": ["asyncpg"],
Expand All @@ -66,7 +66,6 @@ def get_packages(package):
"Operating System :: OS Independent",
"Topic :: Internet :: WWW/HTTP",
"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

0 comments on commit 17b03a4

Please sign in to comment.