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 /doc | |
| 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 'doc')
| -rw-r--r-- | doc/build/changelog/unreleased_14/5400.rst | 9 | ||||
| -rw-r--r-- | doc/build/changelog/unreleased_14/5496.rst | 14 | ||||
| -rw-r--r-- | doc/build/dialects/mysql.rst | 4 |
3 files changed, 25 insertions, 2 deletions
diff --git a/doc/build/changelog/unreleased_14/5400.rst b/doc/build/changelog/unreleased_14/5400.rst new file mode 100644 index 000000000..8583b951c --- /dev/null +++ b/doc/build/changelog/unreleased_14/5400.rst @@ -0,0 +1,9 @@ +.. change:: + :tags: change, installation + :tickets: 5400 + + 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. + diff --git a/doc/build/changelog/unreleased_14/5496.rst b/doc/build/changelog/unreleased_14/5496.rst new file mode 100644 index 000000000..018378275 --- /dev/null +++ b/doc/build/changelog/unreleased_14/5496.rst @@ -0,0 +1,14 @@ +.. change:: + :tags: usecase, mysql + :tickets: 5496 + + 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. + diff --git a/doc/build/dialects/mysql.rst b/doc/build/dialects/mysql.rst index 65f725647..1f2236155 100644 --- a/doc/build/dialects/mysql.rst +++ b/doc/build/dialects/mysql.rst @@ -1,7 +1,7 @@ .. _mysql_toplevel: -MySQL -===== +MySQL and MariaDB +================= .. automodule:: sqlalchemy.dialects.mysql.base |
