Skip to content
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-core does not install local dependency in editable mode #8965

Closed
4 tasks done
bersbersbers opened this issue Feb 12, 2024 · 13 comments · Fixed by #8971
Closed
4 tasks done

poetry-core does not install local dependency in editable mode #8965

bersbersbers opened this issue Feb 12, 2024 · 13 comments · Fixed by #8971
Labels
kind/bug Something isn't working as expected

Comments

@bersbersbers
Copy link
Contributor

  • Poetry version: poetry_core-1.9.0-py3-none-any.whl

  • Python version: 3.12.2

  • OS version and name: Windows 11 22H2

  • I am on the latest stable Poetry version, installed using a recommended method.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

C:\Code\MyTestParent
│   pyproject.toml
│   TestParent.py
└───MyTestChild
        pyproject.toml
        TestChild.py

Both .py files are empty. The pyproject.toml files are:

MyTestParent:

[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "TestParent"
version = "0.0.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = ">=3.12"
TestChild = { path = "MyTestChild", develop = true }

MyTestChild:

[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "TestChild"
version = "0.0.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = ">=3.12"

Now, I can install TestParent in editable mode, but TestChild is not installed in editable mode:

$ pip install -e . && (pip list | findstr Test)
TestChild  0.0.0
TestParent 0.0.0   C:\Code\MyTestParent
@bersbersbers bersbersbers added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 12, 2024
@dimbleby
Copy link
Contributor

there is no way to express in TestParent's metadata that TestChild is editable, this is expected

please close

@bersbersbers
Copy link
Contributor Author

there is no way to express in TestParent's metadata that TestChild is editable

I think I don't get it. What is the purpose of the develop key in TestParents TestChild dependency then, if not to make it editable?

@dimbleby
Copy link
Contributor

Poetry understands the poetry-specific configuration, poetry install will do what you want.

pip installcannot

@bersbersbers
Copy link
Contributor Author

Is there any place that I could have learned about this before opening this issue? Or should this limitation be documented somewhere?

@dimbleby
Copy link
Contributor

If you had followed the documentation you never would have typed pip install.

If you have a docs improvement in mind then no doubt that contribution would be welcome.

Either way, please close this one out.

@bersbersbers
Copy link
Contributor Author

If you had followed the documentation you never would have typed pip install.

That implication is incorrect. https://github.com/python-poetry/poetry-core?tab=readme-ov-file#usage gives examples (only) using pip install.

@dimbleby
Copy link
Contributor

dimbleby commented Feb 13, 2024

Poetry docs are at https://python-poetry.org/docs/, the poetry-core GitHub repository is not the expected entry point.

Either way, please close this out and feel free to submit improvements in whatever place it is that confused you

@bersbersbers
Copy link
Contributor Author

Poetry docs are at https://python-poetry.org/docs/

That is correct, and I would have filed this issue in https://pypi.org/project/poetry-core/ if that repository had issues enabled. Also, the "Bug tracker" link at https://pypi.org/project/poetry-core/ points ... here.

the poetry-core GitHub repository is not the expected entry point.

First, that is a weird thing to say in the age of web search engines, really. But as a user of poetry-core, what would you propose should my entry point be, if not that repository?

feel free to submit improvements in whatever place it is that confused you

I don't think I am confused at all. I may have a lack of knowledge, and all I am (still kindly, I hope) asking for is a reference for the kind of limitation you have cited above.

@dimbleby
Copy link
Contributor

if you want to understand the interface between front-ends and back-ends you should read the python packaging specifications. But this is not something that most users will want to get into.

@bersbersbers
Copy link
Contributor Author

... read the python packaging specifications. But this is not something that most users will want to get into.

Exactly. That is why I am suggesting that documented poetry functionality that silently fails in poetry core due to limitations of this interface be documented as not working in poetry core.

@dimbleby
Copy link
Contributor

I don't know how to say it another way: docs improvements are welcome, please contribute the change you would like to see.

Meanwhile there is no bug here, please close this issue

@bersbersbers
Copy link
Contributor Author

See #8971.

@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Copy link

github-actions bot commented Apr 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants