apache-airflow-providers-postgres 6.2.0rc1__tar.gz → 6.2.1__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 (39) hide show
  1. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/PKG-INFO +11 -12
  2. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/README.rst +4 -4
  3. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/changelog.rst +13 -0
  4. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/index.rst +3 -3
  5. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/provider.yaml +2 -1
  6. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/pyproject.toml +7 -8
  7. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/__init__.py +1 -1
  8. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/hooks/postgres.py +12 -6
  9. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/.latest-doc-only-change.txt +0 -0
  10. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/commits.rst +0 -0
  11. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/conf.py +0 -0
  12. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/connections/postgres.rst +0 -0
  13. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/dialects.rst +0 -0
  14. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/installing-providers-from-sources.rst +0 -0
  15. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/integration-logos/Postgres.png +0 -0
  16. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/operators.rst +0 -0
  17. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/redirects.txt +0 -0
  18. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/docs/security.rst +0 -0
  19. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/__init__.py +0 -0
  20. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/__init__.py +0 -0
  21. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/LICENSE +0 -0
  22. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/assets/__init__.py +0 -0
  23. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/assets/postgres.py +0 -0
  24. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/dialects/__init__.py +0 -0
  25. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/dialects/postgres.py +0 -0
  26. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/get_provider_info.py +0 -0
  27. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/src/airflow/providers/postgres/hooks/__init__.py +0 -0
  28. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/conftest.py +0 -0
  29. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/system/__init__.py +0 -0
  30. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/system/postgres/__init__.py +0 -0
  31. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/system/postgres/example_postgres.py +0 -0
  32. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/__init__.py +0 -0
  33. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/__init__.py +0 -0
  34. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/assets/__init__.py +0 -0
  35. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/assets/test_postgres.py +0 -0
  36. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/dialects/__init__.py +0 -0
  37. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/dialects/test_postgres.py +0 -0
  38. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/hooks/__init__.py +0 -0
  39. {apache_airflow_providers_postgres-6.2.0rc1 → apache_airflow_providers_postgres-6.2.1}/tests/unit/postgres/hooks/test_postgres.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-postgres
3
- Version: 6.2.0rc1
3
+ Version: 6.2.1
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>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.9
8
+ Requires-Python: ~=3.10
9
9
  Description-Content-Type: text/x-rst
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
@@ -15,20 +15,19 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Framework :: Apache Airflow
16
16
  Classifier: Framework :: Apache Airflow :: Provider
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
22
21
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0rc1
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.23.0rc1
22
+ Requires-Dist: apache-airflow>=2.10.0
23
+ Requires-Dist: apache-airflow-providers-common-sql>=1.23.0
25
24
  Requires-Dist: psycopg2-binary>=2.9.9
26
25
  Requires-Dist: asyncpg>=0.30.0
27
- Requires-Dist: apache-airflow-providers-amazon>=2.6.0rc1 ; extra == "amazon"
26
+ Requires-Dist: apache-airflow-providers-amazon>=2.6.0 ; extra == "amazon"
28
27
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
29
28
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
30
- Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-postgres/6.2.0/changelog.html
31
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-postgres/6.2.0
29
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1/changelog.html
30
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1
32
31
  Project-URL: Mastodon, https://fosstodon.org/@airflow
33
32
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
34
33
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -61,7 +60,7 @@ Provides-Extra: openlineage
61
60
 
62
61
  Package ``apache-airflow-providers-postgres``
63
62
 
64
- Release: ``6.2.0``
63
+ Release: ``6.2.1``
65
64
 
66
65
 
67
66
  `PostgreSQL <https://www.postgresql.org/>`__
@@ -74,7 +73,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
74
73
  are in ``airflow.providers.postgres`` python package.
75
74
 
76
75
  You can find package information and changelog for the provider
77
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.0/>`_.
76
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1/>`_.
78
77
 
79
78
  Installation
80
79
  ------------
@@ -83,7 +82,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
83
82
  for the minimum Airflow version supported) via
84
83
  ``pip install apache-airflow-providers-postgres``
85
84
 
86
- The package supports the following python versions: 3.9,3.10,3.11,3.12
85
+ The package supports the following python versions: 3.10,3.11,3.12
87
86
 
88
87
  Requirements
89
88
  ------------
@@ -119,5 +118,5 @@ Dependent package
119
118
  ============================================================================================================== ===============
120
119
 
121
120
  The changelog for the provider package can be found in the
122
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.0/changelog.html>`_.
121
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1/changelog.html>`_.
123
122
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-postgres``
25
25
 
