Accepting request 1077693 from home:pgajdos:python

- version update to 1.8.1
  * Update URL for RFC by @nijel in #63
  * Copy parse_rule since it was removed in werkzeug 2.2 by @Klikini in #61
  * mulitcore: Fix false positive warnings in merge_domaindata by @phlax in #59
  * Fix typos by @kianmeng in #56
  * I18n and l10n support by @olivier-heurtier in #57
- added patches
  fix https://github.com/sphinx-contrib/httpdomain/issues/70
  + python-sphinxcontrib-httpdomain-fix-version.patch
  fix https://github.com/sphinx-contrib/httpdomain/issues/69
  + python-sphinxcontrib-httpdomain-pyupgrade3.patch

OBS-URL: https://build.opensuse.org/request/show/1077693
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-httpdomain?expand=0&rev=50
This commit is contained in:
2023-04-07 07:50:24 +00:00
committed by Git OBS Bridge
parent efecfbfe51
commit 09398a5d55
6 changed files with 148 additions and 5 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0151c249b30d44c025be562bd00440e8ccede7a5a28f0f5cdbb6519d56984495
size 38228

3
1.8.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8c58e5874474f6b9b2100d6bddb2140d8a82d459cd20cd62342405c7e84811a6
size 41281

View File

@@ -0,0 +1,14 @@
Index: httpdomain-1.8.1/setup.py
===================================================================
--- httpdomain-1.8.1.orig/setup.py
+++ httpdomain-1.8.1/setup.py
@@ -20,7 +20,7 @@ def readme():
setup(
name='sphinxcontrib-httpdomain',
- version='1.8.0',
+ version='1.8.1',
url='https://github.com/sphinx-contrib/httpdomain',
download_url='https://pypi.org/project/sphinxcontrib-httpdomain/',
license='BSD',

View File

@@ -0,0 +1,109 @@
Index: httpdomain-1.8.1/sphinxcontrib/autohttp/bottle.py
===================================================================
--- httpdomain-1.8.1.orig/sphinxcontrib/autohttp/bottle.py
+++ httpdomain-1.8.1/sphinxcontrib/autohttp/bottle.py
@@ -93,8 +93,7 @@ class AutobottleDirective(Directive):
continue
docstring = prepare_docstring(docstring)
- for line in http_directive(method, path, docstring):
- yield line
+ yield from http_directive(method, path, docstring)
def run(self):
node = nodes.section()
Index: httpdomain-1.8.1/sphinxcontrib/autohttp/common.py
===================================================================
--- httpdomain-1.8.1.orig/sphinxcontrib/autohttp/common.py
+++ httpdomain-1.8.1/sphinxcontrib/autohttp/common.py
@@ -9,8 +9,8 @@
"""
import six
-from six.moves import builtins
-from six.moves import reduce
+import builtins
+from functools import reduce
def import_object(import_name):
module_name, expr = import_name.split(':', 1)
@@ -24,10 +24,10 @@ def import_object(import_name):
def http_directive(method, path, content):
method = method.lower().strip()
- if isinstance(content, six.string_types):
+ if isinstance(content, str):
content = content.splitlines()
yield ''
- paths = [path] if isinstance(path, six.string_types) else path
+ paths = [path] if isinstance(path, str) else path
for path in paths:
yield '.. http:{method}:: {path}'.format(**locals())
yield ''
Index: httpdomain-1.8.1/sphinxcontrib/autohttp/flask.py
===================================================================
--- httpdomain-1.8.1.orig/sphinxcontrib/autohttp/flask.py
+++ httpdomain-1.8.1/sphinxcontrib/autohttp/flask.py
@@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
-from __future__ import absolute_import
import re
import itertools
Index: httpdomain-1.8.1/sphinxcontrib/autohttp/flask_base.py
===================================================================
--- httpdomain-1.8.1.orig/sphinxcontrib/autohttp/flask_base.py
+++ httpdomain-1.8.1/sphinxcontrib/autohttp/flask_base.py
@@ -90,7 +90,7 @@ def get_routes(app, endpoint=None, order
endpoints = []
for rule in app.url_map.iter_rules(endpoint):
url_with_endpoint = (
- six.text_type(next(app.url_map.iter_rules(rule.endpoint))),
+ str(next(app.url_map.iter_rules(rule.endpoint))),
rule.endpoint
)
if url_with_endpoint not in endpoints:
@@ -126,9 +126,9 @@ def cleanup_methods(methods):
def quickref_directive(method, path, content, blueprint=None, auto=False):
- rcomp = re.compile("^\s*.. :quickref:\s*(?P<quick>.*)$")
+ rcomp = re.compile(r"^\s*.. :quickref:\s*(?P<quick>.*)$")
method = method.lower().strip()
- if isinstance(content, six.string_types):
+ if isinstance(content, str):
content = content.splitlines()
description = ""
name = ""
@@ -154,7 +154,7 @@ def quickref_directive(method, path, con
row = {}
row['name'] = name
- row['operation'] = ' - `%s %s <#%s-%s>`_' % (
+ row['operation'] = ' - `{} {} <#{}-{}>`_'.format(
method.upper(), path, method.lower(), ref)
row['description'] = description
@@ -311,5 +311,4 @@ class AutoflaskBase(Directive):
blueprint, auto=auto)
yield row
else:
- for line in http_directive(method, paths, docstring):
- yield line
+ yield from http_directive(method, paths, docstring)
Index: httpdomain-1.8.1/sphinxcontrib/autohttp/tornado.py
===================================================================
--- httpdomain-1.8.1.orig/sphinxcontrib/autohttp/tornado.py
+++ httpdomain-1.8.1/sphinxcontrib/autohttp/tornado.py
@@ -133,8 +133,7 @@ class AutoTornadoDirective(Directive):
continue
docstring = prepare_docstring(docstring)
- for line in http_directive(method, normalize_path(path), docstring):
- yield line
+ yield from http_directive(method, normalize_path(path), docstring)
def run(self):
node = nodes.section()

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Apr 6 09:11:28 UTC 2023 - pgajdos@suse.com
- version update to 1.8.1
* Update URL for RFC by @nijel in #63
* Copy parse_rule since it was removed in werkzeug 2.2 by @Klikini in #61
* mulitcore: Fix false positive warnings in merge_domaindata by @phlax in #59
* Fix typos by @kianmeng in #56
* I18n and l10n support by @olivier-heurtier in #57
- added patches
fix https://github.com/sphinx-contrib/httpdomain/issues/70
+ python-sphinxcontrib-httpdomain-fix-version.patch
fix https://github.com/sphinx-contrib/httpdomain/issues/69
+ python-sphinxcontrib-httpdomain-pyupgrade3.patch
-------------------------------------------------------------------
Mon Mar 14 07:24:41 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-sphinxcontrib-httpdomain
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,12 +19,16 @@
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-sphinxcontrib-httpdomain
Version: 1.8.0
Version: 1.8.1
Release: 0
Summary: Sphinx domain for HTTP APIs
License: BSD-2-Clause
URL: https://github.com/sphinx-contrib/httpdomain
Source: https://github.com/sphinx-contrib/httpdomain/archive/%{version}.tar.gz
# https://github.com/sphinx-contrib/httpdomain/issues/70
Patch0: python-sphinxcontrib-httpdomain-fix-version.patch
# https://github.com/sphinx-contrib/httpdomain/issues/69
Patch1: python-sphinxcontrib-httpdomain-pyupgrade3.patch
BuildRequires: %{python_module Flask >= 0.11}
BuildRequires: %{python_module Sphinx >= 1.5}
BuildRequires: %{python_module bottle >= 0.11.0}
@@ -63,6 +67,7 @@ https://sphinxcontrib-httpdomain.readthedocs.io/en/stable/
%license LICENSE
%doc README.rst
%{python_sitelib}/sphinxcontrib/autohttp/
%{python_sitelib}/sphinxcontrib/locale/
%{python_sitelib}/sphinxcontrib/httpdomain.py*
%pycache_only %{python_sitelib}/sphinxcontrib/__pycache__
%{python_sitelib}/sphinxcontrib_httpdomain-%{version}-py*-nspkg.pth