Skip to content

Decide on more appropriate name than "python_aliases" #1273

@rickeylev

Description

@rickeylev

As part of moving toolchain registration in #1238, we exposed the versioned-defs under the name @python_aliases.

I think this name is very uninformative and don't think it's fit for a public API. The functionality it exposes are rules/macros that use a specific Python version to be used. These aren't really aliases.

So, we need to pick a new name. 🚲 🏠

  • @python_versioned
  • @python_multi
  • @python_ver

Another idea would be to re-export them under rules_python somewhere. e.g.

load("@rules_python/python/3.11:defs.bzl", "py_binary")

And within rules_python/python/3.11/defs.bzl, we load the underlying @python_whatever// to just re-export them. (I think this is possible? I'll have to look into if you can generate files in the repo itself).

For context, the basic usage is:

load("@NAME//3.10:defs.bzl", py_binary_3_10 = "py_binary")
load("@NAME//3.9:defs.bzl", py_binary_3_9 = "py_binary")

py_binary_3_10(...)
py_binary_3_9(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions