Xavier Morel
authored
When the database_or_uri is not a URI, rather than generate a dsn string just collect the various psycopg2.connect keyword arguments in a dictionary, and return that. This way psycopg2/libpq is the one doing any necessary processing on the various parameters. Fixes #3865 and fixes #6958 in a more resilient manner than manually escaping dsn-injected values so database names or passwords containing spaces or non-ascii characters work correctly. In case a URI is provided to the dsn() function, return it as the `dsn` keyword to get the same behaviour as previously. Since we're checking dsns by equality, a dict should work just as well as a string.
Name | Last commit | Last update |
---|---|---|
.. | ||
addons | ||
cli | ||
conf | ||
modules | ||
osv | ||
report | ||
service | ||
tests | ||
tools | ||
workflow | ||
PKG-INFO | ||
__init__.py | ||
api.py | ||
exceptions.py | ||
fields.py | ||
http.py | ||
import_xml.rng | ||
loglevels.py | ||
models.py | ||
netsvc.py | ||
pooler.py | ||
release.py | ||
sql_db.py |