From 7c44b80ed7d592ec17b38410ba72abecafdcd825 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Wed, 21 Oct 2020 10:35:34 +0200 Subject: [PATCH] Remove psycopg2 and pymysql from the direct dependencies Related to https://github.com/encode/databases/pull/204 --- CHANGELOG.md | 6 ++++++ README.md | 3 +++ databases/__init__.py | 2 +- setup.py | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2f2fb12..1bf2575b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.4.1 (October 21st, 2020) + +### Fixed + +* Remove package dependency on the synchronous DB drivers (#256) + ## 0.4.0 (October 20th, 2020) ### Added diff --git a/README.md b/README.md index 4eaf2cb2..dc98a63c 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ $ pip install databases[sqlite] ``` Driver support is provided using one of [asyncpg][asyncpg], [aiomysql][aiomysql], or [aiosqlite][aiosqlite]. +Note that if you are using any synchronous SQLAlchemy functions such as `engine.create_all()` or [alembic][alembic] migrations then you still have to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and [pymysql][pymysql] for MySQL. --- @@ -93,6 +94,8 @@ for examples of how to start using databases together with SQLAlchemy core expre [sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/ [sqlalchemy-core-tutorial]: https://docs.sqlalchemy.org/en/latest/core/tutorial.html [alembic]: https://alembic.sqlalchemy.org/en/latest/ +[psycopg2]: https://www.psycopg.org/ +[pymysql]: https://github.com/PyMySQL/PyMySQL [asyncpg]: https://github.com/MagicStack/asyncpg [aiomysql]: https://github.com/aio-libs/aiomysql [aiosqlite]: https://github.com/jreese/aiosqlite diff --git a/databases/__init__.py b/databases/__init__.py index 4ed205c2..1353c78d 100644 --- a/databases/__init__.py +++ b/databases/__init__.py @@ -1,4 +1,4 @@ from databases.core import Database, DatabaseURL -__version__ = "0.4.0" +__version__ = "0.4.1" __all__ = ["Database", "DatabaseURL"] diff --git a/setup.py b/setup.py index 73f2ddd6..62894c2b 100644 --- a/setup.py +++ b/setup.py @@ -50,8 +50,8 @@ def get_packages(package): data_files=[("", ["LICENSE.md"])], install_requires=["sqlalchemy", 'aiocontextvars;python_version<"3.7"'], extras_require={ - "postgresql": ["asyncpg", "psycopg2"], - "mysql": ["aiomysql", "pymysql"], + "postgresql": ["asyncpg"], + "mysql": ["aiomysql"], "sqlite": ["aiosqlite"], "postgresql+aiopg": ["aiopg"] },