]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implment encoding_errors for cx_oracle
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Aug 2019 19:09:37 +0000 (15:09 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 21 Oct 2019 18:20:24 +0000 (14:20 -0400)
commitd76cb7213557c24609a1a75d8c391aea0179562a
tree83ff13ecbcb17b779e839671fcc0567b4a85e028
parentbb9a55b6416fdd654e85f65b1cef4d86a416b43e
Implment encoding_errors for cx_oracle

Added dialect-level flag ``encoding_errors`` to the cx_Oracle dialect,
which can be specified as part of :func:`.create_engine`.   This is passed
to SQLAlchemy's unicode decoding converter under Python 2, and to
cx_Oracle's ``cursor.var()`` object as the ``encodingErrors`` parameter
under Python 3, for the very unusual case that broken encodings are present
in the target database which cannot be fetched unless error handling is
relaxed.  The value is ultimately one of the Python "encoding errors"
parameters passed to ``decode()``.

Closes: #4801
Fixes: #4799
Change-Id: I1d542ba367bcd187347c54db1fee815f7890e71c
doc/build/changelog/unreleased_13/4799.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
test/dialect/oracle/test_dialect.py