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

Document poetry2 requirement #129

Closed
cmungall opened this issue Feb 3, 2025 · 2 comments · Fixed by #131
Closed

Document poetry2 requirement #129

cmungall opened this issue Feb 3, 2025 · 2 comments · Fixed by #131

Comments

@cmungall
Copy link
Member

cmungall commented Feb 3, 2025

Looks like we got rid of [tool.poetry] for poetry 2.0, but is it expected it fails for poetry 1 now?

The Poetry configuration is invalid:
  - The fields ['authors', 'description', 'name'] are required in package mode.
  - Additional properties are not allowed ('requires-poetry' was unexpected)
  - Additional properties are not allowed ('requires-plugins' was unexpected)
@dalito
Copy link
Member

dalito commented Feb 4, 2025

Yes, because poetry 1.x cannot read PEP 621 conform pyproject.toml. Compatibility with both poetry versions would only be possible if this key feature of poetry 2 is not used.

But does poetry 2.0 not work correctly with pyproject.toml for poetry 1.8 files? I have only seen problems for very old files (poetry<1.4).

@cmungall
Copy link
Member Author

cmungall commented Feb 4, 2025

OK, so it sounds like the general recommendation is that everyone should upgrade to poetry 2 - would be great to get a note in the README about this.

Tip from @pkalita-lbl:

But you can still use the Poetry 2 CLI with the old pyproject.toml format. The only thing you might notice is that poetry shell is gone — if you were using that. What I’ve settled on for now is having Poetry 2 as my default poetry command:

pipx install poetry

And keeping Poetry 1.x around as poetry1 if I really l need it for some project:

pipx install --suffix=1 'poetry<2.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants