diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-02-15 23:43:51 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-02-17 14:45:04 -0500 |
commit | 5157e0aa542f390242dd7a6d27a6ce1663230e46 (patch) | |
tree | 113f0e5a83e8229c7d0cb9e9c47387e1d703cb29 /lib/sqlalchemy/ext/mypy/plugin.py | |
parent | 20213fd1f27fea51015d753bf94c6f40674ae86f (diff) | |
download | sqlalchemy-5157e0aa542f390242dd7a6d27a6ce1663230e46.tar.gz |
pep-484 for pool
also extends into some areas of utils, events and others
as needed.
Formalizes a public hierarchy for pool API,
with ManagesConnection -> PoolProxiedConnection /
ConnectionPoolEntry for connectionfairy / connectionrecord,
which are now what's exposed in the event API and other
APIs. all public API docs moved to the new objects.
Corrects the mypy plugin's check for sqlalchemy-stubs
not being insatlled, which has to be imported using the
dash in the name to be effective.
Change-Id: I16c2cb43b2e840d28e70a015f370a768e70f3581
Diffstat (limited to 'lib/sqlalchemy/ext/mypy/plugin.py')
-rw-r--r-- | lib/sqlalchemy/ext/mypy/plugin.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/ext/mypy/plugin.py b/lib/sqlalchemy/ext/mypy/plugin.py index 3a78ab188..f7e66e341 100644 --- a/lib/sqlalchemy/ext/mypy/plugin.py +++ b/lib/sqlalchemy/ext/mypy/plugin.py @@ -43,16 +43,16 @@ from . import names from . import util try: - import sqlalchemy_stubs # noqa + __import__("sqlalchemy-stubs") except ImportError: pass else: - import sqlalchemy - raise ImportError( - f"The SQLAlchemy mypy plugin in SQLAlchemy " - f"{sqlalchemy.__version__} does not work with sqlalchemy-stubs or " - "sqlalchemy2-stubs installed" + "The SQLAlchemy mypy plugin in SQLAlchemy " + "2.0 does not work with sqlalchemy-stubs or " + "sqlalchemy2-stubs installed, as well as with any other third party " + "SQLAlchemy stubs. Please uninstall all SQLAlchemy stubs " + "packages." ) |