Skip to content

Commit

Permalink
Don't overwrite psycopg2 adapters when creating the connection (#113)
Browse files Browse the repository at this point in the history
Don't overwrite psycopg2 adapters when creating the connection
  • Loading branch information
Joachim Jablon authored Nov 29, 2019
2 parents 81fe265 + a779a95 commit 6afaa82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions procrastinate/aiopg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def wrap_json(arguments: Dict[str, Any]):


def get_connection(dsn="", **kwargs) -> Awaitable[aiopg.Connection]:
# tell aiopg not to register adapters for hstore & json by default, as
# those are registered at the module level and could overwrite previously
# defined adapters
kwargs.setdefault("enable_json", False)
kwargs.setdefault("enable_hstore", False)
return aiopg.connect(dsn=dsn, **kwargs)


Expand Down

0 comments on commit 6afaa82

Please sign in to comment.