Skip to content

SyntaxError while setting up Python dependencies #375

@The-Compiler

Description

@The-Compiler

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions