Hi Sandro, This bug's been open for about 5 months, and other packages are waiting for fastapi to get back into testing.
I've investigated, and even with the anyio fix and python3-pydantic-settings added to the build-depends, there are still test failures. Upgrading to the latest fastapi fixes these, but it also depends on updated versions of sqlmodel and python-multipart. Attached are diffs of the debian/ directories I made in order to get the current versions of these three packages to build. I plan to upload these three updated packages to DELAYED/7-days as NMUs in about a week, but you are of course welcome to do so before that. Best wishes, Julian
diff --git a/debian/changelog b/debian/changelog index 24c1c0e..7796231 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +fastapi (0.115.5-0.1) UNRELEASED; urgency=medium + + * Non-maintainer upload + * New upstream version (closes: #1030779) + * Depend on python3-pydantic-settings and other packages listed in + pyproject.toml for tests (closes: #1073445) + + -- Julian Gilbey <j...@debian.org> Tue, 19 Nov 2024 20:25:00 +0000 + fastapi (0.110.0-1) unstable; urgency=medium * New upstream release diff --git a/debian/control b/debian/control index 3867a81..f92f122 100644 --- a/debian/control +++ b/debian/control @@ -11,17 +11,26 @@ Build-Depends: debhelper-compat (= 13), python3-dirty-equals <!nocheck>, python3-email-validator <!nocheck>, python3-flask <!nocheck>, - python3-hatchling, python3-httpx (>= 0.23.1) <!nocheck>, - python3-multipart <!nocheck>, + python3-inline-snapshot <!nocheck>, + python3-itsdangerous <!nocheck>, + python3-jinja2 <!nocheck>, + python3-jwt <!nocheck>, + python3-multipart (>= 0.0.17) <!nocheck>, + python3-orjson <!nocheck>, + python3-pdm-backend, python3-peewee <!nocheck>, python3-pydantic (>= 1.8.2) <!nocheck>, + python3-pydantic-extra-types <!nocheck>, + python3-pydantic-settings <!nocheck>, python3-pytest <!nocheck>, python3-requests <!nocheck>, + python3-sqlmodel (>= 0.0.22) <!nocheck>, python3-starlette (>= 0.25.0) <!nocheck>, python3-trio <!nocheck>, python3-typing-extensions (>= 4.7.1) <!nocheck>, python3-ujson <!nocheck>, + python3-uvicorn <!nocheck>, python3-yaml <!nocheck>, Standards-Version: 4.6.2.0 Homepage: https://github.com/tiangolo/fastapi @@ -33,6 +42,7 @@ Package: python3-fastapi Architecture: all Depends: python3-pydantic, python3-starlette, + python3-typing-extensions, python3-uvicorn, ${misc:Depends}, ${python3:Depends}, diff --git a/debian/rules b/debian/rules index 43081cf..771d055 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,11 @@ export PYBUILD_NAME=fastapi # test_root, test_async_testing -> until we have an up-to-date httpx, which doesnt cause "AttributeError: module 'httpcore' has no attribute 'PlainByteStream'" # test_dependency_gets_exception -> https://github.com/tiangolo/fastapi/discussions/9934 # test_path_operation_img -> needs a file in the doc/ dir, not available during autopkgtests -export PYBUILD_TEST_ARGS=-W ignore::DeprecationWarning --ignore=docs_src/ --ignore=tests/test_default_response_class.py --ignore-glob=tests/test_tutorial/test_security/test_tutorial005* --ignore=tests/test_tutorial/test_custom_response/test_tutorial009c.py --ignore=tests/test_response_by_alias.py -k " not test_get_custom_response and not test_root and not test_async_testing and not test_orjson_non_str_keys and not test_dependency_gets_exception and not test_path_operation_img" +# Despite an attempted fix, starlette still sometimes gives warnings: +# ResourceWarning: Unclosed <MemoryObjectReceiveStream at ...> +# See https://github.com/encode/starlette/discussions/2603 +# We therefore ignore them. +export PYBUILD_TEST_ARGS=-W ignore::DeprecationWarning -W ignore::ResourceWarning --ignore=docs_src/ --ignore=tests/test_default_response_class.py --ignore-glob=tests/test_tutorial/test_security/test_tutorial005* --ignore=tests/test_tutorial/test_custom_response/test_tutorial009c.py --ignore=tests/test_response_by_alias.py -k " not test_get_custom_response and not test_root and not test_async_testing and not test_orjson_non_str_keys and not test_dependency_gets_exception and not test_path_operation_img and not test_fastapi_cli" %: dh $@ --with python3 --buildsystem=pybuild
diff --git a/debian/changelog b/debian/changelog index abcf34a..59318c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-multipart (0.0.17-0.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * New upstream version (needed for newer fastapi) + * Add autopkgtest-pkg-pybuild + + -- Julian Gilbey <j...@debian.org> Tue, 19 Nov 2024 20:24:12 +0000 + python-multipart (0.0.9-1) unstable; urgency=high [ Piotr Ożarowski ] diff --git a/debian/control b/debian/control index 316be3a..34ea8b4 100644 --- a/debian/control +++ b/debian/control @@ -22,6 +22,7 @@ Standards-Version: 4.6.2 Homepage: https://github.com/andrew-d/python-multipart Vcs-Git: https://salsa.debian.org/morph/python-multipart.git Vcs-Browser: https://salsa.debian.org/morph/python-multipart +Testsuite: autopkgtest-pkg-pybuild Package: python3-multipart Architecture: all
diff --git a/debian/changelog b/debian/changelog index a540fb5..c9387d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +sqlmodel (0.0.22-0.1) UNRELEASED; urgency=medium + + * Non-maintainer upload + * New upstream release (working towards fixing #1078826; python3-fastapi + version 0.115.5 requires sqlmodel 0.0.22 for its tests) + * Drop build-dependency on python3-poetry-core (no longer needed) + * Drop build-dependency on python3-fastapi to avoid a circular + dependency (it is only required for tests that are skipped at + build-time); move the dependency to debian/tests/control + + -- Julian Gilbey <j...@debian.org> Wed, 20 Nov 2024 07:54:39 +0000 + sqlmodel (0.0.19-1) unstable; urgency=medium * New upstream release; Closes: #1066771, #1071067, #1071992 diff --git a/debian/control b/debian/control index 0f02986..ca71d4a 100644 --- a/debian/control +++ b/debian/control @@ -7,11 +7,9 @@ Build-Depends: black <!nocheck>, pybuild-plugin-pyproject, python3-all, python3-dirty-equals <!nocheck>, - python3-fastapi <!nocheck>, python3-httpx <!nocheck>, python3-jinja2 <!nocheck>, python3-pdm-backend, - python3-poetry-core, python3-pydantic <!nocheck>, python3-pytest <!nocheck>, python3-requests <!nocheck>, diff --git a/debian/patches/coverage-bin-path.patch b/debian/patches/coverage-bin-path.patch new file mode 100644 index 0000000..e9796c0 --- /dev/null +++ b/debian/patches/coverage-bin-path.patch @@ -0,0 +1,38 @@ +Description: Use Debian path for Python coverage command +Forwarded: not-needed +Author: Julian Gilbey <j...@debian.org> +Last-Update: 2024-11-20 + +--- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_py310_tests_main.py ++++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_py310_tests_main.py +@@ -12,7 +12,7 @@ + top_level_path = Path(__file__).resolve().parent.parent.parent.parent.parent + result = subprocess.run( + [ +- "coverage", ++ "python3-coverage", + "run", + "--parallel-mode", + "-m", +--- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_py39_tests_main.py ++++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_py39_tests_main.py +@@ -12,7 +12,7 @@ + top_level_path = Path(__file__).resolve().parent.parent.parent.parent.parent + result = subprocess.run( + [ +- "coverage", ++ "python3-coverage", + "run", + "--parallel-mode", + "-m", +--- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py ++++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py +@@ -9,7 +9,7 @@ + top_level_path = Path(__file__).resolve().parent.parent.parent.parent.parent + result = subprocess.run( + [ +- "coverage", ++ "python3-coverage", + "run", + "--parallel-mode", + "-m", diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..20994b6 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +coverage-bin-path.patch diff --git a/debian/tests/control b/debian/tests/control index 5699968..6508bae 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,4 +1,6 @@ Tests: unittests Depends: @, @builddeps@, + python3-coverage, + python3-fastapi (>= 0.115.5), Restrictions: allow-stderr diff --git a/debian/tests/unittests b/debian/tests/unittests old mode 100644 new mode 100755 index ada14f7..5b6faaa --- a/debian/tests/unittests +++ b/debian/tests/unittests @@ -1,12 +1,12 @@ #!/bin/sh set -efu -pys="$(py3versions -r 2> /dev/null)" +pys="$(py3versions -s)" cp -a docs_src tests "$AUTOPKGTEST_TMP" cd "$AUTOPKGTEST_TMP" for py in $pys; do echo "=== $py ===" - $py -m pytest tests -k 'not test_create_db_and_table' 2>&1 + $py -m pytest tests --ignore=tests/test_select_gen.py -k 'not test_create_db_and_table' 2>&1 done