"]
license = "BSD-3-Clause"
@@ -43,39 +43,42 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
- "Topic :: Software Development :: Libraries"
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+ "Topic :: Software Development :: Libraries",
+ "Typing :: Typed",
]
include = [
{path = "tests", format = "sdist"},
]
[tool.poetry.dependencies]
-python = "^3.8.0"
-jsonschema = "^4.18.0"
+python = "^3.9.0"
+jsonschema = "^4.19.1"
rfc3339-validator = "*" # requred by jsonschema for date-time checker
-jsonschema-specifications = "^2023.5.2"
+jsonschema-specifications = ">=2024.10.1"
[tool.poetry.extras]
docs = ["sphinx", "sphinx-immaterial"]
[tool.poetry.dev-dependencies]
-black = "^23.3.0"
-isort = "^5.9.1"
+black = "^24.4.0"
+isort = "^5.13.2"
pre-commit = "*"
-pytest = "^7"
+pytest = "^8"
pytest-flake8 = "*"
pytest-cov = "*"
-mypy = "^1.4"
-flynt = "^0.78"
-deptry = "^0.12.0"
+mypy = "^1.14"
+flynt = "^1.0"
+deptry = "^0.16.2"
+bump2version = "^1.0.1"
[tool.poetry.group.docs.dependencies]
sphinx = ">=5.3,<8.0"
-sphinx-immaterial = "^0.11.0"
+sphinx-immaterial = ">=0.11,<0.13"
[tool.pytest.ini_options]
addopts = """
diff --git a/tests/integration/test_validators.py b/tests/integration/test_validators.py
index 9413581..e4a282a 100644
--- a/tests/integration/test_validators.py
+++ b/tests/integration/test_validators.py
@@ -540,9 +540,9 @@ def test_nullable_schema_combos(
"$defs": {
"NullableText": {
"type": "string",
- "nullable": False
- if schema_type == "oneOf"
- else is_nullable,
+ "nullable": (
+ False if schema_type == "oneOf" else is_nullable
+ ),
},
"NullableEnum": {
"type": "string",
@@ -596,6 +596,11 @@ def test_read_only(self):
format_checker=oas30_format_checker,
)
assert validator.validate({"some_prop": "hello"}) is None
+ validator = OAS30Validator(
+ schema,
+ format_checker=oas30_format_checker,
+ )
+ assert validator.validate({"some_prop": "hello"}) is None
def test_write_only(self):
schema = {
@@ -617,6 +622,11 @@ def test_write_only(self):
format_checker=oas30_format_checker,
)
assert validator.validate({"some_prop": "hello"}) is None
+ validator = OAS30Validator(
+ schema,
+ format_checker=oas30_format_checker,
+ )
+ assert validator.validate({"some_prop": "hello"}) is None
def test_required_read_only(self):
schema = {
@@ -853,5 +863,10 @@ def test_array_prefixitems_invalid(self, validator_class, value):
with pytest.raises(ValidationError) as excinfo:
validator.validate(value)
- error = "Expected at most 4 items, but found 5"
- assert error in str(excinfo.value)
+ errors = [
+ # jsonschema < 4.20.0
+ "Expected at most 4 items, but found 5",
+ # jsonschema >= 4.20.0
+ "Expected at most 4 items but found 1 extra",
+ ]
+ assert any(error in str(excinfo.value) for error in errors)
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy