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

platformdirs 3.0.0 pulls virtualenv down to very old version (20.4.7) #140

Closed
johnthagen opened this issue Feb 7, 2023 · 2 comments
Closed

Comments

@johnthagen
Copy link

johnthagen commented Feb 7, 2023

With this Poetry (tested with Poetry 1.3.2 on Python 3.10) project:

[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.10, <3.12"

[tool.poetry.group.dev.dependencies]
virtualenv = "*"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Running poetry update and pip list shows that the latest virtualenv is installed:

pip list
Package      Version
------------ -------
distlib      0.3.6
filelock     3.9.0
pip          22.3.1
platformdirs 2.6.2
setuptools   65.6.3
virtualenv   20.18.0
wheel        0.38.4

But adding platformdirs pulls virtualenv down to a very old version:

[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.10, <3.12"

[tool.poetry.group.dev.dependencies]
virtualenv = "*"
platformdirs = "*"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Package      Version
------------ -------
appdirs      1.4.4
distlib      0.3.6
filelock     3.9.0
pip          22.3.1
platformdirs 3.0.0
setuptools   65.6.3
six          1.16.0
virtualenv   20.4.7
wheel        0.38.4

The release of platformdirs 3.0.0 seems to have broken our environments the next time we tried to bump up our lockfile versions.

virtualenv 20.4.7 is almost two years old and causes issues in our environments such as:

$ python -m virtualenv venv
...
setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
KeyError: 'scripts'

Setting the dependency to platformdirs = "<3" in pyproject.toml is a temporary work around.

@johnthagen
Copy link
Author

Looking at this more closely, this might be due to the fact that virtualenv has a max limit on platformdirs:

I would guess that Poetry tries to update platformdirs and then has to trace backwards to find a virtualenv where there wasn't an upper bound on platformdirs 🤔 .

@johnthagen
Copy link
Author

This looks to be this upstream issue:

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

No branches or pull requests

2 participants