[skip changelog] Temporarily full pin Python in all GitHub Actions workflows (#1478)
A bug introduced in the 3.9.7 release of Python causes a spurious failure of the `test\test_lib.py::test_install_git_invalid_library` integration test: https://bugs.python.org/issue45121 As a workaround, the last working version of Python must be used: 3.9.6. In order to ensure this is done when running the integration tests locally, this version is specified in the Poetry configuration. Even though only the integration tests require this version limitation, the Poetry configuration change affects all processes that use Poetry. Since only the integration test workflow was adjusted accordingly, the other workflows using Poetry continued to explicitely install a version of Python that did not fulfill the version constraints specified in the Poetry configuration. It seems it was possible for Poetry to find a compatible version on the runner: > The currently activated Python version 3.9.7 is not supported by the project (>=3.8, <3.9.7). > Trying to find and use a compatible version. > Using python3.8 (3.8.10) but this additional output caused a failure of the "Deploy Website" workflow due to expecting only valid JSON as the output from the siteversion.py script: ``` Error: The template is not valid. Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: T. Path '', line 0, position 0. ``` Even though the other workflows were able to continue to work with the discovered Python 3.8.10, it seems safest avoid reliance on whatever Python the runner happens to have installed and instead explicitly install the Python version we want to be used. So the full pin of Python is done in all workflows that use Poetry. Since it is convenient to get automatic updates for Python patch releases, this full pin should be reverted back to the "3.9" minor version pin once a new version of Python is released with the bug fixed and added to versions available for installation via the `actions/setup-python` GitHub Actions action.
Showing
Please register or sign in to comment