Closed mcrichton closed 2 months ago
This should be fixed by #55
Please verify by:
python -i -m plette -f Pipfile.lock
>>> lockfile.dev_packages
>>> lockfile.develop
Tested and working, thank you.
The only change I had to make was removing the (unused) import tomllib
as I am using Python 3.10: https://github.com/mcrichton/plette/commit/b395ca8ddb6d4871e9d3800a4fdc2d0234430323
Fixed in v2.0.0
Affects:
plette
version1.0.0
Expected:
accessing
lockfile["default"]
should return the same value aslockfile.default
Actual:
accessing
lockfile["default"]
causes an infinite loop (RecursionError
)Cause:
my_lockfile["default"]
->__getitem__(self, "default")
->value = self["default"]
->__getitem__(self, "default")
-> ...Repro:
Using (an admittedly outdated version of)
requirementslib
with latestplette
. Affected line here: https://github.com/sarugaku/requirementslib/blob/d6b5165bfc6f043b1156c209d85f3e09b60aeaa8/src/requirementslib/models/lockfile.py#L79Can also be easily repro'd in tests by doing
lock["default"]
Notes:
The tests in https://github.com/sarugaku/plette/blob/master/tests/test_lockfiles.py do not catch this issue, as they use
lock.<...>
rather thanlock[<...>]