diff --git a/dev-python/fastapi/Manifest b/dev-python/fastapi/Manifest index ba740cdbd1bdb..64717a66458d6 100644 --- a/dev-python/fastapi/Manifest +++ b/dev-python/fastapi/Manifest @@ -1,4 +1,5 @@ DIST fastapi-0.139.0.tar.gz 423016 BLAKE2B 6494df7a9588a52a367f1fa5eef806aef0da218aabbf129dc7cacc81a71a8301e8c2b9cbcb161aa7dccdea86742e21bd644df51a2013db0c1ca04d32b46d030c SHA512 6c55932edd526242ebdcb075635be4e50f91bbe4d4b61a7109e7a751cb665ebbb5fa9f36741106a2bb8a679845c25e3efd9400f4b2f700245f9de5e714301fa9 DIST fastapi-0.139.2.tar.gz 423428 BLAKE2B 9f65ca68699b822c70b45f1ddff5e538bcd7a470911481b9475af3b052cf5a90bc9f1f6d0cc799d14007d2e11b830dc932ff283645f4afac7086cf3db3486cb7 SHA512 aae0e28df3327a0e18d776cebe6677323cef568f46dc69de86a107e9a966d64a807d3f6a7dd5d639950d903b3d0b41907909256773baf9b75d0ed1ff4371d60a DIST fastapi-0.140.0.tar.gz 420968 BLAKE2B 525e71b31a97bfdd627bd224fb12e9b7e7af0ddf1e194f609923b259946462c2246a9ad922c89f99bcf4019edeeb8ca1dfa6d2f5e1dedd0adeb046977df79384 SHA512 1799782278e9c5ce884e256121128cd07bbb48a9bd081b9c8c8c9813adba04f50a6737320cd74a21cd7e7f1c2ee379841e069c0aaba42f7e52e782ce97826699 +DIST fastapi-0.140.13.tar.gz 424843 BLAKE2B 31fcee62b02b22ec120535a3af0c53c9030451145425d07b55175c7f16c876d8f0f1a184dd2e905433dcfeacaf7b0efd9cb83ddb179cb9fc79a9ea0a2b49c25f SHA512 4fcf8cb0cebab3d266451c1d7ec41f70614d7bee5bb471307e88cf3e3104e030271afb40cd3b978600a2fae7768b78f4079e6f7b2c747fc89f77e77040e8197a DIST fastapi-0.140.7.tar.gz 422051 BLAKE2B 6e2bdfb7274cfdbd3f0590f7a7ce61d09c4b885ca30ddd4e029cfff489b2844b90bc61b497371d03513051bfd5b050513bd5a75ca36ef93d2a265c87bff423e9 SHA512 faa57243d870c91b02537ef88b9a454f590140c3b8f06a1e5d8070f4cf23b04f72cee7097898ee3820ac9a594905fbdcca4693373b3d0c99010610742d1861de diff --git a/dev-python/fastapi/fastapi-0.140.13.ebuild b/dev-python/fastapi/fastapi-0.140.13.ebuild new file mode 100644 index 0000000000000..1bac3394aa493 --- /dev/null +++ b/dev-python/fastapi/fastapi-0.140.13.ebuild @@ -0,0 +1,104 @@ +# Copyright 2025-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=pdm-backend +PYTHON_COMPAT=( python3_{14..15} ) +#may be not stricly required +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 optfeature pypi + +DESCRIPTION="High performance framework, easy to learn, fast to code, ready for production" +HOMEPAGE=" + https://fastapi.tiangolo.com/ + https://github.com/fastapi/fastapi/ + https://pypi.org/project/fastapi/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-python/annotated-doc-0.0.4[${PYTHON_USEDEP}] + >=dev-python/starlette-0.46.0[${PYTHON_USEDEP}] + >=dev-python/pydantic-2.9.0[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.8.0[${PYTHON_USEDEP}] + >=dev-python/typing-inspection-0.4.2[${PYTHON_USEDEP}] +" + +#FIXME: add missing deps +BDEPEND=" + test? ( + dev-python/a2wsgi[${PYTHON_USEDEP}] + dev-python/dirty-equals[${PYTHON_USEDEP}] + dev-python/flask[${PYTHON_USEDEP}] + dev-python/httpx[${PYTHON_USEDEP}] + dev-python/httpx2[${PYTHON_USEDEP}] + dev-python/pydantic-settings[${PYTHON_USEDEP}] + dev-python/python-multipart[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] + dev-python/typer[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=( anyio inline-snapshot pytest-timeout ) +# 3k tests+, so use xdist to speed them up +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +# There are some JSON response tests that will exercise orjson or ujson if they are available. +# These are properly skipped if the optional dependencies are not installed at the cost of a little spam. +python_test() { + local EPYTEST_IGNORE=( + # python/strawberry-graphql (in guru, test dep only) + tests/test_tutorial/test_graphql/test_tutorial001.py + # dev-python/sqlmodel (in guru, test dep only) + tests/test_tutorial/test_sql_databases/test_tutorial001.py + tests/test_tutorial/test_sql_databases/test_tutorial002.py + # dev-python/fastapi-cli (missing, test and optfeature) + tests/test_fastapi_cli.py + # dev-python/pwdlib (in guru, test dep only) + tests/test_tutorial/test_security/test_tutorial004.py + tests/test_tutorial/test_security/test_tutorial005.py + # Wants dev-python/multipart _just_ to complain that it's not the right multipart lib. + tests/test_multipart_installation.py + # scripts/tests use CliRunner.isolated_filesystem() removed in recent typer + scripts/tests + ) + local EPYTEST_DESELECT=( + # Requires investigation - missing ./image.png test file (?) + tests/test_tutorial/test_additional_responses/test_tutorial004.py::test_path_operation_img + + # Broken by brotli being available, also fragile to random ordering + tests/test_tutorial/test_header_param_models/test_tutorial001.py::test_header_param_model_invalid + tests/test_tutorial/test_header_param_models/test_tutorial003.py::test_header_param_model_invalid + tests/test_tutorial/test_header_param_models/test_tutorial003.py::test_header_param_model_no_underscore + ) + epytest +} + +pkg_postinst() { + # not part of any upstream extra + optfeature "alternative JSON library" "dev-python/ujson" # orjson, too but it's deprecated + + # pyproject.toml:project.optional-dependencies.standard + # Following optfeatures should be exposed, but missing deps + # optfeature "fastAPI CLI" "dev-python/fastapi-cli" - missing - depends on this package! + # optfeature "compressed file support" "dev-python/fastar" - missing + # optfeature "pydantic extra types support" "dev-python/pydantic-extra-types" - in guru + optfeature_header "standard extras" + optfeature "ASGI server support" "dev-python/uvicorn" + optfeature "email validation support" "dev-python/email-validator" + optfeature "TestClient for testing FastAPI applications" "dev-python/httpx" + optfeature "templating support" "dev-python/jinja2" + optfeature "multipart form data support" "dev-python/python-multipart" + optfeature "settings management support" "dev-python/pydantic-settings" + + # pyproject.toml:project.optional-dependencies.all - includes all the above plus: + optfeature_header "all extras" + optfeature "session middleware support" "dev-python/itsdangerous" + optfeature "YAML support" "dev-python/pyyaml" +}