Skip to content

Move to Python 3 by default #6647

@brandjon

Description

@brandjon

Once #6583 is implemented, we'll want to look at switching the default Python version to PY3. The default version is the version used when no version selector attribute is explicitly set on a py_binary or via a top-level flag.

We can do this change by adding an incompatible flag, e.g. --incompatible_default_python_version_is_py3.

Another possibility is to also add an extra flag, --default_python_version, that could be either PY2 or PY3 (but with the incompatible flag on it would itself default to PY3). This would allow whole projects to customize the default value indefinitely. I'm not sure whether this is useful. In fact I think it could be harmful, because it means the semantics of Python targets in deep dependencies (including in external repos) could change based on the top-level flag.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions