Skip to content

Fix use-external-python in the action#22

Draft
RytoEX wants to merge 1 commit intomarian-code:masterfrom
RytoEX:fix-use-external-python
Draft

Fix use-external-python in the action#22
RytoEX wants to merge 1 commit intomarian-code:masterfrom
RytoEX:fix-use-external-python

Conversation

@RytoEX
Copy link

@RytoEX RytoEX commented Jan 15, 2026

fd01666 (PR #16) broke setting the Python version for the action.

While use-external-python works in .github/workflows/test-python-install.yml, it does not work in the action itself. This is because custom action inputs cannot use true booleans, so the use-external-python input is a string type. This string then always gets interpreted as "true", so the "Setup python" condition always resolves to "false" due to negation.

Use fromJSON to correctly convert the strings "true" and "false" to boolean types.

To compare, see these before and after logs, paying special attention to the Python version in each job:

Please note that the action test will "fail" until #21 is merged because the macos-13 runners cannot initialize.

@marian-code
Copy link
Owner

Can you please move the v4 tag to the latest commit on this branch? Then I'll merge.

@RytoEX
Copy link
Author

RytoEX commented Feb 25, 2026

Can you please move the v4 tag to the latest commit on this branch? Then I'll merge.

What v4 tag? If you mean GitHub first-party Actions, I do have a separate local branch updating all of those.

marian-code/python-lint-annotate@fd01666
broke setting the Python version for the action.

While use-external-python works in
.github/workflows/test-python-install.yml, it does not work in the
action itself. This is because custom action inputs cannot use true
booleans, so the use-external-python input is a string type. This string
then always gets interpreted as "true", so the "Setup python" condition
always resolves to "false" due to negation.

Use fromJSON to correctly convert the strings "true" and "false" to
boolean types.
@RytoEX RytoEX force-pushed the fix-use-external-python branch from 0603f7b to 38fedd7 Compare February 25, 2026 22:47
@RytoEX
Copy link
Author

RytoEX commented Feb 25, 2026

Rebased now that #21 is merged. I did not get these failures before, so I will go check into this quickly. I suspect that some older versions of Python must be dropped (3.8, 3.9), and I have those changes on a separate branch, so I will test my changes collectively on my repo.

@RytoEX
Copy link
Author

RytoEX commented Feb 25, 2026

It turns out that the macOS 14 runners (and perhaps the macOS 15 runners) will fail to install Python 3.8-3.10: https://github.com/RytoEX/python-lint-annotate/actions/runs/22419941092

Python 3.11-3.14 seem to work fine.

I see what happened, and it was my oversight in #21. Back when #16 landed, macos-latest was equivalent to macos-14: https://github.com/actions/runner-images/tree/6eccdcc56f1b3601f6a54393659b290ece561d24

When I changed macos-13, macos-latest (what was before macos-13, macos-14, but was effectively now macos-13-macos-15) to macos-14, macos-latest (effectively now macos-14, macos-15), I forgot to change the exclude rules in the matrix below it which previously prevented the macos-14 runners from testing Python 3.10-3.12. I'll adjust that shortly so that the macOS runners are not trying to run Python 3.10.

@RytoEX
Copy link
Author

RytoEX commented Feb 25, 2026

I will push a separate PR to fix the oversight from #21, but I will also push a PR containing all of the fixes/updates in sequence so that it shows that all fixes work together. If it is easier to merge one PR instead of several, I will focus on that.

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

Successfully merging this pull request may close these issues.

2 participants