Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 64dd1b3

Browse files
committed
Add python 3.7 back to support
* Revert changes automatically applied by IDE * Fix formatting of CI caused by IDE changes * Codebase cleanup for SQLAlchemy 2.0 * Fix EOL in mkdocs
1 parent 4cc05b9 commit 64dd1b3

File tree

6 files changed

+78
-81
lines changed

6 files changed

+78
-81
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Publish
44
on:
55
push:
66
tags:
7-
- "*"
7+
- '*'
88

99
jobs:
1010
publish:
@@ -15,7 +15,7 @@ jobs:
1515
- uses: "actions/checkout@v3"
1616
- uses: "actions/setup-python@v4"
1717
with:
18-
python-version: 3.8
18+
python-version: 3.7
1919
- name: "Install dependencies"
2020
run: "scripts/install"
2121
- name: "Build package & docs"

.github/workflows/test-suite.yml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
11
---
2-
name: Test Suite
2+
name: Test Suite
33

4-
on:
5-
push:
6-
branches: ["master"]
7-
pull_request:
8-
branches: ["master"]
4+
on:
5+
push:
6+
branches: ["master"]
7+
pull_request:
8+
branches: ["master"]
99

10-
jobs:
11-
tests:
12-
name: "Python ${{ matrix.python-version }}"
13-
runs-on: "ubuntu-latest"
10+
jobs:
11+
tests:
12+
name: "Python ${{ matrix.python-version }}"
13+
runs-on: "ubuntu-latest"
1414

15-
strategy:
16-
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11"]
15+
strategy:
16+
matrix:
17+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1818

19-
services:
20-
mysql:
21-
image: mysql:5.7
22-
env:
23-
MYSQL_USER: username
24-
MYSQL_PASSWORD: password
25-
MYSQL_ROOT_PASSWORD: password
26-
MYSQL_DATABASE: testsuite
27-
ports:
28-
- 3306:3306
29-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
19+
services:
20+
mysql:
21+
image: mysql:5.7
22+
env:
23+
MYSQL_USER: username
24+
MYSQL_PASSWORD: password
25+
MYSQL_ROOT_PASSWORD: password
26+
MYSQL_DATABASE: testsuite
27+
ports:
28+
- 3306:3306
29+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3030

31-
postgres:
32-
image: postgres:14
33-
env:
34-
POSTGRES_USER: username
35-
POSTGRES_PASSWORD: password
36-
POSTGRES_DB: testsuite
37-
ports:
38-
- 5432:5432
39-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
31+
postgres:
32+
image: postgres:14
33+
env:
34+
POSTGRES_USER: username
35+
POSTGRES_PASSWORD: password
36+
POSTGRES_DB: testsuite
37+
ports:
38+
- 5432:5432
39+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
4040

41-
steps:
42-
- uses: "actions/checkout@v3"
43-
- uses: "actions/setup-python@v4"
44-
with:
45-
python-version: "${{ matrix.python-version }}"
46-
- name: "Install dependencies"
47-
run: "scripts/install"
48-
- name: "Run linting checks"
49-
run: "scripts/check"
50-
- name: "Build package & docs"
51-
run: "scripts/build"
52-
- name: "Run tests"
53-
env:
54-
TEST_DATABASE_URLS: |
55-
sqlite:///testsuite,
56-
sqlite+aiosqlite:///testsuite,
57-
mysql://username:password@localhost:3306/testsuite,
58-
mysql+aiomysql://username:password@localhost:3306/testsuite,
59-
mysql+asyncmy://username:password@localhost:3306/testsuite,
60-
postgresql://username:password@localhost:5432/testsuite,
61-
postgresql+aiopg://username:[email protected]:5432/testsuite,
62-
postgresql+asyncpg://username:password@localhost:5432/testsuite
63-
run: "scripts/test"
41+
steps:
42+
- uses: "actions/checkout@v3"
43+
- uses: "actions/setup-python@v4"
44+
with:
45+
python-version: "${{ matrix.python-version }}"
46+
- name: "Install dependencies"
47+
run: "scripts/install"
48+
- name: "Run linting checks"
49+
run: "scripts/check"
50+
- name: "Build package & docs"
51+
run: "scripts/build"
52+
- name: "Run tests"
53+
env:
54+
TEST_DATABASE_URLS: |
55+
sqlite:///testsuite,
56+
sqlite+aiosqlite:///testsuite,
57+
mysql://username:password@localhost:3306/testsuite,
58+
mysql+aiomysql://username:password@localhost:3306/testsuite,
59+
mysql+asyncmy://username:password@localhost:3306/testsuite,
60+
postgresql://username:password@localhost:5432/testsuite,
61+
postgresql+aiopg://username:[email protected]:5432/testsuite,
62+
postgresql+asyncpg://username:password@localhost:5432/testsuite
63+
run: "scripts/test"

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-co
1515
expression language, and provides support for PostgreSQL, MySQL, and SQLite.
1616