26
- Release: ``6.2.0``
26
+ Release: ``6.2.1``
27
27
 
28
28
 
29
29
  `PostgreSQL <https://www.postgresql.org/>`__
@@ -36,7 +36,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
36
36
  are in ``airflow.providers.postgres`` python package.
37
37
 
38
38
  You can find package information and changelog for the provider
39
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.0/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -45,7 +45,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
45
45
  for the minimum Airflow version supported) via
46
46
  ``pip install apache-airflow-providers-postgres``
47
47
 
48
- The package supports the following python versions: 3.9,3.10,3.11,3.12
48
+ The package supports the following python versions: 3.10,3.11,3.12
49
49
 
50
50
  Requirements
51
51
  ------------
@@ -81,4 +81,4 @@ Dependent package
81
81
  ============================================================================================================== ===============
82
82
 
83
83
  The changelog for the provider package can be found in the
84
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.0/changelog.html>`_.
84
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1/changelog.html>`_.
@@ -27,6 +27,19 @@
27
27
  Changelog
28
28
  ---------
29
29
 
30
+ 6.2.1
31
+ .....
32
+
33
+ Misc
34
+ ~~~~
35
+
36
+ * ``Move 'BaseHook' implementation to task SDK (#51873)``
37
+ * ``Disable UP038 ruff rule and revert mandatory 'X | Y' in insintance checks (#52644)``
38
+ * ``Drop support for Python 3.9 (#52072)``
39
+
40
+ .. Below changes are excluded from the changelog. Move them to
41
+ appropriate section above if needed. Do not delete the lines(!):
42
+
30
43
  6.2.0
31
44
  .....
32
45
 
@@ -77,7 +77,7 @@ apache-airflow-providers-postgres package
77
77
  `PostgreSQL <https://www.postgresql.org/>`__
78
78
 
79
79
 
80
- Release: 6.2.0
80
+ Release: 6.2.1
81
81
 
82
82
  Provider package
83
83
  ----------------
@@ -133,5 +133,5 @@ Downloading official packages
133
133
  You can download officially released packages and verify their checksums and signatures from the
134
134
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
135
135
 
136
- * `The apache-airflow-providers-postgres 6.2.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.0.tar.gz.sha512>`__)
137
- * `The apache-airflow-providers-postgres 6.2.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.0-py3-none-any.whl.sha512>`__)
136
+ * `The apache-airflow-providers-postgres 6.2.1 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.1.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.1.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.1.tar.gz.sha512>`__)
137
+ * `The apache-airflow-providers-postgres 6.2.1 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.1-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.1-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_postgres-6.2.1-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,13 @@ description: |
22
22
  `PostgreSQL <https://www.postgresql.org/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1747133567
25
+ source-date-epoch: 1751474070
26
26
  # Note that those versions are maintained by release manager - do not update them manually
27
27
  # with the exception of case where other provider in sources has >= new provider version.
28
28
  # In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
29
29
  # to be done in the same PR
30
30
  versions:
31
+ - 6.2.1
31
32
  - 6.2.0
32
33
  - 6.1.3
33
34
  - 6.1.2
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-postgres"
28
- version = "6.2.0rc1"
28
+ version = "6.2.1"
29
29
  description = "Provider package apache-airflow-providers-postgres for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -44,21 +44,20 @@ classifiers = [
44
44
  "Framework :: Apache Airflow",
45
45
  "Framework :: Apache Airflow :: Provider",
46
46
  "License :: OSI Approved :: Apache Software License",
47
- "Programming Language :: Python :: 3.9",
48
47
  "Programming Language :: Python :: 3.10",
49
48
  "Programming Language :: Python :: 3.11",
50
49
  "Programming Language :: Python :: 3.12",
51
50
  "Topic :: System :: Monitoring",
52
51
  ]
53
- requires-python = "~=3.9"
52
+ requires-python = "~=3.10"
54
53
 
55
54
  # The dependencies should be modified in place in the generated file.
56
55
  # Any change in the dependencies is preserved when the file is regenerated
57
56
  # Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
58
57
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
59
58
  dependencies = [
60
- "apache-airflow>=2.10.0rc1",
61
- "apache-airflow-providers-common-sql>=1.23.0rc1",
59
+ "apache-airflow>=2.10.0",
60
+ "apache-airflow-providers-common-sql>=1.23.0",
62
61
  "psycopg2-binary>=2.9.9",
63
62
  "asyncpg>=0.30.0",
64
63
  ]
