actions / setup-python

Set up your GitHub Actions workflow with a specific version of Python
MIT License
1.66k stars 532 forks source link

Failure to parse pyproject.toml file when run on Windows #935

Open nfelt14 opened 2 weeks ago

nfelt14 commented 2 weeks ago

Description:

The action is failing with this error message when run on a Windows runner.

Error: Control characters (codes < 0x1f and 0x7f) are not allowed in comments, use \u000d instead at row 19, col 61, pos 454:
18: omit = [
19>   "**/tm_devices/commands/**"  # TODO: remove this exclusion
                                                                ^
20: ]

Action version: I believe that it is v5.2.0

Platform:

Runner type:

Tools version:

Repro steps:

Workflow run: https://github.com/tektronix/tm_devices/actions/runs/10624903656/job/29454004640?pr=293

Here is a snippet of the toml file that is failing to be read:


[tool.coverage.report]
exclude_lines = [
  "if TYPE_CHECKING:",
  "pragma: no cover",
  "raise NotImplementedError"
]
fail_under = 100
omit = [
  "**/tm_devices/commands/**"  # TODO: remove this exclusion
]
show_missing = true
skip_empty = true

[tool.poetry.dependencies]
python = "^3.8"  # This is the main Python version requirement

Expected behavior:

I expect it to parse the toml file the same way that it works on Ubuntu and MacOS.

Actual behavior:

The file is unable to be parsed due to a false failure for a character that doesn't seem to actually be there.

mahabaleshwars commented 2 weeks ago

Hello @nfelt14, Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.

FirelightFlagboy commented 6 days ago

This issue is fixed by #938 or additional change is required ?

priya-kinthali commented 6 days ago

Hello👋, Thank you for bringing this issue to our attention. We have merged PR with the necessary changes into the main branch. Could you please try using setup-python@main and let us know if the issue is resolved? We appreciate your patience and understanding.

FirelightFlagboy commented 6 days ago

Hello @priya-kinthali

I've updated our workflows to use the commit 29a37be0a3d3e8bf5bc1eb19cd0502922f5b312a in https://github.com/Scille/parsec-cloud/commit/644618d65ef70d74f3551cafbc4c44a71baced9b

At least where the update to 5.2.0 was failing in the PR https://github.com/Scille/parsec-cloud/pull/8285 the problems where resolve once using the latest commit in main