You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing with Python 3.6 and 3.7 it now fails with "flake8", as flake 8 dropped support for Python < 3.8.
So for these old Pythons to work I need to fixate the flake version to be < 6. Easy.
But: On Python >= 3.8 flake8 could be any version, why not use the latest...
I read about markers and tried to write a Pipfile to reflect that:
...
flake8 = {markers="python_version < '3.8'", version = "<6"}
flake8 = {markers="python_version >= '3.8'", version = "*"}
...
Possibly helpful for what you are trying to do is this prototype PR that allows specifying which python/system information you want the resolver to operate against with respect to markers: #5931
Worth noting there is not support to lock different versions of the same package based on python version or system platform -- you basically get the one resolved version.
Meanwhile I was able to avoid that "conditional" and solve that indirectly by specifying constraints for older python versions for the problematic sub-dependency only. The resolver does the right thing, then.
That works.
[dev-packages]
flake8 = "*"
# needed for flake8 for Python 3.6 and Python 3.7
importlib-metadata = { version = ">=1.1.0,<4.3", markers = "python_version < '3.8'"}
I have a project running with Python 3.6 - 3.11.
When installing with Python 3.6 and 3.7 it now fails with "flake8", as flake 8 dropped support for Python < 3.8.
So for these old Pythons to work I need to fixate the flake version to be < 6. Easy.
But: On Python >= 3.8 flake8 could be any version, why not use the latest...
I read about markers and tried to write a
Pipfile
to reflect that:but that fails
How to solve that? Can I specify that in one line somehow?
Is there some syntax to specify package versions per python version?
Or should I play with different Pipfiles per Python version?
PIPENV_PIPFILE=path/to/pipfile pipenv install
and duplicate the Pipfile(s) in the project?
What's the best practice here?
The text was updated successfully, but these errors were encountered: