dbx-tools-postgres 0.6.180__tar.gz → 0.6.181__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.
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dbx-tools-postgres
3
- Version: 0.6.180
3
+ Version: 0.6.181
4
4
  Summary: WorkspaceClient-backed Lakebase Postgres resolution, SQLAlchemy engines, advisory locks, and LISTEN/NOTIFY topic bus
5
5
  Requires-Dist: asyncpg>=0.30
6
6
  Requires-Dist: databricks-sdk>=0.63.0
7
7
  Requires-Dist: greenlet>=3.2
8
8
  Requires-Dist: psycopg[binary]>=3.2.9
9
9
  Requires-Dist: sqlalchemy>=2.0.41
10
- Requires-Dist: dbx-tools-core==0.6.180
11
- Requires-Python: >=3.10, <3.14
10
+ Requires-Dist: dbx-tools-core==0.6.181
11
+ Requires-Python: >=3.11, <3.14
12
12
  Project-URL: Source, https://github.com/reggie-db/dbx-tools/tree/main/packages/py/postgres
13
13
  Description-Content-Type: text/markdown
14
14
 
@@ -1,16 +1,16 @@
1
1
  [project]
2
2
  name = "dbx-tools-postgres"
3
- version = "0.6.180"
3
+ version = "0.6.181"
4
4
  description = "WorkspaceClient-backed Lakebase Postgres resolution, SQLAlchemy engines, advisory locks, and LISTEN/NOTIFY topic bus"
5
5
  readme = "README.md"
6
- requires-python = ">=3.10,<3.14"
6
+ requires-python = ">=3.11,<3.14"
7
7
  dependencies = [
8
8
  "asyncpg>=0.30",
9
9
  "databricks-sdk>=0.63.0",
10
10
  "greenlet>=3.2",
11
11
  "psycopg[binary]>=3.2.9",
12
12
  "sqlalchemy>=2.0.41",
13
- "dbx-tools-core==0.6.180",
13
+ "dbx-tools-core==0.6.181",
14
14
  ]
15
15
 
16
16
  [project.urls]
@@ -2,11 +2,11 @@
2
2
 
3
3
  [project]
4
4
  name = "dbx-tools-postgres"
5
- version = "0.6.180"
5
+ version = "0.6.181"
6
6
  description = "WorkspaceClient-backed Lakebase Postgres resolution, SQLAlchemy engines, advisory locks, and LISTEN/NOTIFY topic bus"
7
7
  readme = "README.md"
8
- requires-python = ">=3.10,<3.14"
9
- dependencies = ["asyncpg>=0.30", "databricks-sdk>=0.63.0", "greenlet>=3.2", "psycopg[binary]>=3.2.9", "sqlalchemy>=2.0.41", "dbx-tools-core==0.6.180"]
8
+ requires-python = ">=3.11,<3.14"
9
+ dependencies = ["asyncpg>=0.30", "databricks-sdk>=0.63.0", "greenlet>=3.2", "psycopg[binary]>=3.2.9", "sqlalchemy>=2.0.41", "dbx-tools-core==0.6.181"]
10
10
 
11
11
  [project.urls]
12
12
  Source = "https://github.com/reggie-db/dbx-tools/tree/main/packages/py/postgres"
@@ -87,7 +87,7 @@ class _CachedCredentialProvider:
87
87
  self._load = load
88
88
  self._lock = threading.RLock()
89
89
  self._token: str | None = None
90
- self._renew_at = dt.datetime.min.replace(tzinfo=dt.timezone.utc)
90
+ self._renew_at = dt.datetime.min.replace(tzinfo=dt.UTC)
91
91
 
92
92
  def __call__(self) -> str:
93
93
  token = self._token
@@ -262,9 +262,9 @@ def _credential_renewal(expiration: dt.datetime | None) -> dt.datetime:
262
262
  if expiration is None:
263
263
  return now + _DEFAULT_CREDENTIAL_LIFETIME
264
264
  normalized = (
265
- expiration.astimezone(dt.timezone.utc)
265
+ expiration.astimezone(dt.UTC)
266
266
  if expiration.tzinfo is not None
267
- else expiration.replace(tzinfo=dt.timezone.utc)
267
+ else expiration.replace(tzinfo=dt.UTC)
268
268
  )
269
269
  return max(normalized - _CREDENTIAL_REFRESH_LEAD, now + _MINIMUM_CREDENTIAL_LIFETIME)
270
270
 
@@ -274,7 +274,7 @@ def _credential_expiration(value: object) -> dt.datetime | None:
274
274
  return value
275
275
  if isinstance(value, (int, float)):
276
276
  try:
277
- return dt.datetime.fromtimestamp(value, tz=dt.timezone.utc)
277
+ return dt.datetime.fromtimestamp(value, tz=dt.UTC)
278
278
  except (OSError, OverflowError, ValueError):
279
279
  return None
280
280
  if not isinstance(value, str) or not value.strip():
@@ -295,7 +295,7 @@ def _mapping_credential_expiration(credential: Mapping[str, object]) -> dt.datet
295
295
 
296
296
 
297
297
  def _utcnow() -> dt.datetime:
298
- return dt.datetime.now(tz=dt.timezone.utc)
298
+ return dt.datetime.now(tz=dt.UTC)
299
299
 
300
300
 
301
301
  def _default_provider(
@@ -11,7 +11,7 @@ import socket
11
11
  import uuid
12
12
  from collections.abc import Awaitable, Callable, Mapping
13
13
  from dataclasses import dataclass, field
14
- from datetime import datetime, timezone
14
+ from datetime import UTC, datetime
15
15
  from typing import Any, Protocol, TypeAlias
16
16
 
17
17
  from dbx_tools.core import fnv_hash, to_identifier, to_stable_key
@@ -156,7 +156,7 @@ class PostgresTopicBus:
156
156
  type=publish.type,
157
157
  metadata={**automatic, **publish.metadata},
158
158
  body=publish.body,
159
- published_at=datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
159
+ published_at=datetime.now(UTC).isoformat().replace("+00:00", "Z"),
160
160
  )
161
161
  encoded = json.dumps(message.as_dict(), separators=(",", ":"), allow_nan=False)
162
162
  if len(encoded.encode("utf-8")) > _MAX_NOTIFY_BYTES: