Notification time stamped 2023-06-30 17:04:51 UTC
From 6735ae0ac3f44c25f7c5e71003ffcf4ca3ad6c5b Mon Sep 17 00:00:00 2001 From: Mattia Verga mattia.verga@proton.me Date: Dec 22 2022 07:44:43 +0000 Subject: Patch to avoid package dependency on modern python
---
diff --git a/openapi-core_0.16.4_avoid-dependency.patch b/openapi-core_0.16.4_avoid-dependency.patch new file mode 100644 index 0000000..93298d6 --- /dev/null +++ b/openapi-core_0.16.4_avoid-dependency.patch @@ -0,0 +1,44 @@ +From 35d1af88c82b5126ac8d99dc32df5794709a199e Mon Sep 17 00:00:00 2001 +From: Mattia Verga mattia.verga@tiscali.it +Date: Thu, 22 Dec 2022 08:24:04 +0100 +Subject: [PATCH] Avoid dependency on modern python + +--- + openapi_core/unmarshalling/schemas/factories.py | 6 +++++- + pyproject.toml | 2 +- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/openapi_core/unmarshalling/schemas/factories.py b/openapi_core/unmarshalling/schemas/factories.py +index 9440cae9..cf6c60a1 100644 +--- a/openapi_core/unmarshalling/schemas/factories.py ++++ b/openapi_core/unmarshalling/schemas/factories.py +@@ -1,3 +1,4 @@ ++import sys + import warnings + from typing import Any + from typing import Dict +@@ -6,7 +7,10 @@ + from typing import Type + from typing import Union + +-from backports.cached_property import cached_property ++if sys.version_info >= (3, 9): ++ from functools import cached_property ++else: ++ from backports.cached_property import cached_property + from jsonschema.protocols import Validator + from openapi_schema_validator import OAS30Validator + +diff --git a/pyproject.toml b/pyproject.toml +index b358f8fd..9a2c18b5 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -65,7 +65,7 @@ requests = {version = "*", optional = true} + werkzeug = "*" + typing-extensions = "^4.3.0" + jsonschema-spec = "^0.1.1" +-backports-cached-property = "^1.0.2" ++backports-cached-property = {version = "^1.0.2", python = "<3.9" } + + [tool.poetry.extras] + django = ["django"] diff --git a/python-openapi-core.spec b/python-openapi-core.spec index b006d76..999e6e9 100644 --- a/python-openapi-core.spec +++ b/python-openapi-core.spec @@ -10,6 +10,9 @@ License: BSD-3-Clause URL: https://pypi.python.org/pypi/%%7Bsrcname%7D Source: %{pypi_source openapi_core}
+# https://github.com/p1c2u/openapi-core/pull/450 +Patch: openapi-core_0.16.4_avoid-dependency.patch + BuildArch: noarch BuildRequires: python3-devel BuildRequires: poetry @@ -34,7 +37,7 @@ Summary: %{summary}
%prep -%autosetup -n %{modname}-%{version} +%autosetup -n %{modname}-%{version} -p1
%generate_buildrequires %pyproject_buildrequires -x django -x falcon -x flask -x requests -x starlette
https://src.fedoraproject.org/rpms/python-openapi-core/c/6735ae0ac3f44c25f7c...
scm-commits@lists.fedoraproject.org