@@ -67,7 +66,7 @@ dependencies = [
67
66
  # Any change in the dependencies is preserved when the file is regenerated
68
67
  [project.optional-dependencies]
69
68
  "amazon" = [
70
- "apache-airflow-providers-amazon>=2.6.0rc1",
69
+ "apache-airflow-providers-amazon>=2.6.0",
71
70
  ]
72
71
  "openlineage" = [
73
72
  "apache-airflow-providers-openlineage"
@@ -110,8 +109,8 @@ apache-airflow-providers-common-sql = {workspace = true}
110
109
  apache-airflow-providers-standard = {workspace = true}
111
110
 
112
111
  [project.urls]
113
- "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-postgres/6.2.0"
114
- "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-postgres/6.2.0/changelog.html"
112
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1"
113
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.2.1/changelog.html"
115
114
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
116
115
  "Source Code" = "https://github.com/apache/airflow"
117
116
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "6.2.0"
32
+ __version__ = "6.2.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -20,7 +20,7 @@ from __future__ import annotations
20
20
  import os
21
21
  from contextlib import closing
22
22
  from copy import deepcopy
23
- from typing import TYPE_CHECKING, Any, Union
23
+ from typing import TYPE_CHECKING, Any, TypeAlias, cast
24
24
 
25
25
  import psycopg2
26
26
  import psycopg2.extensions
@@ -35,11 +35,15 @@ from airflow.providers.postgres.dialects.postgres import PostgresDialect
35
35
  if TYPE_CHECKING:
36
36
  from psycopg2.extensions import connection
37
37
 
38
- from airflow.models.connection import Connection
39
38
  from airflow.providers.common.sql.dialects.dialect import Dialect
40
39
  from airflow.providers.openlineage.sqlparser import DatabaseInfo
41
40
 
42
- CursorType = Union[DictCursor, RealDictCursor, NamedTupleCursor]
41
+ try:
42
+ from airflow.sdk import Connection
43
+ except ImportError:
44
+ from airflow.models.connection import Connection # type: ignore[assignment]
45
+
46
+ CursorType: TypeAlias = DictCursor | RealDictCursor | NamedTupleCursor
43
47
 
44
48
 
45
49
  class PostgresHook(DbApiHook):
@@ -256,7 +260,9 @@ class PostgresHook(DbApiHook):
256
260
  port = conn.port or 5439
257
261
  # Pull the custer-identifier from the beginning of the Redshift URL
258
262
  # ex. my-cluster.ccdre4hpd39h.us-east-1.redshift.amazonaws.com returns my-cluster
259
- cluster_identifier = conn.extra_dejson.get("cluster-identifier", conn.host.split(".")[0])
263
+ cluster_identifier = conn.extra_dejson.get(
264
+ "cluster-identifier", cast("str", conn.host).split(".")[0]
265
+ )
260
266
  redshift_client = AwsBaseHook(aws_conn_id=aws_conn_id, client_type="redshift").conn
261
267
  # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/redshift/client/get_cluster_credentials.html#Redshift.Client.get_cluster_credentials
262
268
  cluster_creds = redshift_client.get_cluster_credentials(
@@ -272,7 +278,7 @@ class PostgresHook(DbApiHook):
272
278
  # Pull the workgroup-name from the query params/extras, if not there then pull it from the
273
279
  # beginning of the Redshift URL
274
280
  # ex. workgroup-name.ccdre4hpd39h.us-east-1.redshift.amazonaws.com returns workgroup-name
275
- workgroup_name = conn.extra_dejson.get("workgroup-name", conn.host.split(".")[0])
281
+ workgroup_name = conn.extra_dejson.get("workgroup-name", cast("str", conn.host).split(".")[0])
276
282
  redshift_serverless_client = AwsBaseHook(
277
283
  aws_conn_id=aws_conn_id, client_type="redshift-serverless"
278
284
  ).conn
@@ -288,7 +294,7 @@ class PostgresHook(DbApiHook):
288
294
  rds_client = AwsBaseHook(aws_conn_id=aws_conn_id, client_type="rds").conn
289
295
  # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds/client/generate_db_auth_token.html#RDS.Client.generate_db_auth_token
290
296
  token = rds_client.generate_db_auth_token(conn.host, port, conn.login)
291
- return login, token, port
297
+ return cast("str", login), cast("str", token), port
292
298
 
293
299
  def get_table_primary_key(self, table: str, schema: str | None = "public") -> list[str] | None:
294
300
  """