python-poetry / python-poetry/poetry
poetry should report unrecognized package names
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
OS version and name: macOS 11.2.3
-
Poetry version: Poetry version 1.1.6
Issue
I noticed that poetry wasn't installing the scripts listed in tool.poetry.scripts — no errors, the venv was created successfully, etc. but … no scripts. This turned out to be due to an undocumented interaction of how the package name and scripts are interpreted: I had renamed my project slightly and tool.poetry had a name which was had an extra component in it — roughly name = "my-new-project" while the Python code was in a directory named my_project.
I opened this as a bug because it feels like Poetry should toss a warning that an expected directory does not exist. It could also be resolved in documentation if https://python-poetry.org/docs/pyproject/#name indicated that the name has to be a, or transformable into, importable Python module in the current directory or https://python-poetry.org/docs/pyproject/#scripts had some note that the block is completely ignored if name doesn't match.
See #283
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing issue #283 and the linked pyproject name and scripts documentation sections. Reproduce the reported mismatch between the project name and Python package directory, then determine whether the expected result is a warning or a documentation clarification. Done means the mismatch is no longer silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100