sarugaku / plette

Structured Pipfile and Pipfile.lock models.
ISC License
7 stars 7 forks source link

`dev_packages` broken in `v1.0.0` #53

Closed guidoiaquinti closed 2 months ago

guidoiaquinti commented 5 months ago

I'm currently debugging a CI issue from a mobile device with a limited internet connection, so there's a chance I might have overlooked something. However, it seems like access to dev_packages broke in v1.0.0. This was working as expected in previous versions.

Repro steps:

from plette import Pipfile

with open('Pipfile', encoding='utf-8') as f:
    pipfile = Pipfile.load(f)

    for package in pipfile.packages:
        print(package)

    for dev_package in pipfile.dev_packages:
        print(dev_package)
  File "/workspace/test.py", line 9, in <module>
    for dev_package in pipfile.dev_packages:
TypeError: 'NoneType' object is not iterable

Thank you!

oz123 commented 4 months ago

Should be fixed in #55 .

Please verify by doing the following:

python -i -m plette -f Pipfile.lock
>>> lockfile.dev_packages
>>> lockfile.develop

This should work for pipfiles too:

python -i -m plette -f Pipfile
>>> pipfile.dev_packages
oz123 commented 2 months ago

Should be fixed in v2.0.0. Please verify.