Upgrade Poetry to 2.x.x or use uv #201

Open
opened 2026-02-15 16:28:41 -05:00 by yindo · 5 comments
Owner

Originally created by @ParthSareen on GitHub (Jan 6, 2025).

Originally assigned to: @ParthSareen on GitHub.

Originally created by @ParthSareen on GitHub (Jan 6, 2025). Originally assigned to: @ParthSareen on GitHub.
Author
Owner

@akx commented on GitHub (Jan 14, 2025):

I would suggest not using Poetry at all, but e.g. uv if you really do need locking (you probably don't; libraries generally don't), and just standard PEP 517 packaging, using e.g. Hatch/Hatchling as the backend.

@akx commented on GitHub (Jan 14, 2025): I would suggest not using Poetry at all, but e.g. `uv` if you really do need locking (you probably don't; libraries generally don't), and just standard PEP 517 packaging, using e.g. [Hatch/Hatchling](https://hatch.pypa.io/latest/config/build/) as the backend.
Author
Owner

@ParthSareen commented on GitHub (Jan 14, 2025):

@akx thanks for the suggestion and I'm a fan of uv. For now, I think having locking just gives a peace of mind to ensure we don't have breaking changes from a random library. I'd rather own that responsibility than give it to the user

@ParthSareen commented on GitHub (Jan 14, 2025): @akx thanks for the suggestion and I'm a fan of uv. For now, I think having locking just gives a peace of mind to ensure we don't have breaking changes from a random library. I'd rather own that responsibility than give it to the user
Author
Owner

@akx commented on GitHub (Jan 14, 2025):

If dependencies are locked too strictly in the distributed package (I didn't check if that's the case for the sdist/wheel here though), it could prevent downstream users from eg. installing a security update to one of the locked deps.

@akx commented on GitHub (Jan 14, 2025): If dependencies are locked too strictly in the distributed package (I didn't check if that's the case for the sdist/wheel here though), it could prevent downstream users from eg. installing a security update to one of the locked deps.
Author
Owner

@akx commented on GitHub (Jan 14, 2025):

I didn't check if that's the case for the sdist/wheel here though

Okay, I did check now:

$ unzip -p ollama-0.4.6-py3-none-any.whl ollama-0.4.6.dist-info/METADATA | grep Requires
Requires-Python: >=3.8,<4.0
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: pydantic (>=2.9.0,<3.0.0)

IOW, there are no pinned deps in the distributions other than the loose ranges specified in

https://github.com/ollama/ollama-python/blob/02495ffd779dd792e498036c937427859ec4b36a/pyproject.toml#L13-L14

so there'd be no change in "owning the responsibility" there.

IOW, the requirements.txt file that is generated/checked in CI with poetry export is not used for anything that I can see. 🤷

@akx commented on GitHub (Jan 14, 2025): > I didn't check if that's the case for the sdist/wheel here though Okay, I did check now: ``` $ unzip -p ollama-0.4.6-py3-none-any.whl ollama-0.4.6.dist-info/METADATA | grep Requires Requires-Python: >=3.8,<4.0 Requires-Dist: httpx (>=0.27.0,<0.28.0) Requires-Dist: pydantic (>=2.9.0,<3.0.0) ``` IOW, there are no pinned deps in the distributions other than the loose ranges specified in https://github.com/ollama/ollama-python/blob/02495ffd779dd792e498036c937427859ec4b36a/pyproject.toml#L13-L14 so there'd be no change in "owning the responsibility" there. IOW, the `requirements.txt` file that is generated/checked in CI with `poetry export` is not used for anything that I can see. 🤷
Author
Owner

@ParthSareen commented on GitHub (Jan 14, 2025):

...
IOW, the requirements.txt file that is generated/checked in CI with poetry export is not used for anything that I can see. 🤷

Hmm okay, that makes a lot of sense. I think uv makes sense here then and I prefer it anyways. Will probably bump poetry to 2.x.x for now and then move over to uv. Thanks for pointing this out :D

@ParthSareen commented on GitHub (Jan 14, 2025): >... > IOW, the `requirements.txt` file that is generated/checked in CI with `poetry export` is not used for anything that I can see. 🤷 Hmm okay, that makes a lot of sense. I think uv makes sense here then and I prefer it anyways. Will probably bump poetry to 2.x.x for now and then move over to uv. Thanks for pointing this out :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#201