Skip to content

Tracking bug for python 2/3 mode issues #6444

@brandjon

Description

@brandjon

This bug is to index issues related to selecting Python 2 vs Python 3 mode for py_* targets. The goal is to have sane semantics for this mode selection implemented and documented by EoQ4.

See also Andreas's index of Python 3 issues at #1580. That index is broader-scoped; here I'm mainly concerned with inconsistencies and limitations in --force_python and its related attributes default_python_version and srcs_version.

Note that many of these issues are addressed by common work to redesign the Python mode state. This work is tracked by #6583.

We should also have per-target ability to control the python runtime, but that's part of a separate improvement to have a "py_toolchain" style rule. In the meantime you can use select() on the force_python flag within a py_runtime rule to get different runtimes for PY2 vs PY3 targets. See for instance here.

Metadata

Metadata

Assignees

Labels

P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-Rules-PythonNative rules for Pythontype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions