1
0

25 Commits

Author SHA256 Message Date
a9cf1fdaf1 Accepting request 1277022 from devel:languages:python
- Add patch support-click-8.2.patch:
  * Support click 8.2+.

OBS-URL: https://build.opensuse.org/request/show/1277022
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=11
2025-05-23 12:27:07 +00:00
0cb479875d - Add patch support-click-8.2.patch:
* Support click 8.2+.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=25
2025-05-13 06:50:27 +00:00
8d420c78ed 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
2025-01-29 15:09:45 +00:00
e698e4f3f6 Fix Requires to be correct
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=23
2025-01-23 03:51:36 +00:00
f14e3414e0 Accepting request 1197743 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1197743
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=9
2024-09-01 17:20:52 +00:00
cd53350350 Accepting request 1136453 from devel:languages:python
- require setuptools

OBS-URL: https://build.opensuse.org/request/show/1136453
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=8
2024-01-05 21:59:36 +00:00
b8145e3446 - require setuptools
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=19
2024-01-03 10:05:11 +00:00
c03052e5d6 Accepting request 1130835 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1130835
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=7
2023-12-05 16:02:42 +00:00
e79e6a0154 - require new mistune
* swagger-ui 3 version updated to 3.20.5

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=17
2023-11-27 18:45:38 +00:00
0d8b45f440 Accepting request 1102797 from devel:languages:python
- Update to 0.9.7.1:
  * fix: flask >== 2.3 json encoder change
  * removed usage of safe_str_cmp of werkzeug. using hmac.compare_digest
    instead (#532)
  * Fix openapi3 request parse validation (#505)
  * Fix required body if one parameter is required (#476)
  * Implemented the SwaggerUI urls config parameter which displays a
    dropdown of API specs instead of an editable textbox (#473)
  * Fix indentation in readme example (#480)
  * fix path parameter bug for integers (#485)
  * Wrapping APISpecsView get response in a try except (#420)
  * Trivial flake issue resolved for docker build of flasgger (#452)
  * Deprecate imp [Breaks py2.7 compatibility] (#413) Resolves #434
  * Remove python2
  * Fix error format and add regression tests
  * Extract is_openapi3 in utils and test it
  * Add flask_mongorest
  * Set displayOperationId to true
  * Add use func validate from utils
  * add test case for post request
  * Change test for swag_schema
  * Add Swagger UI auth config to ui.inioauth
  * Make available oauth2 redirect html
- Switch to pyproject macros.
- Stop using globs in %files

OBS-URL: https://build.opensuse.org/request/show/1102797
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=6
2023-08-14 20:34:59 +00:00
447ad00ce0 - Update to 0.9.7.1:
* fix: flask >== 2.3 json encoder change
  * removed usage of safe_str_cmp of werkzeug. using hmac.compare_digest
    instead (#532)
  * Fix openapi3 request parse validation (#505)
  * Fix required body if one parameter is required (#476)
  * Implemented the SwaggerUI urls config parameter which displays a
    dropdown of API specs instead of an editable textbox (#473)
  * Fix indentation in readme example (#480)
  * fix path parameter bug for integers (#485)
  * Wrapping APISpecsView get response in a try except (#420)
  * Trivial flake issue resolved for docker build of flasgger (#452)
  * Deprecate imp [Breaks py2.7 compatibility] (#413) Resolves #434
  * Remove python2
  * Fix error format and add regression tests
  * Extract is_openapi3 in utils and test it
  * Add flask_mongorest
  * Set displayOperationId to true
  * Add use func validate from utils
  * add test case for post request
  * Change test for swag_schema
  * Add Swagger UI auth config to ui.inioauth
  * Make available oauth2 redirect html
- Switch to pyproject macros.
- Stop using globs in %files

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=15
2023-08-08 05:36:42 +00:00
1e286b768b Accepting request 1081923 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1081923
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=5
2023-04-22 20:00:59 +00:00
8be51f7125 Accepting request 1081409 from home:dirkmueller:acdc:as_python3_module
SR for python stack proposal

OBS-URL: https://build.opensuse.org/request/show/1081409
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=13
2023-04-21 14:39:19 +00:00
603e02803d Accepting request 1044191 from devel:languages:python
- Add multibuild for tests to avoid package build cycle.
  flasgger -> flex (testing) -> httpbin -> flasgger
- Re-activate test suite
- Also remove the conditional definition of python_module.

OBS-URL: https://build.opensuse.org/request/show/1044191
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=4
2022-12-24 13:51:02 +00:00
4570c3694c - Add multibuild for tests to avoid package build cycle.
flasgger -> flex (testing) -> httpbin -> flasgger

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=11
2022-12-22 08:54:14 +00:00
bd80881954 - Also remove the conditional definition of python_module.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=10
2022-10-25 05:24:51 +00:00
2dc5ba161e Accepting request 1030588 from home:jayvdb:branches:devel:languages:python
- Re-activate test suite

OBS-URL: https://build.opensuse.org/request/show/1030588
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=9
2022-10-25 05:17:54 +00:00
ad16f6de7b Accepting request 973574 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/973574
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=3
2022-04-29 22:45:06 +00:00
5d9559dbf0 Accepting request 973573 from home:mcalabkova:branches:devel:languages:python
- Update to 0.9.5
  * 'swag_from' supports 'pathlib.Path'
  * Added support for OpenAPI3 parameter schema parsing
  * Add support for custom validation_function and error_handler
  * Ensure downward compatibility for werkzeug
  * Changed jsonschema version supported to jsonschema>=3.0.1
  * Changed json data to be parsed from request directly
  * More changes, see upstream HISTORY

OBS-URL: https://build.opensuse.org/request/show/973573
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=7
2022-04-28 07:31:54 +00:00
4bb70e312f Accepting request 721314 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/721314
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=2
2019-08-08 12:21:21 +00:00
Todd R
8a0b4216b3 Accepting request 721313 from home:TheBlackCat:branches:devel:languages:python
Update to 0.9.3

OBS-URL: https://build.opensuse.org/request/show/721313
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=5
2019-08-06 14:41:32 +00:00
7e6871232e Accepting request 685315 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/685315
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flasgger?expand=0&rev=1
2019-03-29 19:35:21 +00:00
Tomáš Chvátal
983aa534cb - Comment the builddeps as they create cycle, when the tests are
actually working we need to mulitbuild this pkg

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=3
2019-03-15 10:36:25 +00:00
Tomáš Chvátal
dbbecb7166 Accepting request 685085 from home:jengelh:branches:devel:languages:python
- Generalize description and use noun phrase.

OBS-URL: https://build.opensuse.org/request/show/685085
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=2
2019-03-14 18:44:45 +00:00
Tomáš Chvátal
5204073a7b - Initial commit, needed by httpbin
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=1
2019-03-14 13:09:21 +00:00
4 changed files with 116 additions and 9 deletions

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue May 13 06:49:59 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-click-8.2.patch:
* Support click 8.2+.
-------------------------------------------------------------------
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

View File

@@ -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,10 @@ 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
# PATCH-FIX-UPSTREAM gh#flasgger/flasgger#633
Patch1: support-click-8.2.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
@@ -43,19 +47,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 +62,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
View 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=[

39
support-click-8.2.patch Normal file
View File

@@ -0,0 +1,39 @@
From 08591b60e988c0002fcf1b1e9f98b78e041d2732 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Tue, 4 Mar 2025 10:13:55 +0000
Subject: [PATCH] Fix tests with Click 8.2
https://github.com/pallets/click/pull/2523 introduced changes to
`click.testing` that broke a few unit tests in Flasgger:
`mix_stderr=False` is now effectively the default and can no longer be
specified explicitly. Although this Click version hasn't been fully
released yet, this adjusts Flasgger to work with both old and new
versions.
---
tests/conftest.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index bb83d682..5acb4923 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,7 +1,9 @@
+import inspect
import json
import random
import pytest
+from click.testing import CliRunner
from flasgger import Swagger
from flasgger.utils import get_examples
@@ -99,4 +101,8 @@ def app():
@pytest.fixture(scope="function")
def cli_runner(app):
- yield app.test_cli_runner(mix_stderr=False)
+ kwargs = {}
+ if "mix_stderr" in inspect.signature(CliRunner).parameters:
+ # click < 8.2
+ kwargs["mix_stderr"] = False
+ yield app.test_cli_runner(**kwargs)