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 creates non-url url entry in direct_url.json #8999

Closed
4 tasks done
konstin opened this issue Feb 21, 2024 · 2 comments · Fixed by #9007
Closed
4 tasks done

Poetry creates non-url url entry in direct_url.json #8999

konstin opened this issue Feb 21, 2024 · 2 comments · Fixed by #9007
Labels
area/core Related to the poetry-core library area/installer Related to the dependency installer kind/bug Something isn't working as expected status/waiting-on-core Requires changes to poetry-core first
Milestone

Comments

@konstin
Copy link

konstin commented Feb 21, 2024

Summary

With flask = { git = "git@github.com:pallets/flask.git", rev = "b90a4f1f4a370e92054b9cc9db0efcb864f87ebe" } poetry write "url": "git@github.com:pallets/flask.git" in direct_url.json

  • Poetry version: cff4d7d
  • Python version: 3.8.10 (irrelevant)
  • OS version and name: Windows 11 (also happens on mac os)
  • pyproject.toml: `
[tool.poetry]
name = "a"
version = "0.1.0"
description = ""
authors = ["konstin <konstin@mailbox.org>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.8"
flask = { git = "git@github.com:pallets/flask.git", rev = "b90a4f1f4a370e92054b9cc9db0efcb864f87ebe" }

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
  • 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

When using a git dependency, the url field of the direct_url.json that poetry writes is not a url. This causes problems in uv (astral-sh/uv#1744). The spec isn't clear about what the url field contains. I propose to change this both in poetry and in the spec: pypa/packaging.python.org#1506.

@konstin konstin added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 21, 2024
@radoering
Copy link
Member

Probably relevant: #3113
(We have to take care not just to write another url but also make sure to consider it equal when reading it back otherwise we may always re-install the dependency.)

abn added a commit to abn/poetry-core that referenced this issue Feb 24, 2024
This change ensures when referencing source url for package
specifications of source type "git" or for VCS dependencies, a
normalized version returned at all times.

Relates-to: python-poetry/poetry#8999
abn added a commit to abn/poetry-core that referenced this issue Feb 24, 2024
This change ensures when referencing source url for package
specifications of source type "git" or for VCS dependencies, a
normalized version returned at all times.

Relates-to: python-poetry/poetry#8999
radoering pushed a commit to python-poetry/poetry-core that referenced this issue Feb 24, 2024
This change ensures when referencing source url for package
specifications of source type "git" or for VCS dependencies, a
normalized version returned at all times.

Relates-to: python-poetry/poetry#8999
@radoering radoering added area/installer Related to the dependency installer and removed status/triage This issue needs to be triaged labels Feb 24, 2024
@abn abn added area/core Related to the poetry-core library status/waiting-on-core Requires changes to poetry-core first labels Feb 28, 2024
@Secrus Secrus added this to the Poetry 2.0 milestone Oct 6, 2024
Copy link

github-actions bot commented Nov 6, 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 Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/core Related to the poetry-core library area/installer Related to the dependency installer kind/bug Something isn't working as expected status/waiting-on-core Requires changes to poetry-core first
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants