Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poetry.lock contains empty reference in metadata.files for some packages #5988

Closed
3 tasks done
mickours opened this issue Jul 11, 2022 · 5 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@mickours
Copy link

  • 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 (-vvv option).
  • OS version and name: tested on Archlinux and NixOS 22.05
  • Poetry version: happen with both 1.1.13 and 1.1.14

Issue

The poetry.lock file does has empty list for metadata file which breaks third tools (here poetry2nix).

I've created a minimal working example and here it is:

[tool.poetry]
name = "poetry-bug"
version = "0.1.0"
description = ""
authors = ["test"]

[tool.poetry.dependencies]
python = "^3.9"
fire = "^0.4.0"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Here is the metadata files part of the poetry.lock file. You see that fire and termcolor are empty.

[metadata.files]
fire = []
six = [
    {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
    {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
]
termcolor = []

Here is the lock execution logs:

poetry lock -vvv
Using virtualenv: /home/mmercier/scratch/poetry-bug/.env
Updating dependencies
Resolving dependencies...
   1: fact: poetry-bug is 0.1.0
   1: derived: poetry-bug
   1: fact: poetry-bug depends on fire (^0.4.0)
   1: selecting poetry-bug (0.1.0)
   1: derived: fire (>=0.4.0,<0.5.0)
PyPI: 1 packages found for fire >=0.4.0,<0.5.0
   1: fact: fire (0.4.0) depends on six (*)
   1: fact: fire (0.4.0) depends on termcolor (*)
   1: selecting fire (0.4.0)
   1: derived: termcolor
   1: derived: six
PyPI: 7 packages found for termcolor *
PyPI: 27 packages found for six *
   1: selecting termcolor (1.1.0)
   1: selecting six (1.16.0)
   1: Version solving took 0.428 seconds.
   1: Tried 1 solutions.

Writing lock file

Not sure why this package particularly are giving empty values but it breaks the pinning somehow.

@mickours mickours added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jul 11, 2022
@finswimmer
Copy link
Member

Hello @mickours,

this is fixed in Poetry 1.1.14. But you have to clear your cache by poetry cache clear --all pypi after updating.

fin swimmer

@expobrain
Copy link

expobrain commented Jul 14, 2022

@finswimmer it's still happening to me after upgrading to 1.1.14 and clearing the cache.

Also, downgrading to a previous version doesn't help.

Let me know which info you need from my setup for further debugging.

Upgrading poetry-core to 1.0.8 solved the issue; maybe Poetry should force that version as minimal?

weiji14 added a commit to weiji14/zen3geo that referenced this issue Jul 17, 2022
weiji14 added a commit to weiji14/zen3geo that referenced this issue Jul 17, 2022
Run Continuous Integration tests, workflows and documentation build on Python 3.10. Need to bump rasterio from 1.2.10 to 1.3.0 to get the Python 3.10 wheels as mentioned in f1f7652.

* ⬆️ Bump rasterio from 1.2.10 to 1.3.0

Bumps [rasterio](https://github.com/mapbox/rasterio) from 1.2.10 to 1.3.0.
- [Release notes](https://github.com/mapbox/rasterio/releases)
- [Changelog](https://github.com/mapbox/rasterio/blob/master/CHANGES.txt)
- [Commits](rasterio/rasterio@1.2.10...1.3.0)

Note that wheel hashes are missing, possibly due to python-poetry/poetry#5988.

* 👷 NEP29: Run CI and Docs build on Python 3.10

Bumps [python](https://github.com/python/cpython) from 3.9.13 to 3.10.5.
  - [Release notes](https://github.com/python/cpython/releases/tag/v3.10.5)
  - [Changelog](https://docs.python.org/3/whatsnew/3.10.html)
  - [Commits](python/cpython@v3.9.13...v3.10.5)
@musfiqurcse
Copy link

Hello @finswimmer , after running the command poetry cache clear --all pypi , the existing packages got empty list & the update packages got the metadata file information

OLD poetry.lock

[metadata.files]
alabaster = [
    {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"},
    {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"},
]
distlib = [
    {file = "distlib-0.3.2-py2.py3-none-any.whl", hash = "sha256:23e223426b28491b1ced97dc3bbe183027419dfc7982b4fa2f05d5f3ff10711c"},
    {file = "distlib-0.3.2.zip", hash = "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736"},
]
dj-database-url = [
    {file = "dj-database-url-0.5.0.tar.gz", hash = "sha256:4aeaeb1f573c74835b0686a2b46b85990571159ffc21aa57ecd4d1e1cb334163"},
    {file = "dj_database_url-0.5.0-py2.py3-none-any.whl", hash = "sha256:851785365761ebe4994a921b433062309eb882fedd318e1b0fcecc607ed02da9"},
]
django = [
    {file = "Django-3.2.13-py3-none-any.whl", hash = "sha256:b896ca61edc079eb6bbaa15cf6071eb69d6aac08cce5211583cfb41515644fdf"},
    {file = "Django-3.2.13.tar.gz", hash = "sha256:6d93497a0a9bf6ba0e0b1a29cccdc40efbfc76297255b1309b3a884a688ec4b6"},
]

New poetry.lock

[metadata.files]
alabaster = []
distlib = []
dj-database-url = []
django = [
    {file = "Django-3.2.14-py3-none-any.whl", hash = "sha256:a8681e098fa60f7c33a4b628d6fcd3fe983a0939ff1301ecacac21d0b38bad56"},
    {file = "Django-3.2.14.tar.gz", hash = "sha256:677182ba8b5b285a4e072f3ac17ceee6aff1b5ce77fd173cc5b6a2d3dc022fcf"},
]

And if I revert back the django package to 3.2.13, it contains the empty list.

changes poetry.lock

[metadata.files]
alabaster = []
distlib = []
dj-database-url = []
django = []

Is there something missing around ?

@brechtm
Copy link

brechtm commented Aug 3, 2022

I'm also experiencing this behavior. Clearing the cache and upgrading poetry-core in poetry's venv doesn't help.

EDIT: Never mind. poetry self update simply didn't have any effect for some reason...

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

6 participants