Skip to content

Commit d6c85d6

Browse files
Update Python dependencies (#130)
* 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 ad48532 commit d6c85d6

3 files changed

Lines changed: 50 additions & 50 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[project]
55
name = "postgresql-charms-single-kernel"
66
description = "Shared and reusable code for PostgreSQL-related charms"
7-
version = "16.2.1"
7+
version = "16.2.2"
88
readme = "README.md"
99
license = {file = "LICENSE"}
1010
authors = [
@@ -35,11 +35,11 @@ module-root = ""
3535

3636
[dependency-groups]
3737
format = [
38-
"ruff==0.15.13"
38+
"ruff==0.15.14"
3939
]
4040
lint = [
4141
"codespell==2.4.2",
42-
"ty==0.0.37"
42+
"ty==0.0.39"
4343
]
4444
unit = [
4545
"coverage[toml]==7.14.0",

single_kernel_postgresql/utils/postgresql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,14 +1381,14 @@ def build_postgresql_parameters(
13811381
parameters[parameter] = value
13821382
shared_buffers_max_value_in_mb = int(available_memory * 0.4 / 10**6)
13831383
shared_buffers_max_value = int(shared_buffers_max_value_in_mb * 10**3 / 8)
1384-
if parameters.get("shared_buffers", 0) > shared_buffers_max_value:
1384+
if int(parameters.get("shared_buffers", 0)) > shared_buffers_max_value:
13851385
raise Exception(
13861386
f"Shared buffers config option should be at most 40% of the available memory, which is {shared_buffers_max_value_in_mb}MB"
13871387
)
13881388
if profile == "production":
13891389
if "shared_buffers" in parameters:
13901390
# Convert to bytes to use in the calculation.
1391-
shared_buffers = parameters["shared_buffers"] * 8 * 10**3
1391+
shared_buffers = int(parameters["shared_buffers"]) * 8 * 10**3
13921392
else:
13931393
# Use 25% of the available memory for shared_buffers.
13941394
# and the remaining as cache memory.

0 commit comments

Comments
 (0)