We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
LockFile
__getitem__
Affects:
plette version 1.0.0
plette
1.0.0
Expected:
accessing lockfile["default"] should return the same value as lockfile.default
lockfile["default"]
lockfile.default
Actual:
accessing lockfile["default"] causes an infinite loop (RecursionError)
RecursionError
Cause:
plette/src/plette/lockfiles.py
Line 109 in bfda17b
my_lockfile["default"] -> __getitem__(self, "default") -> value = self["default"] -> __getitem__(self, "default") -> ...
my_lockfile["default"]
__getitem__(self, "default")
value = self["default"]
Repro:
Using (an admittedly outdated version of) requirementslib with latest plette. Affected line here: https://github.com/sarugaku/requirementslib/blob/d6b5165bfc6f043b1156c209d85f3e09b60aeaa8/src/requirementslib/models/lockfile.py#L79
requirementslib
Can also be easily repro'd in tests by doing lock["default"]
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 than lock[<...>]
lock.<...>
lock[<...>]
The text was updated successfully, but these errors were encountered:
This should be fixed by #55
Please verify by:
python -i -m plette -f Pipfile.lock >>> lockfile.dev_packages >>> lockfile.develop
Sorry, something went wrong.
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: mcrichton@b395ca8
import tomllib
Fixed in v2.0.0
No branches or pull requests
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:
plette/src/plette/lockfiles.py
Line 109 in bfda17b
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[<...>]
The text was updated successfully, but these errors were encountered: