python-poetry / python-poetry/poetry-plugin-export

Exported requirements.txt contains spurious messages if lock file does not exist

Open
#175 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
335
Forks
57
Avg merge
1h 23m
Merged PRs (30d)
3

Description

  • Poetry version: 1.3.2
  • Python version: 3.10.6
  • OS version and name: Ubuntu 22.04.1
  • pyproject.toml: just create it with poetry new poetry-demo:
[tool.poetry]
name = "poetry-demo"
version = "0.1.0"
description = ""
authors = ["Patrick Decat"]
readme = "README.md"
packages = [{include = "poetry_demo"}]

[tool.poetry.dependencies]
python = "^3.10"


[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 lock file does not exist, poetry export writes some messages to standard output:

# poetry --version
Poetry (version 1.3.2)

# poetry new poetry-demo
Created package poetry_demo in poetry-demo

# cd poetry-demo/

# poetry export -f requirements.txt > requirements.txt
The lock file does not exist. Locking.
Creating virtualenv poetry-demo in /home/patrick/workspaces/tests/poetry/poetry-demo/.venv

# cat requirements.txt
Updating dependencies
Resolving dependencies...

Writing lock file

Related:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the poetry export -f requirements.txt command path and reproduce the issue using a new project without a lock file. Trace where locking and dependency-resolution messages are written during export; done means the generated requirements.txt contains only requirements output, not status messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.