Skip to content

Bandit crashes on Python 2 deprecation  #1

@Ochaun

Description

@Ochaun

Probably need to just deprecate support for 2.x for bandit installs. Ansible crashes on provision.

ochau@Win ~/github/static-analysis-ttp (master)
$ vagrant provision --provision-with bandit
==> linux: Running provisioner: bandit (ansible_local)...
    linux: Installing Ansible...
    linux: Running ansible-playbook...

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [linux]

TASK [python2 and 3 deps] ******************************************************
ok: [linux]

TASK [installing bandit for py2] ***********************************************
fatal: [linux]: FAILED! => {"changed": false, "cmd": ["/opt/bandit/python2_venv/bin/pip", "install", "bandit"], "msg": "stdout: Collecting bandit\n  Using cached bandit-1.7.0.tar.gz (506 kB)\n\n:stderr: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.\nERROR: Package 'bandit' requires a different Python: 2.7.17 not in '>=3.5'\n"}

PLAY RECAP *********************************************************************
linux                      : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtemporary-fixsomething that has been temporarily fix, but still needs a better solution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions