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

未关闭
#175 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
cli

调研方向

从 poetry export -f requirements.txt 命令路径开始,使用一个没有锁定文件的新项目复现该问题。跟踪导出期间 locking 和 dependency-resolution 消息的写入位置;当生成的 requirements.txt 只包含 requirements 输出而不包含 status 消息时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

  • 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:

主要语言
Python
星标
336
派生
59
平均合并
10 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

python-poetry/poetry-plugin-export 的其他 Issue

查看 python-poetry/poetry-plugin-export 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。