Skip to content

Commit

Permalink
chore: extra code removals before 1.0 (#2421)
Browse files Browse the repository at this point in the history
Alternatives have existed for a long time and we just ensure that
we remove before the 1.0 release.

Summary:
- remove pip_install_dependencies
- remove DEFAULT_PYTHON_VERSION from interpreters.bzl

Work towards #1361
  • Loading branch information
aignas authored Nov 18, 2024
1 parent e7c306d commit 9766cb6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 42 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ Other changes:

{#v0-0-0-removed}
### Removed
* Nothing removed.
* (pypi): Remove `pypi_install_dependencies` macro that has been included in
{bzl:obj}`py_repositories` for a long time.
* (bzlmod): Remove `DEFAULT_PYTHON_VERSION` from `interpreters.bzl` file. If
you need the version, please use it from the `versions.bzl` file instead.

{#v0-40-0}
## [0.40.0] - 2024-11-17
Expand Down
4 changes: 2 additions & 2 deletions examples/bzlmod/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions python/pip_install/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ bzl_library(
deps = ["//python/private/pypi:pip_compile_bzl"],
)

bzl_library(
name = "repositories_bzl",
srcs = ["repositories.bzl"],
deps = [
"//python/private/pypi:deps_bzl",
],
)

filegroup(
name = "distribution",
srcs = glob(["**"]),
Expand Down
19 changes: 0 additions & 19 deletions python/pip_install/repositories.bzl

This file was deleted.

3 changes: 0 additions & 3 deletions python/private/pythons_hub.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ _interpreters_bzl_template = """
INTERPRETER_LABELS = {{
{interpreter_labels}
}}
DEFAULT_PYTHON_VERSION = "{default_python_version}"
"""

_line_for_hub_template = """\
Expand Down Expand Up @@ -125,8 +124,6 @@ def _hub_repo_impl(rctx):
rctx.file(
"interpreters.bzl",
_interpreters_bzl_template.format(
# TODO @aignas 2024-09-28: before 1.0 remove the value from here
default_python_version = rctx.attr.default_python_version,
interpreter_labels = interpreter_labels,
),
executable = False,
Expand Down
9 changes: 0 additions & 9 deletions tests/integration/pip_parse/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ load("@rules_python//python:repositories.bzl", "py_repositories", "python_regist

py_repositories()

# This call is included in `py_repositories` and we are calling
# `pip_install_dependencies` only to ensure that we are not breaking really old
# code.
#
# TODO @aignas 2024-06-23: remove this before 1.0.0
load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")

pip_install_dependencies()

python_register_toolchains(
name = "python39",
python_version = "3.9",
Expand Down

0 comments on commit 9766cb6

Please sign in to comment.