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

Migrate pyproject.toml to PEP 621 / Poetry 2.0 #36

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Migrate pyproject.toml to PEP 621 / Poetry 2.0 #36

merged 2 commits into from
Jan 6, 2025

Conversation

dalito
Copy link
Member

@dalito dalito commented Jan 5, 2025

The dynamic versioning plugin that is used here may not be fully Poetry-2.0-ready. It fails with a PEP 621 style config.

Poetry 2.0 also does still not support recursive extra dependencies: They just closed the bug report instead of solving it 😕 python-poetry/poetry#3369 - So this feature cannot be used atm.

Poetry 2.0 also has problems while resolving dependencies:

(.venv) λ poetry lock --regenerate
Updating dependencies
Resolving dependencies... (0.5s)

The current project's supported Python range (>=3.9) is not compatible with some of the required packages Python requirement:
  - linkml-runtime requires Python <4.0,>=3.8, so it will not be satisfied for Python >=4.0
  - linkml-runtime requires Python <4.0,>=3.8, so it will not be satisfied for Python >=4.0
  - linkml-runtime requires Python <4.0,>=3.8, so it will not be satisfied for Python >=4.0
  - linkml-runtime requires Python <4.0,>=3.8, so it will not be satisfied for Python >=4.0

Solution: https://python-poetry.org/docs/main/pyproject#requires-python

@dalito dalito force-pushed the poetry-2.0 branch 4 times, most recently from b5a05f1 to ba0a340 Compare January 5, 2025 19:24
@dalito dalito marked this pull request as ready for review January 5, 2025 20:25
@dalito dalito merged commit 3a20e00 into main Jan 6, 2025
4 checks passed
@dalito dalito deleted the poetry-2.0 branch January 6, 2025 09:05
@markdoerr
Copy link

Hi @dalito,
over the holidays I collected some experience with uv - and it is very very impressive, what it does and at which speed. I am currently migrating all LARA repos to uv to save a lot of CI time.
It could also be considered in this project.

Here are some helpful how-tos:

https://github.com/astral-sh/setup-uv

https://hynek.me/articles/ditch-codecov-python/

@dalito
Copy link
Member Author

dalito commented Jan 6, 2025

I normally do not use poetry if I have the free choice. Here we inherited it from the linkml cookiecutter template. I prefer pip with hatch, pipx & piptools or now uv which is a really great alternative.

Switching to another tool is now easier due to the PEP 621 compliance. :-)

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 this pull request may close these issues.

2 participants