diff --git a/pyproject.toml b/pyproject.toml index f70e14d..0b1dfe5 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 @@ -29,14 +29,29 @@ 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 = "*" [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" @@ -46,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/_*