-
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
Relative path imports are resolved relative to CWD instead of pyproject.toml #1757
Comments
Hey, I have managed to carve some more time to debug this. Removing I think it might have been broken all along, I'll update the initial post (just tried with 1.0.0b8 and the same happened) |
Another update. Even with the change outlined above I am still getting |
I'm hitting this too. I have two projects in one repo, the second one depends on the first, I'm using a relative path, and I get the same error in the same place. |
Should be fixed in the latest release by #1875. |
Regrettably I'm still getting the same error with v.1.0.3 (which includes #1875). |
Hello @teknico , can you please show how your folder structure looks like and provide the fin swimmer |
@finswimmer, sure, the code is in the tinydecred repo. The |
Ok, I've got it. Will have a closer look at it the next days. |
I tried to take a closer look at this problem. It arises if a path dependency is more then one time in the dependency tree and has different relative paths. Then something went wrong during the version solving. And that's the part in the poetry which is still hard for me to understand. I've uploaded a small example I used for testing: https://github.com/finswimmer/poetry-issue1757 I tried to follow the code. The poetry/poetry/puzzle/provider.py Line 97 in 12db4a5
has a wrong
The correct value for So it looks like, that poetry is mixing some information when it recognize that the same package name is referenced twice and it has to decide which one it should take. @sdispater could you please take a look at this? |
@finswimmer I'll try to take a look at this. I thought I had fixed but I missed the case where, like you mentioned, the same package is references multiple times with various relative paths. I'll assigned myself to the issue. |
I'm also hitting this issue. Not sure if this will help but I work in a monorepo context with the following structure:
I know this might look messed up in terms of layout, but the path resolved for ( |
Python 3.9, pip 20.2.3 Is this solving every corner case ?
Trying to run
Solution (kind of)
Or |
Hello @yanbussieres, since poetry 1.1 path dependencies are no longer installed in editable mode by default. You will need to add a fin swimmer |
Even though this issue is closed, this is still a bug in poetry 1.1.5. If you have a monorepo with 3 projects where
Then running |
This still seems to be an issue in 1.1.7 as well. result in requirements.txt is still absolute path: |
This is still a problem in 1.1.13 as well. I would expect the I think in the example following from above, it would be:
(missing the |
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. |
-vvv
option).Issue
I have 3 projects in a monorepo situation
One has a
pyproject.toml
inkafkaesque/pyproject.toml
It depends on another poetry package defined in
config/pyproject.toml
Then there's another project that installs from kafkaesque and config into
pyproject.toml
like so:I get the following error:
Note that both
kafkaesque/pyproject.toml
andpyproject.toml
both depend onconfig/pyproject.toml
albeit with a different path in their respective project filesThe text was updated successfully, but these errors were encountered: