Accepting request 702958 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/702958 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-HTTPolice?expand=0&rev=2
This commit is contained in:
commit
47dea3cc17
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cdb9fb7b7051c8736f850612c6d5c6572983ab2dc19b69e49407c226e6a9a2c7
|
||||
size 421804
|
3
HTTPolice-0.8.0.tar.gz
Normal file
3
HTTPolice-0.8.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:56d565861776aab41875c4fbe6d476c4228bc3ae8b16a822380308bf923c5f76
|
||||
size 433330
|
@ -1,110 +0,0 @@
|
||||
From 4da2bde3d14a24b0623ee45ae10afd192d6fa771 Mon Sep 17 00:00:00 2001
|
||||
From: John Vandenberg <jayvdb@gmail.com>
|
||||
Date: Sat, 23 Feb 2019 16:54:20 +0700
|
||||
Subject: [PATCH] Use functools.singledispatch on Python 3.4+
|
||||
|
||||
singledispatch dependency is a backport of the Python 3.4+
|
||||
implementation of PEP 443
|
||||
|
||||
Closes https://github.com/vfaronov/httpolice/issues/6
|
||||
---
|
||||
httpolice/reports/common.py | 2 +-
|
||||
httpolice/reports/html.py | 3 ++-
|
||||
httpolice/reports/text.py | 2 +-
|
||||
httpolice/util/moves.py | 5 +++++
|
||||
setup.py | 2 +-
|
||||
5 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/httpolice/reports/common.py b/httpolice/reports/common.py
|
||||
index 7382851..fea50d8 100644
|
||||
--- a/httpolice/reports/common.py
|
||||
+++ b/httpolice/reports/common.py
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8; -*-
|
||||
|
||||
-from singledispatch import singledispatch
|
||||
import six
|
||||
|
||||
from httpolice import known, notice
|
||||
@@ -8,6 +7,7 @@
|
||||
from httpolice.parse import ParseError, Symbol
|
||||
from httpolice.structure import HeaderEntry, Parametrized
|
||||
from httpolice.util.text import format_chars
|
||||
+from httpolice.util.moves import singledispatch
|
||||
|
||||
|
||||
def resolve_reference(ctx, path):
|
||||
diff --git a/httpolice/reports/html.py b/httpolice/reports/html.py
|
||||
index 9ba7f55..0e4f26f 100644
|
||||
--- a/httpolice/reports/html.py
|
||||
+++ b/httpolice/reports/html.py
|
||||
@@ -5,7 +5,7 @@
|
||||
import dominate
|
||||
import dominate.tags as H
|
||||
from dominate.util import text as text_node
|
||||
-from singledispatch import singledispatch
|
||||
+
|
||||
import six
|
||||
|
||||
from httpolice import known, message, notice, structure
|
||||
@@ -16,6 +16,7 @@
|
||||
find_reason_phrase, resolve_reference)
|
||||
from httpolice.structure import Unavailable
|
||||
from httpolice.util.text import nicely_join, printable
|
||||
+from httpolice.util.moves import singledispatch
|
||||
|
||||
|
||||
###############################################################################
|
||||
diff --git a/httpolice/reports/text.py b/httpolice/reports/text.py
|
||||
index 243c812..62ceebf 100644
|
||||
--- a/httpolice/reports/text.py
|
||||
+++ b/httpolice/reports/text.py
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import codecs
|
||||
|
||||
-from singledispatch import singledispatch
|
||||
import six
|
||||
|
||||
from httpolice import notice
|
||||
@@ -10,6 +9,7 @@
|
||||
resolve_reference)
|
||||
from httpolice.util.text import (detypographize, ellipsize, printable,
|
||||
write_if_any)
|
||||
+from httpolice.util.moves import singledispatch
|
||||
|
||||
|
||||
def text_report(exchanges, buf):
|
||||
diff --git a/httpolice/util/moves.py b/httpolice/util/moves.py
|
||||
index 1cd93f9..630bfab 100644
|
||||
--- a/httpolice/util/moves.py
|
||||
+++ b/httpolice/util/moves.py
|
||||
@@ -13,3 +13,8 @@
|
||||
from urllib.parse import unquote_to_bytes
|
||||
except ImportError: # Python 2; pragma: no cover
|
||||
from urllib import unquote as unquote_to_bytes
|
||||
+
|
||||
+try: # pragma: no cover
|
||||
+ from functools import singledispatch
|
||||
+except ImportError: # Python 2 backport; pragma: no cover
|
||||
+ from singledispatch import singledispatch
|
||||
diff --git a/setup.py b/setup.py
|
||||
index b514760..fae8f83 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -33,7 +33,6 @@
|
||||
# NB: when updating these fields,
|
||||
# make sure you don't break ``tools/minimum_requires.sh``.
|
||||
install_requires=[
|
||||
- 'singledispatch >= 3.4.0.3',
|
||||
'six >= 1.10.0',
|
||||
'lxml >= 4.1.0',
|
||||
'bitstring >= 3.1.4',
|
||||
@@ -44,6 +43,7 @@
|
||||
extras_require={
|
||||
':python_version == "2.7"': [
|
||||
'enum34 >= 1.1.6',
|
||||
+ 'singledispatch >= 3.4.0.3',
|
||||
],
|
||||
},
|
||||
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 17:33:35 UTC 2019 - Ethan Apodaca <eapodaca@suse.com>
|
||||
|
||||
- Drop python2 support
|
||||
- Remove py34-no-singledispatch.patch
|
||||
- Replace brotlipy dependency with Brotli
|
||||
- Remove dependancies that are not needed to build.
|
||||
- Update to v0.8.0
|
||||
* Changes
|
||||
+ Dropped Python 2 support. If you need it, use the older versions.
|
||||
+ HTTPolice no longer requires six nor singledispatch.
|
||||
+ HTTPolice now pulls in Google's Brotli instead of brotlipy,
|
||||
but this is merely a packaging change; it can work with either.
|
||||
+ Notices 1299 and 1300 are no longer reported on Alt-Svc.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 11 17:33:39 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-HTTPolice
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,42 +12,36 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define skip_python2 1
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-HTTPolice
|
||||
Version: 0.7.0
|
||||
Version: 0.8.0
|
||||
Release: 0
|
||||
License: MIT
|
||||
Summary: Validator for HTTP
|
||||
Url: https://github.com/vfaronov/httpolice
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/vfaronov/httpolice
|
||||
Source: https://files.pythonhosted.org/packages/source/H/HTTPolice/HTTPolice-%{version}.tar.gz
|
||||
Patch0: https://github.com/vfaronov/httpolice/commit/4da2bde.patch#/py34-no-singledispatch.patch
|
||||
BuildRequires: %{python_module Brotli >= 1.0.1}
|
||||
BuildRequires: %{python_module bitstring >= 3.1.4}
|
||||
BuildRequires: %{python_module defusedxml >= 0.5.0}
|
||||
BuildRequires: %{python_module dominate >= 2.2.0}
|
||||
BuildRequires: %{python_module lxml >= 4.1.0}
|
||||
BuildRequires: %{python_module pytest-cov}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module bitstring >= 3.1.4}
|
||||
BuildRequires: %{python_module brotlipy >= 0.5.1}
|
||||
BuildRequires: %{python_module defusedxml >= 0.5.0}
|
||||
BuildRequires: %{python_module dominate >= 2.2.0}
|
||||
BuildRequires: %{python_module lxml >= 3.6.0}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module six >= 1.10.0}
|
||||
BuildRequires: python2-singledispatch >= 3.4.0.3
|
||||
BuildRequires: python-enum34 >= 1.1.6
|
||||
Requires: python-Brotli >= 1.0.1
|
||||
Requires: python-bitstring >= 3.1.4
|
||||
Requires: python-brotlipy >= 0.5.1
|
||||
Requires: python-defusedxml >= 0.5.0
|
||||
Requires: python-dominate >= 2.2.0
|
||||
Requires: python-lxml >= 3.6.0
|
||||
Requires: python-six >= 1.10.0
|
||||
%ifpython2
|
||||
Requires: python-enum34 >= 1.1.6
|
||||
Requires: python-singledispatch >= 3.4.0.3
|
||||
%endif
|
||||
Requires: python-lxml >= 4.1.0
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -57,7 +51,6 @@ problems in your HTTP server or client.
|
||||
|
||||
%prep
|
||||
%setup -q -n HTTPolice-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
export LANG=en_US.UTF-8
|
||||
@ -70,7 +63,7 @@ export LANG=en_US.UTF-8
|
||||
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
%python_exec -m pytest -o addopts=-v
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user