Skip to content

Remove Python 2 support from Python rules #15684

@rickeylev

Description

@rickeylev

Description of the feature request:

With Python 2 having been deprecated 2+ years ago, I think it's time to drop support for it in the Python rules.

The main motivator here is to make re-implementing the rules in Starlark easier: there's a lot of tests and special code that just deals with Python 2: srcs_version compatibility checking, propagation of that, an aspect to identify mismatches, the python_version transition, etc. Re-implementing all that just doesn't make sense for a dead platform.

So, I'm filing this issue as a canonical tracking issue to figure out how to go about dropping this support in Bazel.

Analogous rules_python issue: bazel-contrib/rules_python#886

It's been decided that Python 2 support will be dropped as part of Bazel 7. This is also to simplify Starlarkifying the Python rules.

Flag flip tracking issue: #17293

Various refs:

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)team-Rules-PythonNative rules for Pythontype: feature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions