python-starlette/python-starlette.spec
Steve Kowalik 102797fda2 - Update to 0.18.0:
* Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
  * Add support for functools.partial in WebSocketRoute #1356.
  * Add StaticFiles packages with directory #1350.
  * Allow environment options in Jinja2Templates #1401.
  * Allow HEAD method on HttpEndpoint #1346.
  * Accept additional headers on websocket.accept message #1361 and #1422.
  * Add reason to WebSocket close ASGI event #1417.
  * Add headers attribute to UploadFile #1382.
  * Don't omit Content-Length header for Content-Length: 0 cases #1395.
  * Don't set headers for responses with 1xx, 204 and 304 status code #1397.
  * SessionMiddleware.max_age now accepts None, so cookie can last as long
    as the browser session #1387.
  * Tweak hashlib.md5() function on FileResponses ETag generation. The
    parameter usedforsecurity flag is set to False, if the flag is available
    on the system. This fixes an error raised on systems with FIPS
    enabled #1366 and #1410.
  * Fix path_params type on url_path_for() method i.e. turn str into Any #1341.
  * Host now ignores port on routing #1322. 
- Set asyncio_mode when running pytest, and stop turning warnings into
  errors.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-starlette?expand=0&rev=6
2022-02-23 01:10:08 +00:00

81 lines
2.7 KiB
RPMSpec

#
# spec file for package python-starlette
#
# 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-starlette
Version: 0.18.0
Release: 0
Summary: Lightweight ASGI framework/toolkit
License: BSD-3-Clause
URL: https://github.com/encode/starlette
Source: https://github.com/encode/starlette/archive/refs/tags/%{version}.tar.gz#/starlette-%{version}.tar.gz
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module aiofiles}
BuildRequires: %{python_module aiosqlite}
BuildRequires: %{python_module anyio}
BuildRequires: %{python_module contextlib2}
BuildRequires: %{python_module databases}
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module graphene}
BuildRequires: %{python_module itsdangerous}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-multipart}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module trio}
BuildRequires: %{python_module typing_extensions}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: (python3-aiocontextvars if python3-base < 3.7)
BuildRequires: (python36-aiocontextvars if python36-base)
BuildArch: noarch
%python_subpackages
%description
Starlette is a lightweight ASGI framework/toolkit, which is ideal for
building high performance asyncio services.
%prep
%autosetup -n starlette-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Remove unrecognized arguments: --strict-config --strict-markers
sed -i "s|--strict-config||" setup.cfg
sed -i "s|--strict-markers||" setup.cfg
sed -i "s| error$||" setup.cfg
%pytest --asyncio-mode=strict
%files %{python_files}
%doc README.md
%license LICENSE.md
%{python_sitelib}/starlette
%{python_sitelib}/starlette-%{version}*-info
%changelog