From 2e37d3c5143987878bdf8813ca7dcdcda54d0f8f Mon Sep 17 00:00:00 2001 From: Chiori Ndukwe Date: Tue, 24 Mar 2026 23:42:29 +0100 Subject: [PATCH 1/3] chore(deps): relax jsonschema constraint to >=4.23,<5. --- pyproject.toml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f70e14d..6b74348 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,22 @@ python = "^3.8" # For more reference go to: # https://github.com/python-jsonschema/jsonschema/issues/1117 # https://github.com/python-jsonschema/jsonschema/issues/1114 -jsonschema = ">4, <4.18" +# +# Current state (2024–2025): +# jsonschema >= 4.18 ships pure-Python wheels (py3-none-any) +# rpds-py provides pre-built wheels for common platforms (manylinux, macOS, Windows, ARM) +# Rust is only required when building rpds-py from source +# +# NOTE: +# While rpds-py ships prebuilt wheels, Rust may still be required if pip falls +# back to source builds (e.g., unsupported platforms, outdated pip,or +# --no-binary usage). Build environments SHOULD prefer +# wheels (e.g., --only-binary=:all:) to avoid reintroducing this dependency. +# +# The constraint is therefore relaxed to align with current ecosystem behavior +# and downstream requirements (e.g., litellm >= 1.82.3 requires jsonschema >= 4.23), +# while preserving API stability (<5.0.0). +jsonschema = ">4.23, <5.0" ops = "*" pyyaml = "*" requests = "*" From 41e4e05f8dbf68fc45a83975fd46ce7788aff8a6 Mon Sep 17 00:00:00 2001 From: Chiori Ndukwe Date: Tue, 24 Mar 2026 23:59:59 +0100 Subject: [PATCH 2/3] chore(deps): upgraded python to 3.9 due to compatibility issues with json-schema. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6b74348..a305b5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.8" +python = "^3.9" # Pinning jsonschema because its dependencies introduced # a dependency of rustc, which we don't want to have installed # in charms that use SDI From 2c8e5624d3b3eed86e1b6ef4695570a65d31ab3d Mon Sep 17 00:00:00 2001 From: Chiori Ndukwe Date: Wed, 25 Mar 2026 01:20:29 +0100 Subject: [PATCH 3/3] chore(deps-dev): modernize testing and linting tools - Updated deprecated Poetry `dev-dependencies` section to comply with modern Poetry standards. - Bumped `flake8` to `^7.0` to resolve `importlib.metadata.EntryPoints` compatibility issues. - Bumped `pytest` to `^8.0` to resolve `_pytest.scope` import errors triggered by modern plugins. - Fixed `flake8` configuration syntax by moving inline explanations out of the `ignore` block. --- pyproject.toml | 4 ++-- tox.ini | 26 ++++++++++++++++++-------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a305b5e..0b1dfe5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ requests = "*" [tool.poetry.dev-dependencies] black = "^23.1" -flake8 = "^3.8" +flake8 = "^7.0" flake8-builtins = "^1.5.3" flake8-copyright = "^0.2.4" flake8-docstrings = "^1.6.0" @@ -61,7 +61,7 @@ isort = "^5.9" mdformat = "^0.7" mdformat-gfm = "^0.3" mypy = "^1.4" -pytest = "^6.2" +pytest = "^8.0" pytest-mock = "^3.6" types-jsonschema = "^3.2" types-pyyaml = "^5.4" diff --git a/tox.ini b/tox.ini index 64233e7..d6542a1 100644 --- a/tox.ini +++ b/tox.ini @@ -3,15 +3,25 @@ max-line-length = 100 max-doc-length = 100 max-complexity = 11 docstring-convention = google + +# IGNORE RULES EXPLANATION: +# W503: line break before binary operator +# W504: line break after binary operator +# D100: module-level docstring +# D104: package-level docstring +# D105: magic method docstring +# D107: __init__ docstring +# D401: "imperative mood" in docstrings +# N818: exceptions must have Error suffix ignore = - W503, # line break before binary operator - W504, # line break after binary operator - D100, # module-level docstring - D104, # package-level docstring - D105, # magic method docstring - D107, # __init__ docstring - D401, # "imperative mood" in docstrings - N818 # exceptions must have Error suffix + W503, + W504, + D100, + D104, + D105, + D107, + D401, + N818 builtins = FileNotFoundError exclude = juju/client/_*