Package: python3-fastapi Version: 0.89.1-1 Severity: normal X-Debbugs-Cc: cqu...@arcor.de
The python3-fastapi debian package on bookworm can be installed and the debian package dependency is python3-starlette (>= 0.22.0) which is all good. However, when I try to install a package with pip in a virtual environment which has fastapi as a dependency I get the following: Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages (from adari-core==0.0.11) (3.6.3) Requirement already satisfied: fastapi in /usr/lib/python3/dist-packages (from adari-core==0.0.11) (0.89.1) Requirement already satisfied: uvicorn in /usr/lib/python3/dist-packages (from adari-core==0.0.11) (0.17.6) Requirement already satisfied: requests-unixsocket in /usr/lib/python3/dist- packages (from adari-core==0.0.11) (0.3.0) Requirement already satisfied: astropy in /usr/lib/python3/dist-packages (from adari-core==0.0.11) (5.2.1) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from adari-core==0.0.11) (2.28.1) Requirement already satisfied: pydantic in /usr/lib/python3/dist-packages (from adari-core==0.0.11) (1.10.2) Collecting starlette==0.22.0 Using cached starlette-0.22.0-py3-none-any.whl (64 kB) Requirement already satisfied: anyio<5,>=3.4.0 in /usr/lib/python3/dist- packages (from starlette==0.22.0->fastapi->adari-core==0.0.11) (3.6.2) Note that this is venv with --system-site-packages option, so it should be using the installed packages. It looks like fastapi pip metadata requires starlette==0.22.0, and hence the python3-starlette package installed with apt (which is 0.23.1-1 in bookworm) does not satisfy that and it needs to install it in the venv. I believe the problem lies within file /usr/lib/python3/dist- packages/fastapi-0.89.1.dist-info/METADATA: ... Requires-Dist: starlette==0.22.0 ... I guess relaxing that to higher than 0.22 would make pip happy and there is no need then to install a local version of starlette. -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-1-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages python3-fastapi depends on: ii python3 3.10.6-3+b1 ii python3-pydantic 1.10.2-1 ii python3-starlette 0.23.1-1 ii python3-uvicorn 0.17.6-1 python3-fastapi recommends no packages. python3-fastapi suggests no packages. -- no debconf information