From df2106cf981fe5fc4efa22423f766a418e4e79f2 Mon Sep 17 00:00:00 2001 From: p1c2u Date: Thu, 2 Mar 2023 07:44:40 +0000 Subject: [PATCH 1/2] openapi-schema-validator 0.5.2 tests compatibility fix --- poetry.lock | 29 ++++++++---- tests/unit/unmarshalling/test_validate.py | 54 ----------------------- 2 files changed, 20 insertions(+), 63 deletions(-) diff --git a/poetry.lock b/poetry.lock index b32291e2..3cf50d89 100644 --- a/poetry.lock +++ b/poetry.lock @@ -530,7 +530,7 @@ setuptools = "*" [[package]] name = "openapi-schema-validator" -version = "0.4.0" +version = "0.4.3" description = "OpenAPI schema validation for Python" category = "main" optional = false @@ -538,11 +538,7 @@ python-versions = ">=3.7.0,<4.0.0" [package.dependencies] jsonschema = ">=4.0.0,<5.0.0" - -[package.extras] -isodate = ["isodate"] -rfc3339-validator = ["rfc3339-validator"] -strict-rfc3339 = ["strict-rfc3339"] +rfc3339-validator = "*" [[package]] name = "openapi-spec-validator" @@ -804,6 +800,17 @@ urllib3 = ">=1.25.10" [package.extras] tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "types-requests"] +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +description = "A pure python RFC3339 validator" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +six = "*" + [[package]] name = "rfc3986" version = "1.5.0" @@ -1123,7 +1130,7 @@ starlette = [] [metadata] lock-version = "1.1" python-versions = "^3.7.0" -content-hash = "e5ec69330ace1d6535f46237a0887688df8a933a5490f6f0b0da20d1e1f4d56c" +content-hash = "cc334cce47b3171b831527cb360f0484209a664b0e87e138bbcdd6ade0964e28" [metadata.files] alabaster = [ @@ -1475,8 +1482,8 @@ nodeenv = [ {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, ] openapi-schema-validator = [ - {file = "openapi_schema_validator-0.4.0-py3-none-any.whl", hash = "sha256:f1faaae0b1076d6f6bf6ad5d8bb53f49d9cc49621f5e224e2bc121ef76016c04"}, - {file = "openapi_schema_validator-0.4.0.tar.gz", hash = "sha256:fb591258bbe1e24f381d83cff2e9a1a6fc547936adb46143fdd089f6ea411cc8"}, + {file = "openapi_schema_validator-0.4.3-py3-none-any.whl", hash = "sha256:f1eff2a7936546a3ce62b88a17d09de93c9bd229cbc43cb696c988a61a382548"}, + {file = "openapi_schema_validator-0.4.3.tar.gz", hash = "sha256:6940dba9f4906c97078fea6fd9d5a3a3384207db368c4e32f6af6abd7c5c560b"}, ] openapi-spec-validator = [ {file = "openapi_spec_validator-0.5.2-py3-none-any.whl", hash = "sha256:1f8db08ecbcf4ec8c558d65b65b3b7b428f81da6642f2f163e992ae3e17b229c"}, @@ -1623,6 +1630,10 @@ responses = [ {file = "responses-0.22.0-py3-none-any.whl", hash = "sha256:dcf294d204d14c436fddcc74caefdbc5764795a40ff4e6a7740ed8ddbf3294be"}, {file = "responses-0.22.0.tar.gz", hash = "sha256:396acb2a13d25297789a5866b4881cf4e46ffd49cc26c43ab1117f40b973102e"}, ] +rfc3339-validator = [ + {file = "rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa"}, + {file = "rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b"}, +] rfc3986 = [ {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, diff --git a/tests/unit/unmarshalling/test_validate.py b/tests/unit/unmarshalling/test_validate.py index 9ad18fa5..4d33ab02 100644 --- a/tests/unit/unmarshalling/test_validate.py +++ b/tests/unit/unmarshalling/test_validate.py @@ -384,7 +384,6 @@ def test_string_invalid(self, value, validator_factory): @pytest.mark.parametrize( "value", [ - b"true", "test", False, 1, @@ -441,7 +440,6 @@ def test_string_format_uuid(self, value, validator_factory): @pytest.mark.parametrize( "value", [ - b"true", "true", False, 1, @@ -464,7 +462,6 @@ def test_string_format_uuid_invalid(self, value, validator_factory): @pytest.mark.parametrize( "value", [ - b"true", "true", False, 1, @@ -483,57 +480,6 @@ def test_string_format_datetime_invalid(self, value, validator_factory): with pytest.raises(InvalidSchemaValue): validator_factory(spec).validate(value) - @pytest.mark.parametrize( - "value", - [ - "1989-01-02T00:00:00Z", - "2018-01-02T23:59:59Z", - ], - ) - @mock.patch( - "openapi_schema_validator._format." "DATETIME_HAS_STRICT_RFC3339", True - ) - @mock.patch( - "openapi_schema_validator._format." "DATETIME_HAS_ISODATE", False - ) - def test_string_format_datetime_strict_rfc3339( - self, value, validator_factory - ): - schema = { - "type": "string", - "format": "date-time", - } - spec = Spec.from_dict(schema) - - result = validator_factory(spec).validate(value) - - assert result is None - - @pytest.mark.parametrize( - "value", - [ - "1989-01-02T00:00:00Z", - "2018-01-02T23:59:59Z", - ], - ) - @mock.patch( - "openapi_schema_validator._format." "DATETIME_HAS_STRICT_RFC3339", - False, - ) - @mock.patch( - "openapi_schema_validator._format." "DATETIME_HAS_ISODATE", True - ) - def test_string_format_datetime_isodate(self, value, validator_factory): - schema = { - "type": "string", - "format": "date-time", - } - spec = Spec.from_dict(schema) - - result = validator_factory(spec).validate(value) - - assert result is None - @pytest.mark.parametrize( "value", [ From eaa16373f06b5b2a82331e770bd31095fb869e51 Mon Sep 17 00:00:00 2001 From: p1c2u Date: Thu, 2 Mar 2023 07:49:43 +0000 Subject: [PATCH 2/2] Version 0.16.6 --- .bumpversion.cfg | 2 +- openapi_core/__init__.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9975878e..94492e3c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.16.5 +current_version = 0.16.6 tag = True tag_name = {new_version} commit = True diff --git a/openapi_core/__init__.py b/openapi_core/__init__.py index 11184b3d..35ab4e0d 100644 --- a/openapi_core/__init__.py +++ b/openapi_core/__init__.py @@ -20,7 +20,7 @@ __author__ = "Artur Maciag" __email__ = "maciag.artur@gmail.com" -__version__ = "0.16.5" +__version__ = "0.16.6" __url__ = "https://github.com/p1c2u/openapi-core" __license__ = "BSD 3-Clause License" diff --git a/pyproject.toml b/pyproject.toml index 824a52fc..1ac13d8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ ignore_missing_imports = true [tool.poetry] name = "openapi-core" -version = "0.16.5" +version = "0.16.6" description = "client-side and server-side support for the OpenAPI Specification v3" authors = ["Artur Maciag "] license = "BSD-3-Clause" 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