python-aiohttp/python-aiohttp.spec

143 lines
4.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-aiohttp
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-aiohttp
Version: 3.7.4
Release: 0
Summary: Asynchronous HTTP client/server framework
License: Apache-2.0
URL: https://github.com/aio-libs/aiohttp
Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz
Patch0: unbundle-http-parser.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module async_timeout >= 3.0}
BuildRequires: %{python_module attrs >= 17.3.0}
BuildRequires: %{python_module chardet >= 2.0}
BuildRequires: %{python_module devel >= 3.5.3}
BuildRequires: %{python_module freezegun}
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
BuildRequires: %{python_module idna_ssl >= 1.0}
BuildRequires: %{python_module multidict >= 4.5}
BuildRequires: %{python_module setuptools}
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
BuildRequires: %{python_module typing_extensions >= 3.6.5}
BuildRequires: %{python_module yarl >= 1.0}
BuildRequires: fdupes
BuildRequires: http-parser-devel
BuildRequires: python-rpm-macros
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
Requires: python >= 3.6
Requires: python-async_timeout >= 3.0
Requires: python-attrs >= 17.3.0
Requires: python-chardet >= 2.0
Requires: python-gunicorn
Requires: python-multidict >= 4.5
Requires: python-typing_extensions >= 3.6.5
Requires: python-yarl >= 1.0
Recommends: python-aiodns
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
Recommends: python-brotlipy
Recommends: python-cChardet
Suggests: %{name}-doc
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
%if 0%{?suse_version} < 1550 || "%{python_flavor}" == "python36"
Requires: python-idna_ssl >= 1.0
%endif
# SECTION test requirements
BuildRequires: %{python_module aiodns}
- update to 3.1.0: - Relax JSON content-type checking in the ``ClientResponse.json()`` to allow "application/xxx+json" instead of strict "application/json". (#2206) - Bump C HTTP parser to version 2.8 (#2730) - Accept a coroutine as an application factory in ``web.run_app`` and gunicorn worker. (#2739) - Implement application cleanup context (``app.cleanup_ctx`` property). (#2747) - Make ``writer.write_headers`` a coroutine. (#2762) - Add tracking signals for getting request/response bodies. (#2767) - Deprecate ClientResponseError.code in favor of .status to keep similarity with response classes. (#2781) - Implement ``app.add_routes()`` method. (#2787) - Implement ``web.static()`` and ``RouteTableDef.static()`` API. (#2795) - Install a test event loop as default by ``asyncio.set_event_loop()``. The change affects aiohttp test utils but backward compatibility is not broken for 99.99% of use cases. (#2804) - Refactor ``ClientResponse`` constructor: make logically required constructor arguments mandatory, drop ``_post_init()`` method. (#2820) - Use ``app.add_routes()`` in server docs everywhere (#2830) - Websockets refactoring, all websocket writer methods are converted into coroutines. (#2836) - Provide ``Content-Range`` header for ``Range`` requests (#2844) - Fix websocket client return EofStream. (#2784) - Fix websocket demo. (#2789) - Property ``BaseRequest.http_range`` now returns a python-like slice when requesting the tail of the range. It's now indicated by a negative value in ``range.start`` rather then in ``range.stop`` (#2805) - Close a connection if an unexpected exception occurs while sending a request - Fix firing DNS tracing events. (#2841) - Change ``ClientResponse.json()`` documentation to reflect that it now OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=17
2018-03-23 17:04:53 +01:00
BuildRequires: %{python_module async_generator}
BuildRequires: %{python_module brotlipy}
BuildRequires: %{python_module gunicorn}
BuildRequires: %{python_module pluggy}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module re-assert}
BuildRequires: %{python_module trustme}
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
# /SECTION
# SECTION docs
BuildRequires: %{python_module MarkupSafe}
BuildRequires: python3-Pygments >= 2.1
BuildRequires: python3-Sphinx
BuildRequires: python3-aiohttp-theme
BuildRequires: python3-sphinxcontrib-asyncio
- update to 3.1.0: - Relax JSON content-type checking in the ``ClientResponse.json()`` to allow "application/xxx+json" instead of strict "application/json". (#2206) - Bump C HTTP parser to version 2.8 (#2730) - Accept a coroutine as an application factory in ``web.run_app`` and gunicorn worker. (#2739) - Implement application cleanup context (``app.cleanup_ctx`` property). (#2747) - Make ``writer.write_headers`` a coroutine. (#2762) - Add tracking signals for getting request/response bodies. (#2767) - Deprecate ClientResponseError.code in favor of .status to keep similarity with response classes. (#2781) - Implement ``app.add_routes()`` method. (#2787) - Implement ``web.static()`` and ``RouteTableDef.static()`` API. (#2795) - Install a test event loop as default by ``asyncio.set_event_loop()``. The change affects aiohttp test utils but backward compatibility is not broken for 99.99% of use cases. (#2804) - Refactor ``ClientResponse`` constructor: make logically required constructor arguments mandatory, drop ``_post_init()`` method. (#2820) - Use ``app.add_routes()`` in server docs everywhere (#2830) - Websockets refactoring, all websocket writer methods are converted into coroutines. (#2836) - Provide ``Content-Range`` header for ``Range`` requests (#2844) - Fix websocket client return EofStream. (#2784) - Fix websocket demo. (#2789) - Property ``BaseRequest.http_range`` now returns a python-like slice when requesting the tail of the range. It's now indicated by a negative value in ``range.start`` rather then in ``range.stop`` (#2805) - Close a connection if an unexpected exception occurs while sending a request - Fix firing DNS tracing events. (#2841) - Change ``ClientResponse.json()`` documentation to reflect that it now OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=17
2018-03-23 17:04:53 +01:00
BuildRequires: python3-sphinxcontrib-blockdiag
BuildRequires: python3-sphinxcontrib-newsfeed
# /SECTION
%python_subpackages
%package -n %{name}-doc
Summary: Documentation files for %{name}
%description
Asynchronous HTTP client/server framework for Python.
- Supports both the client and server side of HTTP protocol.
- Supports both client and server WebSockets out-of-the-box.
- Web-server has middleware and pluggable routing.
%description -n %{name}-doc
HTML documentation on the API and examples for %{name}.
%prep
%setup -q -n aiohttp-%{version}
%patch0 -p1
# Prevent building with vendor version
rm vendor/http-parser/*.c
# Allow use with chardet v4
# https://github.com/aio-libs/aiohttp/pull/5333
sed -i 's/chardet>=2.0,<4.0/chardet>=2.0/' setup.py
%build
export CFLAGS="%{optflags}"
%python_build
pushd docs
%make_build html
rm _build/html/.buildinfo
popd
%install
%python_install
%{python_expand %fdupes %{buildroot}%{$python_sitearch}
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
find %{buildroot}%{$python_sitearch} -name '*.[ch]' -delete
rm -r %{buildroot}%{$python_sitearch}/aiohttp/.hash
}
%check
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
# ignore setup.cfg
touch pytest.ini
%define skiptest_allflavors test_aiohttp_request_coroutine or test_mark_formdata_as_processed or test_aiohttp_plugin_async
# we need it to be defined for all flavors for expansion inside pytest_arch to work. %%{?...} would expand too early.
%{lua: for p in string.gmatch(rpm.expand("%pythons"), "%S+") do rpm.define("skiptest_" .. p .. "_only %{nil}") end}
%if 0%{?python3_version_nodots} == 36
%define skiptest_python3_only or test_read_boundary_with_incomplete_chunk
%endif
%define skiptest_python36_only or test_read_boundary_with_incomplete_chunk
%pytest_arch --ignore ./aiohttp -rs -k 'not (%{skiptest_allflavors} %{skiptest_$python_only})'
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.rst CONTRIBUTORS.txt README.rst
Accepting request 853108 from home:bnavigator:branches:devel:languages:python - Update to v3.7.3 Features * Made exceptions pickleable. Also changed the repr of some exceptions. #4077 Bugfixes * Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase. #3532 * Fix web_middlewares.normalize_path_middleware behavior for patch without slash. #3669 * Fix overshadowing of overlapped sub-applications prefixes. #3701 * Make BaseConnector.close() a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax. #3736 * Reset the sock_read timeout each time data is received for a aiohttp.client response. #3808 * Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View #3880 * Fixed querying the address families from DNS that the current host supports. #5156 * Change return type of MultipartReader.__aiter__() and BodyPartReader.__aiter__() to AsyncIterator. #5163 * Provide x86 Windows wheels. #5230 * Improved Documentation * Add documentation for aiohttp.web.FileResponse. #3958 * Removed deprecation warning in tracing example docs #3964 * Fixed wrong "Usage" docstring of aiohttp.client.request. #4603 * Add aiohttp-pydantic to third party libraries #5228 Misc * #4102 - Also clean header files in sitearch - Remove hidden .hash directory (remnant from build process) - Fix python 3.6 build * For Leap * For TW with python36 flavor gh#openSUSE/python-rpm-macros#66 * Always BuildRequire idna_ssl * Skip a failing test on python 3.6 * Next upstream release will drop python 3.6 OBS-URL: https://build.opensuse.org/request/show/853108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=56
2020-12-04 16:14:54 +01:00
%{python_sitearch}/aiohttp
%{python_sitearch}/aiohttp-%{version}*-info
%files -n %{name}-doc
%doc docs/_build/html
%changelog