python-aiohttp/python-aiohttp.spec

123 lines
3.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-aiohttp
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%bcond_without test
Name: python-aiohttp
Version: 3.4.0
Release: 0
Summary: Asynchronous HTTP client/server framework
License: Apache-2.0
Group: Development/Languages/Python
URL: https://aiohttp.readthedocs.io/
Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz
# PATCH-FIX-OPENSUSE alarrosa@suse.com -- Fix failing tests due to issue in pytest-timeout
Patch0: remove-failing-tests-due-to-pytest-timeout-issues.patch
BuildRequires: %{python_module brotlipy}
BuildRequires: %{python_module devel >= 3.4.2}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python >= 3.4.2
Requires: python-async_timeout >= 2.0.0
Requires: python-attrs
Requires: python-chardet
Requires: python-idna_ssl >= 1.0.0
Requires: python-multidict >= 3.3.0
Requires: python-yarl >= 0.13.0
Recommends: python-aiodns
Recommends: python-cChardet
Suggests: %{name}-doc
# SECTION test requirements
%if %{with test}
- 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 async_timeout >= 2.0.0}
BuildRequires: %{python_module brotlipy}
BuildRequires: %{python_module chardet}
BuildRequires: %{python_module gunicorn}
BuildRequires: %{python_module idna_ssl >= 1.0.0}
BuildRequires: %{python_module multidict >= 3.3.0}
BuildRequires: %{python_module pluggy}
BuildRequires: %{python_module pytest-mock}
Accepting request 618898 from home:adrianSuSE:home-assistant - update to version 3.3.2: * Raise ``ConnectionResetError`` instead of ``CancelledError`` on trying to write to a closed stream. (`#2499 <https://github.com/aio-libs/aiohttp/pull/2499>`_) * Implement ``ClientTimeout`` class and support socket read timeout. (`#2768 <https://github.com/aio-libs/aiohttp/pull/2768>`_) * Enable logging when ``aiohttp.web`` is used as a program (`#2956 <https://github.com/aio-libs/aiohttp/pull/2956>`_) * Add canonical property to resources (`#2968 <https://github.com/aio-libs/aiohttp/pull/2968>`_) * Forbid reading response BODY after release (`#2983 <https://github.com/aio-libs/aiohttp/pull/2983>`_) * Implement base protocol class to avoid a dependency from internal ``asyncio.streams.FlowControlMixin`` (`#2986 <https://github.com/aio-libs/aiohttp/pull/2986>`_) * Cythonize ``@helpers.reify``, 5% boost on macro benchmark (`#2995 <https://github.com/aio-libs/aiohttp/pull/2995>`_) * Optimize HTTP parser (`#3015 <https://github.com/aio-libs/aiohttp/pull/3015>`_) * Implement ``runner.addresses`` property. (`#3036 <https://github.com/aio-libs/aiohttp/pull/3036>`_) * Use ``bytearray`` instead of a list of ``bytes`` in websocket reader. It improves websocket message reading a little. (`#3039 <https://github.com/aio-libs/aiohttp/pull/3039>`_) * Remove heartbeat on closing connection on keepalive timeout. The used hack violates HTTP protocol. (`#3041 <https://github.com/aio-libs/aiohttp/pull/3041>`_) * Limit websocket message size on reading to 4 MB by default. (`#3045 <https://github.com/aio-libs/aiohttp/pull/3045>`_) OBS-URL: https://build.opensuse.org/request/show/618898 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=21
2018-06-25 11:08:20 +02:00
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
Accepting request 618898 from home:adrianSuSE:home-assistant - update to version 3.3.2: * Raise ``ConnectionResetError`` instead of ``CancelledError`` on trying to write to a closed stream. (`#2499 <https://github.com/aio-libs/aiohttp/pull/2499>`_) * Implement ``ClientTimeout`` class and support socket read timeout. (`#2768 <https://github.com/aio-libs/aiohttp/pull/2768>`_) * Enable logging when ``aiohttp.web`` is used as a program (`#2956 <https://github.com/aio-libs/aiohttp/pull/2956>`_) * Add canonical property to resources (`#2968 <https://github.com/aio-libs/aiohttp/pull/2968>`_) * Forbid reading response BODY after release (`#2983 <https://github.com/aio-libs/aiohttp/pull/2983>`_) * Implement base protocol class to avoid a dependency from internal ``asyncio.streams.FlowControlMixin`` (`#2986 <https://github.com/aio-libs/aiohttp/pull/2986>`_) * Cythonize ``@helpers.reify``, 5% boost on macro benchmark (`#2995 <https://github.com/aio-libs/aiohttp/pull/2995>`_) * Optimize HTTP parser (`#3015 <https://github.com/aio-libs/aiohttp/pull/3015>`_) * Implement ``runner.addresses`` property. (`#3036 <https://github.com/aio-libs/aiohttp/pull/3036>`_) * Use ``bytearray`` instead of a list of ``bytes`` in websocket reader. It improves websocket message reading a little. (`#3039 <https://github.com/aio-libs/aiohttp/pull/3039>`_) * Remove heartbeat on closing connection on keepalive timeout. The used hack violates HTTP protocol. (`#3041 <https://github.com/aio-libs/aiohttp/pull/3041>`_) * Limit websocket message size on reading to 4 MB by default. (`#3045 <https://github.com/aio-libs/aiohttp/pull/3045>`_) OBS-URL: https://build.opensuse.org/request/show/618898 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=21
2018-06-25 11:08:20 +02:00
BuildRequires: %{python_module yarl >= 1.1.0}
%endif
# /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
Accepting request 618898 from home:adrianSuSE:home-assistant - update to version 3.3.2: * Raise ``ConnectionResetError`` instead of ``CancelledError`` on trying to write to a closed stream. (`#2499 <https://github.com/aio-libs/aiohttp/pull/2499>`_) * Implement ``ClientTimeout`` class and support socket read timeout. (`#2768 <https://github.com/aio-libs/aiohttp/pull/2768>`_) * Enable logging when ``aiohttp.web`` is used as a program (`#2956 <https://github.com/aio-libs/aiohttp/pull/2956>`_) * Add canonical property to resources (`#2968 <https://github.com/aio-libs/aiohttp/pull/2968>`_) * Forbid reading response BODY after release (`#2983 <https://github.com/aio-libs/aiohttp/pull/2983>`_) * Implement base protocol class to avoid a dependency from internal ``asyncio.streams.FlowControlMixin`` (`#2986 <https://github.com/aio-libs/aiohttp/pull/2986>`_) * Cythonize ``@helpers.reify``, 5% boost on macro benchmark (`#2995 <https://github.com/aio-libs/aiohttp/pull/2995>`_) * Optimize HTTP parser (`#3015 <https://github.com/aio-libs/aiohttp/pull/3015>`_) * Implement ``runner.addresses`` property. (`#3036 <https://github.com/aio-libs/aiohttp/pull/3036>`_) * Use ``bytearray`` instead of a list of ``bytes`` in websocket reader. It improves websocket message reading a little. (`#3039 <https://github.com/aio-libs/aiohttp/pull/3039>`_) * Remove heartbeat on closing connection on keepalive timeout. The used hack violates HTTP protocol. (`#3041 <https://github.com/aio-libs/aiohttp/pull/3041>`_) * Limit websocket message size on reading to 4 MB by default. (`#3045 <https://github.com/aio-libs/aiohttp/pull/3045>`_) OBS-URL: https://build.opensuse.org/request/show/618898 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=21
2018-06-25 11:08:20 +02:00
%python_subpackages
%package -n %{name}-doc
Summary: Documentation files for %{name}
Group: Documentation/HTML
%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
%build
export CFLAGS="%{optflags}"
%python_build
pushd docs
make %{?_smp_mflags} html
rm _build/html/.buildinfo
popd
%install
%python_install
%{python_expand %fdupes %{buildroot}%{$python_sitearch}
find %{buildroot}%{$python_sitearch} -name "*.c" -delete
}
%if %{with test}
%check
rm tests/test_pytest_plugin.py
%python_exec setup.py test
%endif
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.rst CONTRIBUTORS.txt HISTORY.rst README.rst
%{python_sitearch}/*
%files -n %{name}-doc
%doc docs/_build/html
%changelog