SyntaxError while setting up Python dependencies

未关闭
#375 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
github-actions, python
领域
ci-cd

调研方向

从 python-setup/install_tools.sh 开始,重点检查 issue 中提到的可选 Python 2 处理,并将其与失败的 GitHub Actions 设置日志进行比较。当依赖项设置不再尝试执行不兼容的 Python 2 pip 安装,并且 workflow 在没有此 SyntaxError 的情况下完成时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Since a couple of days (?), I'm seeing this in my runs:

Setup Python dependencies
  /home/runner/work/_actions/github/codeql-action/v1/python-setup/install_tools.sh
[...]
  + 
  + curl --location --fail https://bootstrap.pypa.io/get-pip.py
  + command -v python2
  /usr/bin/python2
  + python2
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100 1883k  100 1883k    0     0  3327k      0 --:--:-- --:--:-- --:--:-- 3327k
  Traceback (most recent call last):
    File "<stdin>", line 24226, in <module>
    File "<stdin>", line 199, in main
    File "<stdin>", line 82, in bootstrap
    File "/tmp/tmpSl4FBD/pip.zip/pip/_internal/cli/main.py", line 60
      sys.stderr.write(f"ERROR: {exc}")
                                     ^
  SyntaxError: invalid syntax
Warning: Unable to download and extract the tools needed for installing the python dependencies. You can call this action with 'setup-python-dependencies: false' to disable this process.

This is probably due to pip dropping support for Python 2 recently.

Given that Python 2 support seems to be optional, maybe it'd be a good time to drop it, given that Python 2 has been declared end-of-life over a year ago?

主要语言
TypeScript
星标
1.6k
派生
493
平均合并
1 天 13 小时
30 天内合并 PR
44

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/codeql-action 的其他 Issue

查看 github/codeql-action 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。