]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Disallow non-native psycopg2 Unicode in Python 3; update docs
authorFederico Caselli <cfederico87@gmail.com>
Tue, 12 Jan 2021 21:14:38 +0000 (22:14 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 19 Jan 2021 15:35:02 +0000 (10:35 -0500)
commit442ca5c000aab9faa69d514e7902c9d903cbd987
treec99190377db66a82dabdbddd544f65ccc34d8e2d
parentb060ed8b4818d9a74d630ac1292386a500f4825c
Disallow non-native psycopg2 Unicode in Python 3; update docs

Fixed issue where the psycopg2 dialect would silently pass the
``use_native_unicode=False`` flag without actually having any effect under
Python 3, as the psycopg2 DBAPI uses Unicode unconditionally under Python
3.  This usage now raises an :class:`_exc.ArgumentError` when used under
Python 3. Added test support for Python 2.

Additionally, added documentation for client_encoding parameter
that may be passed to libpq directly via psycopg2.

Change-Id: I40ddf6382c157fa9399c21f0e01064197ea100f8
doc/build/changelog/unreleased_14/pg_unicode.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/psycopg2.py
test/dialect/postgresql/test_dialect.py