1717
Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
18-
[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado],
19-
[FastAPI][fastapi] or [Esmerald][esmerald].
18+
[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
2019

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

23-
**Requirements**: Python 3.8+
22+
**Requirements**: Python 3.7+
2423

2524
---
2625

@@ -86,7 +85,7 @@ values = [
8685
]
8786
await database.execute_many(query=query, values=values)
8887

89-
# Run a database query.
88+
# Run a database query.
9089
query = "SELECT * FROM HighScores"
9190
rows = await database.fetch_all(query=query)
9291
print('High Scores:', rows)
@@ -116,5 +115,4 @@ for examples of how to start using databases together with SQLAlchemy core expre
116115
[quart]: https://gitlab.com/pgjones/quart
117116
[aiohttp]: https://github.com/aio-libs/aiohttp
118117
[tornado]: https://github.com/tornadoweb/tornado
119-
[fastapi]: https://github.com/tiangolo/fastapi
120-
[esmerald]: https://github.com/dymmond/esmerald
118+
[fastapi]: https://github.com/tiangolo/fastapi

docs/index.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-co
1515
expression language, and provides support for PostgreSQL, MySQL, and SQLite.
1616

1717
Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
18-
[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado],
19-
[FastAPI][fastapi] or [Esmerald][esmerald].
18+
[Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
2019

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

23-
**Requirements**: Python 3.8+
22+
**Requirements**: Python 3.7+
2423

2524
---
2625

@@ -86,7 +85,7 @@ values = [
8685
]
8786
await database.execute_many(query=query, values=values)
8887

89-
# Run a database query.
88+
# Run a database query.
9089
query = "SELECT * FROM HighScores"
9190
rows = await database.fetch_all(query=query)
9291
print('High Scores:', rows)
@@ -116,5 +115,4 @@ for examples of how to start using databases together with SQLAlchemy core expre
116115
[quart]: https://gitlab.com/pgjones/quart
117116
[aiohttp]: https://github.com/aio-libs/aiohttp
118117
[tornado]: https://github.com/tornadoweb/tornado
119-
[fastapi]: https://github.com/tiangolo/fastapi
120-
[esmerald]: https://github.com/dymmond/esmerald
118+
[fastapi]: https://github.com/tiangolo/fastapi

mkdocs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ site_name: Databases
22
site_description: Async database support for Python.
33

44
theme:
5-
name: "material"
5+
name: 'material'
66

77
repo_name: encode/databases
88
repo_url: https://github.com/encode/databases
99
# edit_uri: ""
1010

1111
nav:
12-
- Introduction: "index.md"
13-
- Database Queries: "database_queries.md"
14-
- Connections & Transactions: "connections_and_transactions.md"
15-
- Tests & Migrations: "tests_and_migrations.md"
16-
- Contributing: "contributing.md"
12+
- Introduction: 'index.md'
13+
- Database Queries: 'database_queries.md'
14+
- Connections & Transactions: 'connections_and_transactions.md'
15+
- Tests & Migrations: 'tests_and_migrations.md'
16+
- Contributing: 'contributing.md'
1717

1818
markdown_extensions:
19-
- mkautodoc
20-
- admonition
21-
- pymdownx.highlight
22-
- pymdownx.superfences
19+
- mkautodoc
20+
- admonition
21+
- pymdownx.highlight
22+
- pymdownx.superfences

setup.py

Lines changed: 2 additions & 1 deletion
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.8",
40+
python_requires=">=3.7",
4141
url="https://github.com/encode/databases",
4242
license="BSD",
4343
description="Async database support for Python.",
@@ -66,6 +66,7 @@ def get_packages(package):
6666
"Operating System :: OS Independent",
6767
"Topic :: Internet :: WWW/HTTP",
6868
"Programming Language :: Python :: 3",
69+
"Programming Language :: Python :: 3.7",
6970
"Programming Language :: Python :: 3.8",
7071
"Programming Language :: Python :: 3.9",
7172
"Programming Language :: Python :: 3.10",

0 commit comments

Comments
 (0)