-
Notifications
You must be signed in to change notification settings - Fork 25
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
Micropipenv does not work with Poetry 1.5.0+ #280
Comments
See thoth-station/micropipenv#280 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
See thoth-station/micropipenv#280 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Thanks for the detailed report. I won't have time to take a deeper look at it sooner than the end of next week so PRs are more than welcome. |
See thoth-station/micropipenv#280 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
/kind feature |
See thoth-station/micropipenv#280 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
See thoth-station/micropipenv#280 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
See thoth-station/micropipenv#280 Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
I think that we have a bigger issue here. With kinda rapidly evolving poetry, the current approach "convert poetry.lock into pipfile and then install whatever is in that pipfile" doesn't work anymore. Poetry supports groups so default/dev groups in micropipenv are not enough anymore. And if we add groups to micropipenv, the intermediate file would be different from Pipfile.lock so we might need to rewrite that part and handle both files differently. That would also require rewriting the CLI to allow (de)selecting groups. I'm not sure about the best path forward now. |
As I'm thinking about it, I see two ways forward. First, let me summarize how I understand how micropipenv works now:
If we want to keep the support of poetry (which I think is important because poetry is much more popular than Pipenv), we can either implement full support or make some compromises.
IMO we can start with the latter and see how many users will need the full support. @abompard how important is it for you to handle specific groups of dependencies in your projects? |
Another possibility for micropipenv is to become the leader in creating a new lockfile standard as discussed here and in #249 . That would mean we can include all important information from pyproject.toml and all other lockfiles into the new standard format used internally only in micropipenv. And if it works and covers all known use cases, we can propose it upstream as a PEP. Not sure how doable this is and how much time other maintainers can invest in this. Cc @fridex @VannTen |
+1 on rewriting the current poetry handling, IMHO this is the best long-term solution. Keeping the internal conversion from poetry.lock to Pipenv.lock can just cause issues long term. I could imagine some internal intermediate representation of what needs to be installed, but not in the form of a Pipfile.lock as it might cause troubles.
The scenario with the lockfile would be great - I'm not sure the current state of the lockfile but note the rejected PEP-665. |
@fridex thanks for the input/opinion @frenzymadness @VannTen do you think you guys find some time this quarter to work on it? |
Unlikely. I'm leaving Red Hat and while I'm probably gonna do some
Ansible/Python stuff, I surely won't be involved in micropipenv for
quite some time.
|
🙄 sad to hear that! I hope it was at least a little good to stay with us?! |
I hope it was at least a little good to stay with us?!
Sure it was !
|
Does anyone know of a workaround for this issue? is there a way to tell micropipenv to use a version of poetry that does work? |
@marksie1988 I'm personally rebuilding the lockfile with an older version of poetry in |
Thanks, @abompard, for the quick reply. Micropipenv does not use poetry directly, so the workaround for now is to generate lockfile with an older version of poetry. |
Thanks this worked for me 👍 |
Poetry 1.5 no longer provides category info in poetry.lock. Fixes: thoth-station#280
Fix ready for review in #284 |
Poetry 1.5 no longer provides category info in poetry.lock. Fixes: #280
Since version 1.5.0, Poetry no longer writes the "category" key into the poetry.lock file (poetry#7637). This breaks micropipenv:
A comment in the ticket suggest that we could just do a
.get(("category", "main")
for a simple fix. I tried that locally and it works around the crash.A better fix, I think, would be to get the information whether a package is in the "dev" group from the right place, since the
category
key is apparently no longer relevant. It does not seem to be inpoetry.lock
anymore though, maybe we'll have to read it frompyproject.toml
.The text was updated successfully, but these errors were encountered: