diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-12 18:46:25 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-08-13 14:25:44 -0400 |
commit | cd03b8f0cecbf72ecd6c99c4d3a6338c8278b40d (patch) | |
tree | 32b50cef944f41b1cfd5bd7b0dfd45af448e793b /lib/sqlalchemy/dialects/postgresql/asyncpg.py | |
parent | 65da69910944ccbad0c6d008b94ae8271aae4762 (diff) | |
download | sqlalchemy-cd03b8f0cecbf72ecd6c99c4d3a6338c8278b40d.tar.gz |
Use importlib_metadata; add namespace for mariadb
The ``importlib_metadata`` library is used to scan for setuptools
entrypoints rather than pkg_resources. as importlib_metadata is a small
library that is included as of Python 3.8, the compatibility library is
installed as a dependency for Python versions older than 3.8.
Unfortunately setuptools "attr:" is broken because it tries to import
the module; seems like this is fixed as part of
https://github.com/pypa/setuptools/pull/1753 however this is too recent
to rely upon for now.
Added a new dialect token "mariadb" that may be used in place of "mysql" in
the :func:`_sa.create_engine` URL. This will deliver a MariaDB dialect
subclass of the MySQLDialect in use that forces the "is_mariadb" flag to
True. The dialect will raise an error if a server version string that does
not indicate MariaDB in use is received. This is useful for
MariaDB-specific testing scenarios as well as to support applications that
are hardcoding to MariaDB-only concepts. As MariaDB and MySQL featuresets
and usage patterns continue to diverge, this pattern may become more
prominent.
Fixes: #5400
Fixes: #5496
Change-Id: I330815ebe572b6a9818377da56621397335fa702
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py')
0 files changed, 0 insertions, 0 deletions