python 诗歌添加命令从锁定文件中删除类别

m4pnthwp  于 2024-01-05  发布在  Python
关注(0)|答案(1)|浏览(133)

我当前的poetry.lock文件看起来像这样(部分)

  1. # This file is automatically @generated by Poetry and should not be changed by hand.
  2. [[package]]
  3. name = "annotated-types"
  4. version = "0.6.0"
  5. description = "Reusable constraint types to use with typing.Annotated"
  6. category = "main"
  7. optional = false
  8. python-versions = ">=3.8"
  9. files = [
  10. {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"},
  11. {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"},
  12. ]
  13. [[package]]
  14. name = "asgiref"
  15. version = "3.7.2"
  16. description = "ASGI specs, helper code, and adapters"
  17. category = "main"
  18. optional = false
  19. python-versions = ">=3.7"
  20. files = [
  21. {file = "asgiref-3.7.2-py3-none-any.whl", hash = "sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e"},
  22. {file = "asgiref-3.7.2.tar.gz", hash = "sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed"},
  23. ]

字符串
每个包都有一个类别
现在我需要添加一个额外的软件包。我运行poetry add --group main beautifulsoup4,但是category从每行中删除。我应该怎么做:1)安装一个新的软件包2)使category字段保持不变

iq3niunx

iq3niunx1#

  • category* 在poetry 1.5之后被删除了,这就是为什么它在poetry.lock文件中被删除的原因

相关问题