Accepting request 1239689 from devel:languages:python
- Switch to autosetup macro. - Clean up BuildRequires for test flavor. - Add patch remove-six.patch: * Remove use of six. OBS-URL: https://build.opensuse.org/request/show/1239689 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=10
This commit is contained in:
commit
8d420c78ed
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 23 03:51:17 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to autosetup macro.
|
||||
- Clean up BuildRequires for test flavor.
|
||||
- Add patch remove-six.patch:
|
||||
* Remove use of six.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 23 08:51:03 UTC 2024 - pgajdos@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-flasgger
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -33,6 +33,8 @@ Summary: Tool to extract swagger specs from Flask projects
|
||||
License: MIT
|
||||
URL: https://github.com/flasgger/flasgger/
|
||||
Source: https://files.pythonhosted.org/packages/source/f/flasgger/flasgger-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM Based on gh#flasgger/flasgger#629
|
||||
Patch0: remove-six.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
@ -43,19 +45,12 @@ Requires: python-PyYAML >= 3.0
|
||||
Requires: python-jsonschema >= 3.0.1
|
||||
Requires: python-mistune >= 3
|
||||
Requires: python-packaging
|
||||
Requires: python-six >= 1.10
|
||||
BuildArch: noarch
|
||||
|
||||
%if %{with test}
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module flasgger = %{version}}
|
||||
BuildRequires: %{python_module Flask >= 0.10}
|
||||
BuildRequires: %{python_module PyYAML >= 3.0}
|
||||
BuildRequires: %{python_module jsonschema >= 3.0.1}
|
||||
BuildRequires: %{python_module marshmallow}
|
||||
BuildRequires: %{python_module mistune >= 3}
|
||||
BuildRequires: %{python_module pytest >= 3.0.7}
|
||||
BuildRequires: %{python_module six >= 1.10}
|
||||
# /SECTION
|
||||
%endif
|
||||
|
||||
@ -65,7 +60,7 @@ BuildRequires: %{python_module six >= 1.10}
|
||||
Flasgger is a Flask extension to extract OpenAPI=Specification from all Flask views registered in an API.
|
||||
|
||||
%prep
|
||||
%setup -q -n flasgger-%{version}
|
||||
%autosetup -p1 -n flasgger-%{version}
|
||||
|
||||
# Examples directory is not included in PyPI release
|
||||
rm tests/test_examples.py
|
||||
|
57
remove-six.patch
Normal file
57
remove-six.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 0c4f8e15c6a730a20326ba78bf725e49e8682672 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
Date: Thu, 23 Jan 2025 14:29:09 +1100
|
||||
Subject: [PATCH] Remove use of six
|
||||
|
||||
Now that Python 2 support has been removed, we can stop using the crutch
|
||||
of six to support both versions. StringLike could probably be
|
||||
refactored now to be a subclass of str, but I have left that alone to
|
||||
make this diff small.
|
||||
---
|
||||
flasgger/utils.py | 5 ++---
|
||||
requirements.txt | 3 +--
|
||||
setup.py | 1 -
|
||||
3 files changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: flasgger-0.9.7.1/flasgger/utils.py
|
||||
===================================================================
|
||||
--- flasgger-0.9.7.1.orig/flasgger/utils.py
|
||||
+++ flasgger-0.9.7.1/flasgger/utils.py
|
||||
@@ -9,7 +9,6 @@ import re
|
||||
import sys
|
||||
import jsonschema
|
||||
import yaml
|
||||
-from six import string_types, text_type
|
||||
from copy import deepcopy
|
||||
from functools import wraps
|
||||
from importlib import import_module
|
||||
@@ -269,7 +268,7 @@ def swag_from(
|
||||
def is_path(specs):
|
||||
""" Returns True if specs is a string or pathlib.Path
|
||||
"""
|
||||
- is_str_path = isinstance(specs, string_types)
|
||||
+ is_str_path = isinstance(specs, str)
|
||||
try:
|
||||
from pathlib import Path
|
||||
is_py3_path = isinstance(specs, Path)
|
||||
@@ -928,7 +927,7 @@ class StringLike(object):
|
||||
|
||||
@property
|
||||
def text_type(self):
|
||||
- return text_type
|
||||
+ return str
|
||||
|
||||
|
||||
class LazyString(StringLike):
|
||||
Index: flasgger-0.9.7.1/setup.py
|
||||
===================================================================
|
||||
--- flasgger-0.9.7.1.orig/setup.py
|
||||
+++ flasgger-0.9.7.1/setup.py
|
||||
@@ -54,7 +54,6 @@ setup(
|
||||
'PyYAML>=3.0',
|
||||
'jsonschema>=3.0.1',
|
||||
'mistune',
|
||||
- 'six>=1.10.0',
|
||||
'packaging',
|
||||
],
|
||||
classifiers=[
|
Loading…
x
Reference in New Issue
Block a user