python-poetry / python-poetry/poetry-plugin-export
Only use hashes in requirements.txt if there are no VCS repositories
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 335
- Forks
- 57
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 3
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). (n/a) -
OS version and name: macOS 10.5.5 Beta
-
Poetry version: 1.0.5
-
Contents of pyproject.toml file:
[tool.poetry]
name = "test-poetry-proj"
version = "0.1.0"
description = "desc"
authors = ["Sumanth Ratna <sumanthratna@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.6.1"
numpy = "^1.18.4"
hyperopt = {git = "https://github.com/hyperopt/hyperopt.git"}
[tool.poetry.dev-dependencies]
pytest = "^5.4.2"
[tool.poetry.scripts]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Issue
When I run poetry export -f requirements.txt > requirements.txt, the resulting requirements.txt file has a bunch of hashes. Unfortunately, that means I can't run pip install -r requirements.txt on another machine, because it returns this error:
ERROR: Can't verify hashes for these requirements because we don't have a way to hash version control repositories:
hyperopt from git+https://github.com/hyperopt/hyperopt.git#egg=hyperopt (from -r requirements.txt (line 192))
I'm labeling this as a bug report instead of a feature request because this seems like a fault in the way Poetry behaves when exporting.
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the issue with the provided pyproject.toml and poetry export -f requirements.txt, then inspect the export path that handles VCS repositories and requirement hashes. Verify the result by running pip install -r requirements.txt with the generated file and confirm that the VCS dependency no longer causes hash verification to fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100