Skip to content

Update Poetry to version 2.0.0 #3709

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

Merged
merged 4 commits into from
Jan 9, 2025
Merged

Update Poetry to version 2.0.0 #3709

merged 4 commits into from
Jan 9, 2025

Conversation

danyeaw
Copy link
Member

@danyeaw danyeaw commented Jan 6, 2025

Updates to Poetry and upgrades to the pyproject.toml to using the project metadata.

I also learned that Poetry is not quite ready to use the optional-dependencies as part of the project metadata. I was seeing some inconsistent behavior with what was being installed and removed, and the --only and --with keywords no longer work.

I also fixed an issue that happened to be uncovered by this update. With the Wheel version of our Linux workflows, meson started to find the wrong Python version (version 3.13 instead of the matrix version), so I added a step to set the matrix version as the main alternative.

Finally I upgraded the readthedocs runner we were using to the latest LTS and Python 3.13.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added the packaging Update to packaging aspects label Jan 6, 2025
@danyeaw danyeaw force-pushed the poetry-2.0.0 branch 3 times, most recently from 5016641 to 6c32866 Compare January 7, 2025 01:06
@danyeaw danyeaw added chore Maintenance related PR and removed packaging Update to packaging aspects labels Jan 7, 2025
@danyeaw
Copy link
Member Author

danyeaw commented Jan 7, 2025

@amolenaar, Snyk is telling me that I am not a member of the organization - even though I know you previously added me. Could you please see what's going on?

@danyeaw danyeaw requested a review from amolenaar January 7, 2025 02:06
@github-actions github-actions bot added the packaging Update to packaging aspects label Jan 7, 2025
@danyeaw
Copy link
Member Author

danyeaw commented Jan 7, 2025

Never mind, I found the email invitation, and I was able to get access to Snyk.

It looks like Snyk only supports the older format for Poetry's pyproject.toml, and not the PEP621 version where dependencies are defined in the project section. I ran poetry check and also installed validate-pyproject to check for any other overall issues. Snyk is giving a Failed to read input file error for the Pyproject.toml check.

This upstream issue seems to be related:
snyk/snyk-python-plugin#250

@amolenaar
Copy link
Member

This looks really nice. It's good to see we can use the standard PEP layout now.

Do you want to merge it now, or wait for the next round of development (there may be some issues in the .0 release ;) ).

@danyeaw
Copy link
Member Author

danyeaw commented Jan 7, 2025

My usage of it seems like it is robust with this configuration, I would be good with upgrading it now.

What do you think we should do about Snyk, should we try to export to a requirement.txt for it?

@danyeaw danyeaw mentioned this pull request Jan 8, 2025
@amolenaar
Copy link
Member

We can disable Snyk for the time being. We also have dependabot running, which fixes most security issues quickly.

Since other builds are failing due to Poetry 2.0, it would be good to merge this I think. And announce it in the matrix chat, since developers need to upgrade their poetry version.

The error message Poetry 1.8 produces is not very informative.

@danyeaw
Copy link
Member Author

danyeaw commented Jan 9, 2025

Hi @amolenaar, that sounds good. I set the Snyk pyproject.toml integration as inactive.

@danyeaw danyeaw removed the packaging Update to packaging aspects label Jan 9, 2025
@danyeaw danyeaw merged commit 069e2c1 into main Jan 9, 2025
24 of 25 checks passed
@danyeaw danyeaw deleted the poetry-2.0.0 branch January 9, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants