chilly-holiday-77415
12/20/2022, 5:28 PMfastapi
which vendors starlette
as a transitive dependency with a different package name - I’m using a poetry pyproject.toml
which I guess may be the issue as starlette
is listed in my lockfile but not in the pyproject.toml
?
17:14:25.85 [WARN] Pants cannot infer owners for the following imports in the target projects/api/main.py:api:
* starlette.middleware.base.RequestResponseEndpoint (line: 13)
but the fastapi
dependency is being pulled in:
./pants dependencies projects/api/main.py:api
//:poetry0#fastapi
//:poetry0#loguru
//:poetry0#mangum
projects/api/api_metadata.py:api
projects/api/router/all_routers.py
so this feels close but not quite there 🙂sparse-lifeguard-95737
12/20/2022, 5:33 PMpython-infer
subsystem only “sees” top-level `python_requirement`s, not their transitive deps. so you can either add starlette as an explicit top-level dependency to your pyproject.toml
, or add the no-infer-dep
comment to that line (I forget the exact comment, but I think the warning log should include the full text)chilly-holiday-77415
12/20/2022, 5:40 PMchilly-holiday-77415
12/20/2022, 5:41 PMhappy-kitchen-89482
12/20/2022, 6:27 PM