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

fix: Specify Python version for some deps #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nchz
Copy link

@nchz nchz commented Sep 28, 2024

Context

hi @danihodovic ,

i came across this issue when trying to contribute with some translations (i'll open a separate PR for them).

when trying to run poetry install i got the known:

pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.

so when running poetry lock i got this, new to me TBH (output a bit truncated for better reading):

Updating dependencies
Resolving dependencies... (5.5s)

The current project's supported Python range (>=3.8) is not compatible with some of the required packages Python requirement:
  - djlint requires Python <4.0,>=3.8, so it will not be satisfied for Python >=4.0
  - ... some more lines pretty similar

Because no versions of djlint match >1.34.1,<1.34.2 || >1.34.2,<1.35.0 || >1.35.0,<1.35.1 || >1.35.1,<1.35.2 || >1.35.2,<2.0.0
 and djlint (1.34.1) requires Python >=3.8.0,<4.0.0, djlint is forbidden.
... some more lines with "And because" then "djlint is forbidden".

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

    For djlint, a possible solution would be to set the `python` property to ">=3.8,<4.0"
   ..... etc

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

seems that the issue was introduced in the latest release 1.4.1, i could validate that it's not in 1.4.0.

Solution

  • i first fixed the djlint dependency to specify the Python version >=3.8,<4.0,
  • and then the fido2 library (seems it's a django-allauth dependency) thrown an equivalent error as above.
  • so i pinned it as well, and it made poetry happy.

please let me know if i should take some other step to contribute in your project.

thanks a lot for creating this! really cool.

@nchz
Copy link
Author

nchz commented Sep 28, 2024

forgot to mention:

i tested this in Linux and MacOS, same issue on both.

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.

1 participant