]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support DNS-less connections for psycopg2
authorJulian Mehnle <julian@mehnle.net>
Thu, 21 Mar 2019 21:54:22 +0000 (17:54 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Mar 2019 16:03:28 +0000 (12:03 -0400)
commita31da95e002e34d639daef27d972eb364a1ebd13
tree9504073515f0310fc8898291fc5a3cdd955e2fa4
parent8acbc2624fb4b457e47fab93e6a44a1e37caeddc
Support DNS-less connections for psycopg2

Added support for parameter-less connection URLs for the psycopg2 dialect,
meaning, the URL can be passed to :func:`.create_engine` as
``"postgresql+psycopg2://"`` with no additional arguments to indicate an
empty DSN passed to libpq, which indicates to connect to "localhost" with
no username, password, or database given. Pull request courtesy Julian
Mehnle.

Fixes: #4562
Closes: #4563
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4563
Pull-request-sha: 8a05c96944a0523b06e9772cfe1832e500a43641

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