-
Notifications
You must be signed in to change notification settings - Fork 30
Poetry 2 compatibility #363
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
Conversation
5d52204
to
c1c2bcd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #363 +/- ##
==========================================
- Coverage 63.43% 60.75% -2.69%
==========================================
Files 63 62 -1
Lines 8982 8948 -34
Branches 2574 2569 -5
==========================================
- Hits 5698 5436 -262
+ Misses 2665 2661 -4
- Partials 619 851 +232 ☔ View full report in Codecov by Sentry. |
857efbe
to
22a46a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not seeing the pass poetry check
with a warning part, but if this patch allows CI to pass pending a full migration then looks good to me
run: pipx install poetry | ||
# Pin to 1.8.5. because Poetry 2.0.0 installs plugins in a different way | ||
# (dynamic versioning in next step) | ||
run: pipx install poetry==1.8.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there is a way to pin a specific version of poetry in pyproject.toml https://python-poetry.org/blog/announcing-poetry-2.0.0/
We may want to do a quick 1-line PR to upstream linkml to add this pin there rather than here so they don't go out of sync & fix later, but since this is likely to be a quick and easy change to both packages not necessary at all and this would be fine too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the option to constrain poetry was added only in 2.0 - I could not find it in 1.8.5.
I now think it is better to directly go to Poetry 2.0 fully. Yesterday, I saw a failure locally which made me think that this fix is required but testing with a fresh checkout of the current main-branch shows that |
sounds good to me :) hopefully not too complicated, the 2.0 format is the standard anyway |
This only prepares for Poetry 2.0.x by removing old pins and changing the syntax to pass
poetry check
without warning for poetry 1.8.5.With poetry 2.0.x there are warnings but no errors. So with the PR merged the project can be installed just fine with poetry 2.0.x.
The poetry 2.0 update of
pyproject.toml
will change more and should maybe done in another PR. Moreover, we may want to wait a little before breaking Poetry 1.8.x compatibility.