From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 812A51584AD for ; Thu, 08 May 2025 22:18:58 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 6EDE334317D for ; Thu, 08 May 2025 22:18:58 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 514041104BC; Thu, 08 May 2025 22:18:30 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 390C91104BC for ; Thu, 08 May 2025 22:18:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DF9BA3430DD for ; Thu, 08 May 2025 22:18:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7B4C10D4 for ; Thu, 08 May 2025 22:18:26 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1746738813.8d716f497d77d60bcdd1f3299eae7b25a4e1c6d0.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-python/fastapi/, dev-python/fastapi/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-python/fastapi/Manifest dev-python/fastapi/fastapi-0.115.12.ebuild dev-python/fastapi/files/fastaapi-0.115.6-httpx-0.28-test-fix.patch dev-python/fastapi/metadata.xml X-VCS-Directories: dev-python/fastapi/ dev-python/fastapi/files/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: 8d716f497d77d60bcdd1f3299eae7b25a4e1c6d0 X-VCS-Branch: master Date: Thu, 08 May 2025 22:18:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d1fae263-234a-4712-96f9-7773729a8c24 X-Archives-Hash: e17b5c0fb1a734243684dccddc6a9ab3 commit: 8d716f497d77d60bcdd1f3299eae7b25a4e1c6d0 Author: Paul Zander gmail com> AuthorDate: Thu May 8 21:04:10 2025 +0000 Commit: David Roman gmail com> CommitDate: Thu May 8 21:13:33 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8d716f49 dev-python/fastapi: add 0.115.12, new package Signed-off-by: Paul Zander gmail.com> dev-python/fastapi/Manifest | 1 + dev-python/fastapi/fastapi-0.115.12.ebuild | 96 ++++++++++++++++++++++ .../fastaapi-0.115.6-httpx-0.28-test-fix.patch | 26 ++++++ dev-python/fastapi/metadata.xml | 13 +++ 4 files changed, 136 insertions(+) diff --git a/dev-python/fastapi/Manifest b/dev-python/fastapi/Manifest new file mode 100644 index 000000000..5ea7c4b7b --- /dev/null +++ b/dev-python/fastapi/Manifest @@ -0,0 +1 @@ +DIST fastapi-0.115.12.tar.gz 295236 BLAKE2B 224b74553668721dde3592a50a3d5b02a967a58f55d3beb6bec753755cddfbb803f0661ce6cc41af3ddfc28bb304d053f41aad8ab9d8965048ff80cad6c3207e SHA512 8eb8d998643ca748744b9c00e14cdd62f02e58145e2a64dcf090361d56fa52a12b643b8fc3dc98f41af74c06d46b787acf92ae2be828d99b6d4290c20ced7f6f diff --git a/dev-python/fastapi/fastapi-0.115.12.ebuild b/dev-python/fastapi/fastapi-0.115.12.ebuild new file mode 100644 index 000000000..40fc4faf8 --- /dev/null +++ b/dev-python/fastapi/fastapi-0.115.12.ebuild @@ -0,0 +1,96 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=pdm-backend +PYTHON_COMPAT=( python3_{12..13} ) + +inherit distutils-r1 optfeature pypi + +DESCRIPTION="FastAPI framework, high performance, easy to learn, ready for production" +HOMEPAGE=" + https://fastapi.tiangolo.com/ + https://pypi.org/project/fastapi/ + https://github.com/fastapi/fastapi +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + =dev-python/pydantic-1.7.4[${PYTHON_USEDEP}] + =dev-python/starlette-0.40.0[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.8.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/aiosqlite[${PYTHON_USEDEP}] + >=dev-python/anyio-3.2.1[${PYTHON_USEDEP}] + dev-python/dirty-equals[${PYTHON_USEDEP}] + dev-python/email-validator[${PYTHON_USEDEP}] + >=dev-python/flask-1.1.2[${PYTHON_USEDEP}] + dev-python/inline-snapshot[${PYTHON_USEDEP}] + >=dev-python/jinja2-3.1.5[${PYTHON_USEDEP}] + dev-python/orjson[${PYTHON_USEDEP}] + =dev-python/passlib-1.7.2[${PYTHON_USEDEP}] + dev-python/pydantic-settings[${PYTHON_USEDEP}] + dev-python/pyjwt[${PYTHON_USEDEP}] + >=dev-python/python-multipart-0.0.18[${PYTHON_USEDEP}] + =dev-python/pyyaml-5.3.1[${PYTHON_USEDEP}] + dev-python/sqlmodel[${PYTHON_USEDEP}] + dev-python/trio[${PYTHON_USEDEP}] + dev-python/ujson[${PYTHON_USEDEP}] + ) +" +# brottli and zstd due to starlette based tests expecting it + +PATCHES=( + "${FILESDIR}"/fastaapi-0.115.6-httpx-0.28-test-fix.patch +) + +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # Depends on coverage + "tests/test_fastapi_cli.py::test_fastapi_cli" + # Test result affected by unrelated packages such as brottli and zstd + # https://github.com/fastapi/fastapi/blob/7c6f2f8fde68f488163376c9e92a59d46c491298/tests/test_tutorial/test_header_param_models/test_tutorial001.py#L77 + "tests/test_tutorial/test_header_param_models/test_tutorial001.py::test_header_param_model_invalid" + # https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6afa196ca0cb1604875847b1b84fa64896a06f6e + "tests/test_multipart_installation.py::test_incorrect_multipart_installed_form" + "tests/test_multipart_installation.py::test_incorrect_multipart_installed_file_upload" + "tests/test_multipart_installation.py::test_incorrect_multipart_installed_file_bytes" + "tests/test_multipart_installation.py::test_incorrect_multipart_installed_multi_form" + "tests/test_multipart_installation.py::test_incorrect_multipart_installed_form_file" + "tests/test_multipart_installation.py::test_no_multipart_installed" + "tests/test_multipart_installation.py::test_no_multipart_installed_file" + "tests/test_multipart_installation.py::test_no_multipart_installed_file_bytes" + "tests/test_multipart_installation.py::test_no_multipart_installed_multi_form" + "tests/test_multipart_installation.py::test_no_multipart_installed_form_file" + "tests/test_multipart_installation.py::test_old_multipart_installed" +) + +python_prepare_all() { + # Dont install fastapi executable as fastapi-cli is supposed to handle it + sed -i -e '/\[project.scripts\]/,/^$/d' pyproject.toml || die + + distutils-r1_python_prepare_all +} + +pkg_postinst() { + optfeature "commandline interface" dev-python/fastapi-cli + optfeature "test client" dev-python/httpx + optfeature "templates" dev-python/jinja2 + optfeature "forms and file uploads" dev-python/python-multipart + optfeature "validate emails" dev-python/email-validator + optfeature "uvicorn with uvloop" dev-python/uvicorn + optfeature_header "Alternative JSON responses" + optfeature "ORJSONResponse" dev-python/orjson + optfeature "UJSONResponse" dev-python/ujson +} diff --git a/dev-python/fastapi/files/fastaapi-0.115.6-httpx-0.28-test-fix.patch b/dev-python/fastapi/files/fastaapi-0.115.6-httpx-0.28-test-fix.patch new file mode 100644 index 000000000..1ce4fe1d9 --- /dev/null +++ b/dev-python/fastapi/files/fastaapi-0.115.6-httpx-0.28-test-fix.patch @@ -0,0 +1,26 @@ +--- a/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py ++++ b/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py +@@ -14,6 +14,22 @@ def test_endpoint_works(): + def test_exception_handler_body_access(): + response = client.post("/", json={"numbers": [1, 2, 3]}) + assert response.json() == IsDict( ++ { ++ 'detail': { ++ 'body': '{"numbers":[1,2,3]}', ++ 'errors': [ ++ { ++ 'input': {'numbers': [1, 2, 3]}, ++ 'loc': ['body'], ++ 'msg': 'Input should be a valid list', ++ 'type': 'list_type' ++ } ++ ] ++ } ++ } ++ ) | IsDict( ++ # Pre httpx-0.28.0 json output ++ # https://github.com/encode/httpx/pull/3367 + { + "detail": { + "errors": [ + diff --git a/dev-python/fastapi/metadata.xml b/dev-python/fastapi/metadata.xml new file mode 100644 index 000000000..03e87df78 --- /dev/null +++ b/dev-python/fastapi/metadata.xml @@ -0,0 +1,13 @@ + + + + + negril.nx+gentoo@gmail.com + Paul Zander + + + + fastapi/fastapi + fastapi + +