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

Loosen python version requirement from >=3.8.1,<4 to >=3.8.1 #866

Closed
Ravencentric opened this issue Jul 6, 2024 · 2 comments · Fixed by #878
Closed

Loosen python version requirement from >=3.8.1,<4 to >=3.8.1 #866

Ravencentric opened this issue Jul 6, 2024 · 2 comments · Fixed by #878
Labels

Comments

@Ravencentric
Copy link

Ravencentric commented Jul 6, 2024

Is your feature request related to a problem? Please describe.

Libraries that may want to use syrupy cannot do so if they declare their python version without a ceiling version.

For example, assume my library declares the following dependency:

[tool.poetry.dependencies]
python = ">=3.9"

Syrupy is compatible with the above, but a poetry install will fail:

❯ poetry add syrupy -G dev
Using version ^4.6.1 for syrupy

Updating dependencies
Resolving dependencies... (0.3s)

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

Because no versions of syrupy match >4.6.1,<5.0.0
 and syrupy (4.6.1) requires Python >=3.8.1,<4, syrupy is forbidden.
So, because pyanilist depends on syrupy (^4.6.1), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For syrupy, a possible solution would be to set the `python` property to ">=3.9,<4"

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

Describe the solution you'd like
Loosen python version requirement from >=3.8.1,<4 to >=3.8.1

Describe alternatives you've considered
Force users to add the <4 python version marker

Additional context
N/A

@noahnu
Copy link
Collaborator

noahnu commented Aug 21, 2024

Considering python releases breaking changes between minor version updates, if I was being pedantic, I'd lower the ceiling to the max version we test against. I'm on board with relaxing this version 👍

@noahnu
Copy link
Collaborator

noahnu commented Aug 21, 2024

🎉 This issue has been resolved in version 4.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants