[skip changelog] Temporarily full pin Python in all GitHub Actions workflows #1478
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Bug fix
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 (#1470). 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 (#1470), 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:
https://github.com/per1234/arduino-cli/runs/3718711989?check_suite_focus=true#step:11:19 (visible due to debug output having been enabled in my fork)
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:
https://github.com/arduino/arduino-cli/runs/3701954217?check_suite_focus=true#step:12:1
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.
titled accordingly?
No breaking change
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.