15
0
Files
python-HTTPolice/python-HTTPolice.spec
Tomáš Chvátal 31f430ee16 Accepting request 679067 from home:jayvdb:coala:python3-bears
- Fix Python 3 tests
- Add py34-no-singledispatch.patch to remove unnecessary 'singledispatch'
  dependency, which is a backport from Python 3.4
- Update to v0.7.0
  * Changes
    + Reflecting changes in RFC 8187 and RFC 8259,
      notices 1253 (bad charset) and 1281 (bad encoding for JSON)
      are now reported for all encodings other than UTF-8, and
      notice 1255 (ISO-8859-1 in Content-Disposition) has been removed.
  * Added
    + Checks for quoted commas and semicolons that might confuse a naive parser
      (notices 1299 and 1300).
    + New checks for Link headers according to RFC 8288 (notices 1307,
      1308, and 1309).
    + Checks for immutable responses (notices 1301, 1302, and 1303).
    + Early hints are now recognized (due to their idiosyncratic semantics,
      they avoid many checks that are applied to all other responses).
    + Checks for the Accept-Post header (notice 1310).
    + Check for no Transfer-Encoding in response to HTTP/1.0 (notice 1306).
    + Check for 100 (Continue) before switching protocols (notice 1305).
    + Check that the sequence of responses to a request makes sense
      (notice 1304).
    + HAR files exported from Chrome and Insomnia are handled slightly better.
  * Fixed
    + Headers like Allow and Accept are now parsed more correctly
      (RFC Errata 5257).
    + gzip-encoded payloads are now decompressed more reliably.
    + When analyzing TCP streams, HTTPolice now uses a stricter heuristic
      for detecting HTTP/1.x streams, producing fewer spurious 1006/1009
      notices.
    + Notice 1291 (Preference-Applied needs Vary) is no longer reported
      on responses to POST.
- Use %license
- Remove unnecessary build dependencies
- Add more minimum versions

OBS-URL: https://build.opensuse.org/request/show/679067
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-HTTPolice?expand=0&rev=1
2019-02-26 08:52:26 +00:00

82 lines
2.7 KiB
RPMSpec

#
# spec file for package python-HTTPolice
#
# Copyright (c) 2018 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-HTTPolice
Version: 0.7.0
Release: 0
License: MIT
Summary: Validator for HTTP
Url: https://github.com/vfaronov/httpolice
Group: Development/Languages/Python
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 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-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
BuildArch: noarch
%python_subpackages
%description
HTTPolice is a validator or linter for HTTP requests and responses.
It can spot bad header syntax, inappropriate status codes, and other potential
problems in your HTTP server or client.
%prep
%setup -q -n HTTPolice-%{version}
%patch0 -p1
%build
export LANG=en_US.UTF-8
%python_build
%install
export LANG=en_US.UTF-8
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
%python_exec -m pytest -o addopts=-v
%files %{python_files}
%license LICENSE.txt
%doc CHANGELOG.rst README.rst
%python3_only %{_bindir}/httpolice
%{python_sitelib}/*
%changelog