-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
python-poetry/poetry-core
#817Labels
kind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged
Description
Description
State where the problem happens
The pyproject.toml contains a project.depencies with a malformed urlspec dependency (in this case, a github repository).
What we wrote
…
dependencies = [
"eflips-depot @ [email protected]:mpm-tu-berlin/eflips-depot.git@feature/allow-only-oppo-charging",
]
…
Expected behavior
poetry lock should refure to create a poetry.lock file and complain about the nonsensical URL
What actually happens
Poetry behaves as if not URL were specified at all, e. g. as if the dependency specification was just
…
dependencies = [
"eflips-depot",
]
…
and grabs the latest version from PyPI.
While this is clearly a mistake of the user specifying the wrong dependency URL, I feel like it would be preferable to loudly complain about an unparseable URL in the dependencies, rather than just ignoring it.
Workarounds
If you just specify your depencies correctly in the first place, it doesn't happen
Poetry Installation Method
system package manager (eg: dnf, apt etc.)
Operating System
macOS Sonoma
Poetry Version
2.0.1
Poetry Configuration
cache-dir = "/Users/arbeit/Library/Caches/pypoetry"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/arbeit/Library/Caches/pypoetry/virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = falsePython Sysconfig
See file
Example pyproject.toml
[project]
name = "eflips-kyoto"
version = "0.1.0"
description = "Applying eFLIPS to a Kyoto dataset"
authors = [
{name = "Ludger Heide",email = "[email protected]"}
]
license = {text = "AGPL-3.0-or-later"}
readme = "README.md"
requires-python = ">=3.12,<3.13"
dependencies = [
"eflips-depot @ [email protected]:mpm-tu-berlin/eflips-depot.git@feature/allow-only-oppo-charging",
"eflips-opt (>=0.1.5,<1.0.0)",
"eflips-model (>=6.0.2,<7.0.0)",
"eflips-eval (>=1.7.1,<2.0.0)",
]
[tool.poetry]
package-mode = false
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
black = "^24.10.0"
[tool.black]
line-length = 120Poetry Runtime Logs
See file
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged