Skip to content

Commit 818e37c

Browse files
Update Python dependencies (16/edge) (#1455)
* Update Python dependencies * Fix linting --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dragomir Penev <dragomir.penev@canonical.com>
1 parent 83dd139 commit 818e37c

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

poetry.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ requires-poetry = ">=2.0.0"
77

88
[tool.poetry.dependencies]
99
python = "^3.12"
10-
ops = "^3.5.1"
11-
boto3 = "^1.42.45"
10+
ops = "^3.5.2"
11+
boto3 = "^1.42.51"
1212
pgconnstr = "^1.0.1"
1313
requests = "^2.32.5"
1414
tenacity = "^9.1.4"
1515
psycopg2 = "^2.9.11"
16-
pydantic = "^2.12.2"
16+
pydantic = "^2.12.5"
1717
jinja2 = "^3.1.6"
1818
pysyncobj = "^0.3.14"
1919
psutil = "^7.2.2"
@@ -39,14 +39,14 @@ opentelemetry-exporter-otlp-proto-http = "1.21.0"
3939
optional = true
4040

4141
[tool.poetry.group.format.dependencies]
42-
ruff = "^0.15.0"
42+
ruff = "^0.15.1"
4343

4444
[tool.poetry.group.lint]
4545
optional = true
4646

4747
[tool.poetry.group.lint.dependencies]
4848
codespell = "^2.4.1"
49-
ty = "^0.0.15"
49+
ty = "^0.0.17"
5050

5151
[tool.poetry.group.unit]
5252
optional = true

src/charm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from functools import cached_property
1919
from hashlib import shake_128
2020
from pathlib import Path
21-
from typing import Literal, get_args
21+
from typing import Any, Literal, get_args
2222
from urllib.parse import urlparse
2323

2424
import charm_refresh
@@ -277,7 +277,7 @@ class PostgresqlOperatorCharm(TypedCharmBase[CharmConfig]):
277277

278278
# Override data_models.py TypedCharmBase config
279279
@cached_property
280-
def config(self):
280+
def config(self) -> CharmConfig:
281281
"""Return a config instance validated and parsed using the provided pydantic class."""
282282
config = {
283283
# Prefer value of option name with dash (-) and fallback to name with underscore (_)
@@ -286,7 +286,7 @@ def config(self):
286286
)
287287
for config_option in self.config_type.keys() # noqa: SIM118
288288
}
289-
config = {
289+
config: dict[str, Any] = {
290290
config_option: value for config_option, value in config.items() if value is not None
291291
}
292292
return self.config_type(**config)
@@ -2853,7 +2853,7 @@ def generate_user_hash(self) -> str:
28532853
@cached_property
28542854
def generate_config_hash(self) -> str:
28552855
"""Generate current configuration hash."""
2856-
return shake_128(str(self.config.dict()).encode()).hexdigest(16)
2856+
return shake_128(str(self.config.model_dump()).encode()).hexdigest(16)
28572857

28582858
def override_patroni_restart_condition(
28592859
self, new_condition: str, repeat_cause: str | None

0 commit comments

Comments
 (0)