]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Update dialect for pg8000 version 1.16.0
authorTony Locke <tlocke@tlocke.org.uk>
Sun, 2 Aug 2020 19:19:26 +0000 (15:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 18 Aug 2020 15:12:16 +0000 (11:12 -0400)
commit06f1929b866abc2af0ff5c838e472a8b1c98d6e6
tree9f71fcea759c2c7a5012486d053355488782bcb8
parentbd61d19a1c2f5d70131ed09eee69198f75d3ac44
Update dialect for pg8000 version 1.16.0

The pg8000 dialect has been revised and modernized for the most recent
version of the pg8000 driver for PostgreSQL.  Changes to the dialect
include:

* All data types are now sent as text rather than binary.

* Using adapters, custom types can be plugged in to pg8000.

* Previously, named prepared statements were used for all statements.
  Now unnamed prepared statements are used by default, and named
  prepared statements can be used explicitly by calling the
  Connection.prepare() method, which returns a PreparedStatement
  object.

Pull request courtesy Tony Locke.

Notes by Mike: to get this all working it was needed to break
up JSONIndexType into "str" and "int" subtypes; this will be
needed for any dialect that is dependent on setinputsizes().

also includes @caselit's idea to include query params
in the dbdriver parameter.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #5451
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5451
Pull-request-sha: 639751ca9c7544801b9ede02e6cbe15a16c59c82

Change-Id: I2869bc52c330916773a41d11d12c297aecc8fcd8
13 files changed:
doc/build/changelog/unreleased_14/pg8000.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/provision.py
lib/sqlalchemy/dialects/postgresql/pg8000.py
lib/sqlalchemy/dialects/postgresql/provision.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/testing/provision.py
lib/sqlalchemy/testing/suite/test_types.py
test/dialect/postgresql/test_dialect.py
test/engine/test_deprecations.py
test/engine/test_execute.py
test/engine/test_reconnect.py
test/requirements.py
tox.ini