The documentation for Poetry's "supported python versions" not accurate. Code or Docs bug? #10421
Replies: 1 comment
-
|
Thanks for the analysis. There is no clear answer but I will try to explain our current policy. Poetry itself does only support Python versions until their EOL. That just means that a Poetry version released after the EOL of a specific Python version cannot be installed with such a Python version (at least without any hacks). Often, you can still manage venvs with older Python versions because there are only some lines of code that are executed in the target venv - mostly https://github.com/python-poetry/poetry/blob/main/src/poetry/utils/env/script_strings.py. We try not to break them for older versions if it does not take too much effort. However, we do not test that it still works.
The concerning lines were removed in #9304 so that managing Python 3.7 venvs may work again with Poetry 2. The lines were kind of reintroduced in #10361 with Poetry 2.1.3. However, they should only be executed in very special cases (see description of this issue for details) so that I think it may make sense to give the latest Poetry version a try. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While working on fixes in a legacy project I have tripped over the behaviour noted in this issue #9515, while working with the latest Poetry version installed using
pipx.Having looked into the situation a bit deeper, two things have become clear.
packaginglibrary released Version 23.2 Changelog dropping support for Python 3.7, due to the subsequent changes inpoetryVersion 1.8.1, Specifically this commit...poetrywhen installed normally per the website instructions has been unable to correctly execute packaging related commands inside of Python environments using versions 3.7 or lower due to the changes in thepackaginglibrary dependency. (This can be fixed by force installing specificallypackaging==23.1into thepipxenvironment viapipx inject poetry 'packaging==23.1' --force)This raises an obvious question. Has
poetryaccidentally dropped support for Python versions before 3.8 and this needs fixing? Or is this either acceptable or intentional and the website documentation needs updating to state thatpoetrycan only operate with environments 3.8 and newer? The current documentation makes note at the top of https://python-poetry.org/docs/managing-environments/ that:Since there wasn't much commentary on the surrounding changes, I can't be sure if this is accidental and needs fixing or is either acceptable or deliberate and so the documentation needs updating... So I'm not sure if I should open a bug for the code or the website repo... The timing doesn't help me much, since the commit to
poetrycame after the release of thepackaginglibrary version that dropped support for 3.7, the decision to not pin the version ofpackagingto specifically 23.1 in order to retain support for 3.7 and older may have been deliberate when fixing the dependency version in #9031 in order to ensure that thepackaginglibrary version has the newerpackaging.metadatamodule so that earlier commits cff4d7d and 50a7723 function correctly.Figured I'd just open the discussion and get some opinions.
Beta Was this translation helpful? Give feedback.
All reactions