Repository: incubator-airflow Updated Branches: refs/heads/master e6d3160a0 -> f5bfda0d6
[AIRFLOW-945][AIRFLOW-941] Remove psycopg2 connection workaround Closes #2272 from dlackty/AIRFLOW-945 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f5bfda0d Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f5bfda0d Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f5bfda0d Branch: refs/heads/master Commit: f5bfda0d64b3b012cae68447c338240ce6e3f494 Parents: e6d3160 Author: Richard Lee <[email protected]> Authored: Thu May 4 21:34:38 2017 +0200 Committer: Bolke de Bruin <[email protected]> Committed: Thu May 4 21:34:38 2017 +0200 ---------------------------------------------------------------------- airflow/hooks/postgres_hook.py | 15 ++++----------- setup.py | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f5bfda0d/airflow/hooks/postgres_hook.py ---------------------------------------------------------------------- diff --git a/airflow/hooks/postgres_hook.py b/airflow/hooks/postgres_hook.py index 4b460c1..372e4e5 100644 --- a/airflow/hooks/postgres_hook.py +++ b/airflow/hooks/postgres_hook.py @@ -36,17 +36,10 @@ class PostgresHook(DbApiHook): conn = self.get_connection(self.postgres_conn_id) conn_args = dict( host=conn.host, - dbname=self.schema or conn.schema) - # work around for https://github.com/psycopg/psycopg2/issues/517 - # todo: remove when psycopg2 2.7.1 is released - # https://issues.apache.org/jira/browse/AIRFLOW-945 - if conn.port: - conn_args['port'] = conn.port - if conn.login: - conn_args['user'] = conn.login - if conn.password: - conn_args['password'] = conn.password - + user=conn.login, + password=conn.password, + dbname=self.schema or conn.schema, + port=conn.port) # check for ssl parameters in conn.extra for arg_name, arg_val in conn.extra_dejson.items(): if arg_name in ['sslmode', 'sslcert', 'sslkey', 'sslrootcert', 'sslcrl', 'application_name']: http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f5bfda0d/setup.py ---------------------------------------------------------------------- diff --git a/setup.py b/setup.py index d0c2446..0b98e56 100644 --- a/setup.py +++ b/setup.py @@ -157,7 +157,7 @@ mssql = ['pymssql>=2.1.1', 'unicodecsv>=0.14.1'] mysql = ['mysqlclient>=1.3.6'] rabbitmq = ['librabbitmq>=1.6.1'] oracle = ['cx_Oracle>=5.1.2'] -postgres = ['psycopg2>=2.6'] +postgres = ['psycopg2>=2.7.1'] salesforce = ['simple-salesforce>=0.72'] s3 = [ 'boto>=2.36.0',
