Skip to content

Cannot initialize project with poetry #501

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

Closed
cbrnr opened this issue Oct 8, 2024 · 9 comments · Fixed by #504
Closed

Cannot initialize project with poetry #501

cbrnr opened this issue Oct 8, 2024 · 9 comments · Fixed by #504

Comments

@cbrnr
Copy link
Contributor

cbrnr commented Oct 8, 2024

I just wanted to start developing, and after cloning the repo I did poetry install. After more than a minute, I received the following error(s):

❯ poetry install
Updating dependencies
Resolving dependencies... (66.6s)

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

Because no versions of pandas match >1.3.0,<1.3.1 || >1.3.1,<1.3.2 || >1.3.2,<1.3.3 || >1.3.3,<1.3.4 || >1.3.4,<1.3.5 || >1.3.5,<1.4.0 || >1.4.0,<1.4.1 || >1.4.1,<1.4.2 || >1.4.2,<1.4.3 || >1.4.3,<1.4.4 || >1.4.4,<1.5.0 || >1.5.0,<1.5.1 || >1.5.1,<1.5.2 || >1.5.2,<1.5.3 || >1.5.3,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.0.2 || >2.0.2,<2.0.3 || >2.0.3,<2.1.0 || >2.1.0,<2.1.1 || >2.1.1,<2.1.2 || >2.1.2,<2.1.3 || >2.1.3,<2.1.4 || >2.1.4,<2.2.0 || >2.2.0,<2.2.1 || >2.2.1,<2.2.2 || >2.2.2,<2.2.3 || >2.2.3
 and pandas (1.3.0) requires Python >=3.7.1, pandas is forbidden.
And because pandas (1.3.1) requires Python >=3.7.1
 and pandas (1.3.2) requires Python >=3.7.1, pandas is forbidden.
And because pandas (1.3.3) requires Python >=3.7.1
 and pandas (1.3.4) requires Python >=3.7.1, pandas is forbidden.
And because pandas (1.3.5) requires Python >=3.7.1
 and pandas (1.4.0) requires Python >=3.8, pandas is forbidden.
And because pandas (1.4.1) requires Python >=3.8
 and pandas (1.4.2) requires Python >=3.8, pandas is forbidden.
And because pandas (1.4.3) requires Python >=3.8
 and pandas (1.4.4) requires Python >=3.8, pandas is forbidden.
And because pandas (1.5.0) requires Python >=3.8
 and pandas (1.5.1) requires Python >=3.8, pandas is forbidden.
And because pandas (1.5.2) requires Python >=3.8
 and pandas (1.5.3) requires Python >=3.8, pandas is forbidden.
And because pandas (2.0.0) requires Python >=3.8
 and pandas (2.0.1) requires Python >=3.8, pandas is forbidden.
And because pandas (2.0.2) requires Python >=3.8
 and pandas (2.0.3) requires Python >=3.8, pandas is forbidden.
And because pandas (2.1.0) requires Python >=3.9
 and pandas (2.1.1) requires Python >=3.9, pandas is forbidden.
And because pandas (2.1.2) requires Python >=3.9
 and pandas (2.1.3) requires Python >=3.9, pandas is forbidden.
And because pandas (2.1.4) requires Python >=3.9
 and pandas (2.2.0) requires Python >=3.9, pandas is forbidden.
And because pandas (2.2.1) requires Python >=3.9
 and pandas (2.2.2) requires Python >=3.9, pandas is forbidden.
So, because pandas (2.2.3) requires Python >=3.9
 and wfdb depends on pandas (>=1.3.0), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.7.1"
    For pandas, a possible solution would be to set the `python` property to ">=3.7.1"
    For pandas, a possible solution would be to set the `python` property to ">=3.7.1"
    For pandas, a possible solution would be to set the `python` property to ">=3.7.1"
    For pandas, a possible solution would be to set the `python` property to ">=3.7.1"
    For pandas, a possible solution would be to set the `python` property to ">=3.7.1"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.8"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"
    For pandas, a possible solution would be to set the `python` property to ">=3.9"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

So the version range of pandas does not match the one from this project.

However, Poetry has several issues that make it a suboptimal choice for managing a Python project (the most serious is that is completely ignores standards agreed upon by the Python community). Therefore, would you be open to using a different tool that does support the official pyproject.toml specifications?

@tompollard
Copy link
Member

would you be open to using a different tool that does support the [official pyproject.toml specifications (https://packaging.python.org/en/latest/specifications/pyproject-toml/#pyproject-toml-spec)?

I don't think we're especially tied to poetry (right @bemoody?). What would you recommend instead?

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 8, 2024

Literally anything else. The easiest tool would be pip, but I'd recommend uv.

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 8, 2024

I can submit a PR where you can see what will change. Not too much actually, but since it will follow established standards, users (devs) can use any standard-compliant tool.

@bemoody
Copy link
Collaborator

bemoody commented Oct 8, 2024

The wfdb-python package is designed to be usable with any Python application and certainly should work with any package manager.

It currently relies on poetry's "build backend" (to generate the wheel file), but it should still be possible to install the package using pip or uv, and you shouldn't need to have poetry installed in order to use the package. I haven't had problems installing the package using pip.

We may want to switch (back?) to using the (traditional, standard, some might say old-fashioned) setuptools build backend instead of poetry.

We may also want to remove the references to poetry from the README.md, which may be confusing people.

@bemoody
Copy link
Collaborator

bemoody commented Oct 8, 2024

I can submit a PR where you can see what will change.

Please do, that would be quite helpful!

@tompollard
Copy link
Member

@bemoody i have heard good things about uv, and using here would be a nice opportunity to give it a try. i assume i'll see you in the next hour or so, so can we have a quick chat before making a decision on which tool to use?

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 8, 2024

You might want to read https://blog.ucodery.com//posts/the-trouble-with-poetry/. In my opinion a pretty accurate summary.

@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 8, 2024

@bemoody any build backend that follows the standard is fine, this is literally any tool except poetry (setuptools, but I prefer hatch). And yes, any package is usable, independent of how it was built. Like I said, I'll show you what I mean in a PR (but that could take me until tomorrow).

@tompollard
Copy link
Member

@cbrnr if you have a chance to open a pull request, we would appreciate it (with whatever tooling you prefer). If not, I'll try to pick this up next week sometime.

@bemoody bemoody mentioned this issue Oct 9, 2024
4 tasks
tompollard added a commit that referenced this issue Oct 15, 2024
Fixes #501.

To do:

- [ ] Adapt workflow to setup access to PyPI (see
https://docs.astral.sh/uv/guides/publish/#publishing-a-package)
- [ ] Optimize tests (currently, I'm using `uv pip ...`, but I think
this should be replaced with `uv run ...`
- [ ] Bump any package versions and/or Python?
- [ ] Use Ruff instead of Black?
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 a pull request may close this issue.

3 participants