]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Genericize str() for types
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Aug 2020 17:57:04 +0000 (13:57 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Aug 2020 23:49:15 +0000 (19:49 -0400)
commit0721a6bede7222386b2a2508aac5590909fbb148
tree28593583f5d15ebb301af1993bd8c8e110e2c751
parent3d5a64ac09b55514da6fd30f0f085348c2d10496
Genericize str() for types

Remove lookup logic that attempts to locate a dialect for a type,
just use StrSQLTypeCompiler.

Cleaned up the internal ``str()`` for datatypes so that all types produce a
string representation without any dialect present, including that it works
for third-party dialect types without that dialect being present.  The
string representation defaults to being the UPPERCASE name of that type
with nothing else.

Fixes: #4262
Change-Id: I02149e8a1ba1e7336149e962939b07ae0df83c6b
doc/build/changelog/unreleased_14/4262.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/type_api.py
test/dialect/mssql/test_types.py
test/sql/test_compiler.py
test/sql/test_metadata.py
test/sql/test_types.py