apache-airflow-providers-postgres 5.11.0rc1__tar.gz → 5.11.1rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (12) hide show
  1. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/PKG-INFO +6 -6
  2. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/README.rst +3 -3
  3. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/__init__.py +3 -6
  4. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/get_provider_info.py +2 -1
  5. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/hooks/postgres.py +15 -5
  6. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/pyproject.toml +3 -3
  7. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/LICENSE +0 -0
  8. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/datasets/__init__.py +0 -0
  9. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/datasets/postgres.py +0 -0
  10. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/hooks/__init__.py +0 -0
  11. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/operators/__init__.py +0 -0
  12. {apache_airflow_providers_postgres-5.11.0rc1 → apache_airflow_providers_postgres-5.11.1rc1}/airflow/providers/postgres/operators/postgres.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-postgres
3
- Version: 5.11.0rc1
3
+ Version: 5.11.1rc1
4
4
  Summary: Provider package apache-airflow-providers-postgres for Apache Airflow
5
5
  Keywords: airflow-provider,postgres,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
@@ -28,8 +28,8 @@ Requires-Dist: apache-airflow-providers-amazon>=2.6.0rc0 ; extra == "amazon"
28
28
  Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
29
29
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
30
30
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
31
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0/changelog.html
32
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0
31
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1/changelog.html
32
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1
33
33
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
34
34
  Project-URL: Source Code, https://github.com/apache/airflow
35
35
  Project-URL: Twitter, https://twitter.com/ApacheAirflow
@@ -82,7 +82,7 @@ Provides-Extra: openlineage
82
82
 
83
83
  Package ``apache-airflow-providers-postgres``
84
84
 
85
- Release: ``5.11.0.rc1``
85
+ Release: ``5.11.1.rc1``
86
86
 
87
87
 
88
88
  `PostgreSQL <https://www.postgresql.org/>`__
@@ -95,7 +95,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
95
95
  are in ``airflow.providers.postgres`` python package.
96
96
 
97
97
  You can find package information and changelog for the provider
98
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0/>`_.
98
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1/>`_.
99
99
 
100
100
  Installation
101
101
  ------------
@@ -139,4 +139,4 @@ Dependent package
139
139
  ============================================================================================================== ===============
140
140
 
141
141
  The changelog for the provider package can be found in the
142
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0/changelog.html>`_.
142
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1/changelog.html>`_.
@@ -42,7 +42,7 @@
42
42
 
43
43
  Package ``apache-airflow-providers-postgres``
44
44
 
45
- Release: ``5.11.0.rc1``
45
+ Release: ``5.11.1.rc1``
46
46
 
47
47
 
48
48
  `PostgreSQL <https://www.postgresql.org/>`__
@@ -55,7 +55,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
55
55
  are in ``airflow.providers.postgres`` python package.
56
56
 
57
57
  You can find package information and changelog for the provider
58
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0/>`_.
58
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1/>`_.
59
59
 
60
60
  Installation
61
61
  ------------
@@ -99,4 +99,4 @@ Dependent package
99
99
  ============================================================================================================== ===============
100
100
 
101
101
  The changelog for the provider package can be found in the
102
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0/changelog.html>`_.
102
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1/changelog.html>`_.
@@ -25,14 +25,11 @@ from __future__ import annotations
25
25
 
26
26
  import packaging.version
27
27
 
28
- __all__ = ["__version__"]
28
+ from airflow import __version__ as airflow_version
29
29
 
30
- __version__ = "5.11.0"
30
+ __all__ = ["__version__"]
31
31
 
32
- try:
33
- from airflow import __version__ as airflow_version
34
- except ImportError:
35
- from airflow.version import version as airflow_version
32
+ __version__ = "5.11.1"
36
33
 
37
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
38
35
  "2.7.0"
@@ -28,8 +28,9 @@ def get_provider_info():
28
28
  "name": "PostgreSQL",
29
29
  "description": "`PostgreSQL <https://www.postgresql.org/>`__\n",
30
30
  "state": "ready",
31
- "source-date-epoch": 1714477265,
31
+ "source-date-epoch": 1716288967,
32
32
  "versions": [
33
+ "5.11.1",
33
34
  "5.11.0",
34
35
  "5.10.2",
35
36
  "5.10.1",
@@ -28,6 +28,7 @@ import psycopg2.extensions
28
28
  import psycopg2.extras
29
29
  from deprecated import deprecated
30
30
  from psycopg2.extras import DictCursor, NamedTupleCursor, RealDictCursor
31
+ from sqlalchemy.engine import URL
31
32
 
32
33
  from airflow.exceptions import AirflowProviderDeprecationWarning
33
34
  from airflow.providers.common.sql.hooks.sql import DbApiHook
@@ -113,6 +114,18 @@ class PostgresHook(DbApiHook):
113
114
  def schema(self, value):
114
115
  self.database = value
115
116
 
117
+ @property
118
+ def sqlalchemy_url(self) -> URL:
119
+ conn = self.get_connection(getattr(self, self.conn_name_attr))
120
+ return URL.create(
121
+ drivername="postgresql",
122
+ username=conn.login,
123
+ password=conn.password,
124
+ host=conn.host,
125
+ port=conn.port,
126
+ database=self.database or conn.schema,
127
+ )
128
+
116
129
  def _get_cursor(self, raw_cursor: str) -> CursorType:
117
130
  _cursor = raw_cursor.lower()
118
131
  cursor_types = {
@@ -186,12 +199,9 @@ class PostgresHook(DbApiHook):
186
199
  def get_uri(self) -> str:
187
200
  """Extract the URI from the connection.
188
201
 
189
- :return: the extracted uri.
202
+ :return: the extracted URI in Sqlalchemy URI format.
190
203
  """
191
- conn = self.get_connection(getattr(self, self.conn_name_attr))
192
- conn.schema = self.database or conn.schema
193
- uri = conn.get_uri().replace("postgres://", "postgresql://")
194
- return uri
204
+ return self.sqlalchemy_url.render_as_string(hide_password=False)
195
205
 
196
206
  def bulk_load(self, table: str, tmp_file: str) -> None:
197
207
  """Load a tab-delimited file into a database table."""
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
28
28
 
29
29
  [project]
30
30
  name = "apache-airflow-providers-postgres"
31
- version = "5.11.0.rc1"
31
+ version = "5.11.1.rc1"
32
32
  description = "Provider package apache-airflow-providers-postgres for Apache Airflow"
33
33
  readme = "README.rst"
34
34
  authors = [
@@ -62,8 +62,8 @@ dependencies = [
62
62
  ]
63
63
 
64
64
  [project.urls]
65
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0"
66
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.0/changelog.html"
65
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1"
66
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1/changelog.html"
67
67
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
68
68
  "Source Code" = "https://github.com/apache/airflow"
69
69
  "Slack Chat" = "https://s.apache.org/airflow-slack"