So I keep running into situations where requests c...
# general
g
So I keep running into situations where requests cannot be resolved and I'm not exactly sure why. I have bout 5 resolves across my mono repo and the behavior is always the same, pants can see all of the requests except the one in the project. Even when I add the explicit dep to the python_sources, it still can't find it. Is it possible that types-requests is the cause?
yeah, after doing the following
sed
the issue is resolved. How can I track down and solve why pants is getting confused by this?
Copy code
sed -i '/^types-requests =/d' ./**/pyproject.toml
OK, this is a pretty big break through. I just figured out the cause to all of this. If you have a mixture of pyproject.toml files under the same resolve where some have both requests and types-requests and some just have requests, that causes an issue. The solution was adding types-requests to the pyproject.toml file. It would be awesome if the error messages were able to be better in this circumstance.
c
You could try the python source analysis goal https://www.pantsbuild.org/2.20/reference/goals/python-dump-source-analysis It might give you a hint about what's inferred and what the owner is (or if we didn't resolve one). Offhand, I think this might be related to how we process owners when something is declared multiple times, or to how we resolve packages that provide typehints. Could you please open an issue with a small reproducer?
👍 1
g
I couldn't build a simple reproduction of it. The simple use cases "just work"