From 263cacade9432ef6a1c1a015fba532c1bb759f55 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Sep 10 2021 16:32:20 +0000 Subject: Restore uvicorn[standard] dependency in fastapi[all] --- diff --git a/python-fastapi.spec b/python-fastapi.spec index c1bef9e..ed5d8e9 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -3,10 +3,6 @@ # As of 2021-08-11, mkdocs and many of its dependencies are orphaned. %bcond_with mkdocs -# Temporarily remove uvicorn from the “all” extra until -# https://bugzilla.redhat.com/show_bug.cgi?id=1969166 is resolved. -%bcond_with uvicorn - %global sum_en FastAPI framework %global sum_es FastAPI framework # Missing translation (localized docs present, but untranslated) @@ -44,7 +40,7 @@ Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch # PR for later starlette support -# (https://github.com/tiangolo/fastapi/pull/3594) +# https://github.com/tiangolo/fastapi/pull/3594 Patch0: https://github.com/tiangolo/fastapi/pull/3594.patch # A tiny difference in the OpenAPI schema in one test is not easily explained. @@ -348,10 +344,13 @@ sed -r -i \ # certain version ranges: first, those for which we choose to allow newer # versions… # • flask, itsdangerous, jinja: https://github.com/tiangolo/fastapi/issues/3512 +# • uvicorn: +# https://github.com/tiangolo/fastapi/pull/3345#issuecomment-917038373 sed -r -i \ 's/("(httpx\b|sqlalchemy\b|databases\[sqlite\]|pytest|'\ '%{?with_mkdocs:mkdocs-markdownextradata-plugin|}'\ -'flask|itsdangerous|jinja2)'\ +'flask|itsdangerous|jinja2|'\ +'uvicorn(\[standard\])?)'\ '[^<"]*),[[:blank:]]*<[^"]*/\1/' \ pyproject.toml # …and second, those for which we choose to allow older and newer @@ -362,10 +361,6 @@ sed -r -i 's/("(ujson))\b[^"]*/\1/' pyproject.toml # Allow aiofiles 0.7.x: https://github.com/tiangolo/fastapi/pull/2899 sed -r -i 's/("(aiofiles|)\b[^<"]*,[[:blank:]]*<0\.)6\.0/\18.0/' pyproject.toml -%if %{without uvicorn} -sed -r -i 's/("uvicorn\b.*",)/# \1/' pyproject.toml -%endif - # Remove bundled js-termynal 0.0.1: find docs -type f -name 'termynal.*' | while read -r fn @@ -448,9 +443,6 @@ rm -rf '%{buildroot}%{_jsdir}' # tests/test_default_response_class.py %pytest \ --ignore=tests/test_typing_python39.py \ -%if %{without uvicorn} - --ignore=docs_src/debugging/tutorial001.py \ -%endif --ignore=tests/test_tutorial/test_custom_response/test_tutorial001b.py \ --ignore=tests/test_default_response_class.py