python-httpx/python-httpx.spec
Matej Cepl a2e02c72aa Accepting request 990456 from home:bnavigator:branches:devel:languages:python
- Update to 0.23.0
  * Drop support for Python 3.6. (#2097)
  * Use utf-8 as the default character set, instead of falling back
    to charset-normalizer for auto-detection. To enable automatic
    character set detection, see the documentation. (#2165)
  * Fix URL.copy_with for some oddly formed URL cases. (#2185)
  * Digest authentication should use case-insensitive comparison
    for determining which algorithm is being used. (#2204)
  * Fix console markup escaping in command line client. (#1866)
  * When files are used in multipart upload, ensure we always seek
    to the start of the file. (#2065)
  * Ensure that iter_bytes never yields zero-length chunks. (#2068)
  * Preserve Authorization header for redirects that are to the
    same origin, but are an http-to-https upgrade. (#2074)
  * When responses have binary output, don't print the output to
    the console in the command line client. Use output like <16086
    bytes of binary data> instead. (#2076)
  * Fix display of --proxies argument in the command line client
    help. (#2125)
  * Close responses when task cancellations occur during stream
    reading. (#2156)
  * Fix type error on accessing .request on HTTPError exceptions.
    (#2158)
- Drop CVE-2021-41945-copy_with-data-leak.patch fixed upstream
  (bsc#1199002)

The failure has been fixed (it was python-rich)

OBS-URL: https://build.opensuse.org/request/show/990456
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpx?expand=0&rev=10
2022-07-20 21:37:39 +00:00

114 lines
3.1 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-httpx%{psuffix}
Version: 0.23.0
Release: 0
Summary: Python HTTP client with async support
License: BSD-3-Clause
URL: https://github.com/encode/httpx
Source: https://github.com/encode/httpx/archive/%{version}.tar.gz#/httpx-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi
Requires: python-httpcore >= 0.15.0
Requires: python-idna >= 2.0
Requires: python-rfc3986 >= 1.3
Requires: python-sniffio
Recommends: python-Brotli
Recommends: python-Pygments >= 2
Recommends: python-click >= 8
Recommends: python-h2 >= 3.0
Recommends: python-rich >= 10
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module Brotli}
BuildRequires: %{python_module Pygments >= 2}
BuildRequires: %{python_module chardet >= 5.0}
BuildRequires: %{python_module click >= 8}
BuildRequires: %{python_module h2 >= 3.0}
BuildRequires: %{python_module httpx = %{version}}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-trio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module rich >= 10}
BuildRequires: %{python_module trio}
BuildRequires: %{python_module trustme}
BuildRequires: %{python_module uvicorn}
%endif
# /SECTION
%python_subpackages
%description
Python HTTP client with async support.
%prep
%autosetup -p1 -n httpx-%{version}
# remove turning pytest warnings into error
sed -i '/tool.pytest/,$ {/error/d}' setup.cfg
%build
%python_build
%install
%if !%{with test}
%python_install
%python_clone -a %{buildroot}%{_bindir}/httpx
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
# obs builds offline
donttest="network"
# no socksio
donttest="$donttest or socks"
%pytest -vv -k "not ($donttest)" --asyncio-mode=strict
%endif
%post
%python_install_alternative httpx
%postun
%python_uninstall_alternative httpx
%if !%{with test}
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE.md
%python_alternative %{_bindir}/httpx
%{python_sitelib}/httpx
%{python_sitelib}/httpx-%{version}*-info
%endif
%changelog