-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry 1.4.0 regression: local dependencies aren't discovered when running mypy
#7892
Comments
what makes you think poetry is doing sonething wrong here? Suggest raising an issue with mypy |
@dimbleby, I'm not sure if I understand what you mean. I am using the same version of |
The qustion isn't whether |
It's certainly possible that Some information that would be helpful to know:
I tried to figure out this information myself by running
I looked around in |
To verify whether this is a poetry or mypy issue, activate venv manually ( |
As it seems it's caused by a change in poetry (modern installer) but it's probably not a poetry bug but a limitation of mypy. Unfortunately, it seems mypy is not able do much about it. Related issues: pypa/setuptools#3518, python/mypy#13392 Poetry 1.3 (as well as Poetry 1.4 with Poetry 1.4 (with I don't know yet what exactly caused this change. It might be related to |
Thanks for looking into this, @radoering! Also, thanks for teaching me about
Then installing and running |
@RyanGlScott Actually, it's not just related to pypa/setuptools#3518, it's exactly this issue! You forgot to specify a build-backend for foo in your example:
Without a build-backend, it will fallback to setuptools. If you want to use poetry as build-backend, you should add the following line:
Further, you probably do not need If you use another build-backend than setuptools, you may not encounter this issue. |
You are quite right, @radoering. After switching to I'm not sure if there is anything left to be done on the Poetry side (especially since the main problem is in pypa/setuptools#3518), so feel free to close this issue if you wish. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Other info
Poetry version: Poetry 1.4.0 or later
Python version: Any Python version (I have tested with 3.8, 3.9, 3.10, and 3.11)
OS version and name: Ubuntu 20.04
pyproject.toml: The relevant
pyproject.toml
file in the minimal repro is here:Note the
foo = { path = "../foo/", develop = true }
line, which is vital to triggering the bug.-vvv
option) and have included the output below.Issue
Running
mypy
with Poetry 1.4.0 or later in a project with a local dependency unexpectedly fails due to aCannot find implementation or library stub for module
error involving the local dependency. This is a regression, as this did not occur with Poetry 1.3.2 or earlier.I have prepared a minimal reproducer at the https://github.com/RyanGlScott/poetry-bug repository. To reproduce the bug, perform the following steps:
The text was updated successfully, but these errors were encountered: