Skip to content

Drop Python 2 support #886

@rickeylev

Description

@rickeylev

This is the general tracking issue for removing Python 2 support in rules_python.

For the bazel-side of things, see bazelbuild/bazel#15684

Right now, Python 2 support is defacto not present because...

  • pip_parse doesn't work with Python 2
  • Many systems don't provide Python 2 anymore
  • Many libraries no longer support Python 2
  • Us maintainers of these rules will ignore requests for it
  • The Starlark rewrite of the native.py_* rules won't support it
  • It has been 2+ years past the Python 2 EOL date.

However, several of our apis still accept e.g. python_version=PY2 or src_version=PY2|PY2ONLY, which technically do allow Python 2. We'll be disabling and breaking those.

If you want to continue to use rules_python with Python 2, then you will need to use an earlier release and/or fork.

TODO list

  • Fail for python_version and srcs_version values that are Python 2
  • For if py_runtime_pair.py2_runtime is set
  • Remove PYTHON2 make var (see current_py_toolchain)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions