]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use default repr() for quoted_name under python 3
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 23 Oct 2019 14:53:04 +0000 (10:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 24 Oct 2019 14:13:35 +0000 (10:13 -0400)
commit3bb40255df478752d775cdbb5c6eca868865ea21
tree7963e852c0cca82e65bae464a51558a3b23cbe53
parent6ba354113797d93d541f3dd68577111580bf65f8
Use default repr() for quoted_name under python 3

Changed the ``repr()`` of the :class:`.quoted_name` construct to use
regular string repr() under Python 3, rather than running it through
"backslashreplace" escaping, which can be misleading.

Modified the approach of "name normalization" for the Oracle and Firebird
dialects, which converts from the UPPERCASE-as-case-insensitive convention
of these dialects into lowercase-as-case-insensitive for SQLAlchemy, to not
automatically apply the :class:`.quoted_name` construct to a name that
matches itself under upper or lower case conversion, as is the case for
many non-european characters.   All names used within metadata structures
are converted to :class:`.quoted_name` objects in any case; the change
here would only affect the output of some inspection functions.

Moved name normalize to be under default dialect, added test coverage
in test/sql/test_quote.py

Fixes: #4931
Change-Id: Ic121b20e07249824710a54423e321d94a425362f
(cherry picked from commit f9000e2a38bc879a4964a4f396e87185d0d21cd2)
doc/build/changelog/unreleased_13/4931.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/firebird/base.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/elements.py
test/sql/test_quote.py
test/sql/test_unicode.py