Skip to content

Commit 4708cde

Browse files
authored
[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.
1 parent 6bd2e3e commit 4708cde

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: .github/workflows/check-mkdocs-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
# See: https://github.com/actions/setup-go/tree/v2#readme
66
GO_VERSION: "1.16"
77
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
8-
PYTHON_VERSION: "3.9"
8+
PYTHON_VERSION: "3.9.6"
99

1010
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
1111
on:

Diff for: .github/workflows/check-python-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check Python
33

44
env:
55
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
6-
PYTHON_VERSION: "3.9"
6+
PYTHON_VERSION: "3.9.6"
77

88
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
99
on:

Diff for: .github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
# See: https://github.com/actions/setup-go/tree/v2#readme
66
GO_VERSION: "1.16"
77
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
8-
PYTHON_VERSION: "3.9"
8+
PYTHON_VERSION: "3.9.6"
99

1010
on:
1111
push:

0 commit comments

Comments
 (0)