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

incorrect keys for URLs config #9968

Closed
rocketrose99 opened this issue Jan 6, 2025 · 4 comments
Closed

incorrect keys for URLs config #9968

rocketrose99 opened this issue Jan 6, 2025 · 4 comments
Labels
area/docs Documentation issues/improvements status/triage This issue needs to be triaged

Comments

@rocketrose99
Copy link

Issue Kind

Error in existing documentation

Existing Link

https://python-poetry.org/docs/pyproject/#urls

Description

The keys in the tool.poetry.urls documentation are all lowercase:

  • "homepage"
  • "repository"
  • "documentation"

but lowercase keys cause an error in poetry-core here when installing the project with pip (pip version is 24.3.1).

E.g., with this config:

[tool.poetry.urls]
repository = "xyz"

running this command: pip install .

causes this error: KeyError: 'Repository'

I was able to fix this by using capital keys instead. This works for both poetry commands and pip commands:

[tool.poetry.urls]
Repository = "xyz"

Should the docs be updated to use capital keys or should the source code be updated like so?:

if name == "repository" and url == package.urls["repository"]:
    continue
if name == "documentation" and url == package.urls["documentation"]:
    continue
@rocketrose99 rocketrose99 added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels Jan 6, 2025
@dimbleby
Copy link
Contributor

dimbleby commented Jan 6, 2025

please search for duplicates, please close

@angeliski
Copy link

Hey @dimbleby

I tried to find a duplicate (using multiple combinations) but without success
Can you or anyone point where is that issue?

Sorry for the trouble

@dimbleby
Copy link
Contributor

dimbleby commented Jan 6, 2025

#9957, python-poetry/poetry-core#803

@rocketrose99
Copy link
Author

#9957, python-poetry/poetry-core#803

ah yeah it seems like my searching wasn’t deep enough, didn’t even think to look over in pull requests, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Documentation issues/improvements status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants