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

Infrastructure: replace poetry #2219

Closed
Goldziher opened this issue Aug 25, 2023 · 10 comments · Fixed by #2357 or #2413
Closed

Infrastructure: replace poetry #2219

Goldziher opened this issue Aug 25, 2023 · 10 comments · Fixed by #2357 or #2413
Assignees
Labels
Infrastructure This is Infrastructure related

Comments

@Goldziher
Copy link
Contributor

Goldziher commented Aug 25, 2023

Summary

Following multiple discussions and given some repeated issues with poetry we decided to switch from poetry to using PDM + Hatchling

The tasks are as follow:

  1. replace poetry with PDM for dependency management. This includes the configuration in pyproject, the logic in the github actions, and the contributions guidelines.
  2. replace poetry with Hatchling for releasing litestar. This includes the configuration in pyproject, the contributions guidelines and the release github action.

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


Funding

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@Goldziher Goldziher added the Infrastructure This is Infrastructure related label Aug 25, 2023
@cofin
Copy link
Member

cofin commented Aug 25, 2023

I think we should start with the foundation that @JacobCoffee has here

@JacobCoffee JacobCoffee self-assigned this Aug 27, 2023
@benjamin-kirkbride
Copy link
Contributor

benjamin-kirkbride commented Aug 28, 2023

Does PDM necessitate using PDM to contribute in the same way that Poetry does (did?), or is it possible to just pip install -e ".[dev]" (or similar) to start hacking?

@JacobCoffee
Copy link
Member

I know that you can do pip install -e ... without requirements.txt file, I am not 100% sure on passing the optional extras though.. I didn't think Poetry was able to do this either? @provinzkraut @cofin

@provinzkraut
Copy link
Member

Afaik there's no standard for these "dev dependencies" (yet), so pip won't be able to install them.

@benjamin-kirkbride
Copy link
Contributor

benjamin-kirkbride commented Aug 29, 2023

There is a standard for it, but you are correct that Poetry doesn't (or at least didn't) use it. I'm hoping that whatever is selected doesn't have the same sort of non-standard limitations :)

https://packaging.python.org/en/latest/specifications/declaring-project-metadata/?highlight=optional-dependencies#dependencies-optional-dependencies

@benjamin-kirkbride
Copy link
Contributor

@JacobCoffee
Copy link
Member

This is true for optional package dependencies, but PDM manages them outside of the scope of the standard as well, similar to poetry

https://pdm.fming.dev/latest/usage/dependency/#add-development-only-dependencies

[tool.pdm.dev-dependencies]
lint = [
    "flake8",
    "black"
]
test = ["pytest", "pytest-cov"]
doc = ["mkdocs"]

@benjamin-kirkbride
Copy link
Contributor

@JacobCoffee it seems like it actually is possible with PDM: https://pdm.fming.dev/latest/usage/dependency/#add-dependencies:~:text=optional%20groups%20in-,optional%2Ddependencies,-%2C%20even%20before%20the

@Goldziher Goldziher closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2023
@JacobCoffee JacobCoffee reopened this Sep 17, 2023
@nandoflorestan
Copy link

What is the main reason to move away from poetry? This issue does not say.

@JacobCoffee
Copy link
Member

JacobCoffee commented Sep 19, 2023

I believe performance issues (dependency resolution time) and bugs with developmental dependency installs were two of the key reasons.

More discussion here: https://discord.com/channels/919193495116337154/1153039838342283275

@JacobCoffee JacobCoffee mentioned this issue Sep 25, 2023
3 tasks
@cofin cofin linked a pull request Oct 7, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure This is Infrastructure related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants