Skip to content

Update bazel io_bazel_rules_python to 0.1.0#25143

Closed
jtattermusch wants to merge 2 commits intogrpc:masterfrom
jtattermusch:python_update_bazel_rules
Closed

Update bazel io_bazel_rules_python to 0.1.0#25143
jtattermusch wants to merge 2 commits intogrpc:masterfrom
jtattermusch:python_update_bazel_rules

Conversation

@jtattermusch
Copy link
Copy Markdown
Contributor

Looks like this is required for a successful upgrade of third_party/protobuf: #25131 (comment)
More context: #24723 (comment)

Creating a separate PR with this change to ensure that this change is safe.
https://github.com/bazelbuild/rules_python/releases/tag/0.1.0

@jtattermusch jtattermusch added the release notes: no Indicates if PR should not be in release notes label Jan 13, 2021
@@ -36,8 +36,8 @@ def grpc_python_deps():
if "io_bazel_rules_python" not in native.existing_rules():
http_archive(
name = "io_bazel_rules_python",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gnossen what's really puzzling me is why are importing github.com/bazelbuild/rules_python twice - once as io_bazel_rules_python and another time as rules_python (a few lines below), but each time at a different commit.
This is something that really should be explained in a comment - I can add an explanatory comment once I understand why this hack is needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just an oversight. The second one doesn't even seem to be referenced anywhere:

rbellevi@rbell:~/Dev/grpc$ find . -type f -a -not -path './third_party*' -a -not -path '*venv*' -a -not -path '*virtual*' -a -not -path './git*' -exec grep -Hn rules_python {} \;
grep: ./tools/run_tests/python_utils/start_port_server.pyc: Permission denied
./summerofcode/2018/naresh.md:29:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/).
./summerofcode/2018/naresh.md:37:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/)).
./src/python/grpcio_tests/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./src/python/grpcio_tests/build/lib/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./bazel/grpc_python_deps.bzl:36:    if "io_bazel_rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:38:            name = "io_bazel_rules_python",
./bazel/grpc_python_deps.bzl:39:            url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
./bazel/grpc_python_deps.bzl:43:    if "rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:45:            name = "rules_python",
./bazel/grpc_python_deps.bzl:46:            url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
./bazel/grpc_python_deps.bzl:48:            strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
./WORKSPACE:101:load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")

Feel free to remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@gnossen gnossen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming tests pass.

@@ -36,8 +36,8 @@ def grpc_python_deps():
if "io_bazel_rules_python" not in native.existing_rules():
http_archive(
name = "io_bazel_rules_python",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just an oversight. The second one doesn't even seem to be referenced anywhere:

rbellevi@rbell:~/Dev/grpc$ find . -type f -a -not -path './third_party*' -a -not -path '*venv*' -a -not -path '*virtual*' -a -not -path './git*' -exec grep -Hn rules_python {} \;
grep: ./tools/run_tests/python_utils/start_port_server.pyc: Permission denied
./summerofcode/2018/naresh.md:29:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/).
./summerofcode/2018/naresh.md:37:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/)).
./src/python/grpcio_tests/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./src/python/grpcio_tests/build/lib/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./bazel/grpc_python_deps.bzl:36:    if "io_bazel_rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:38:            name = "io_bazel_rules_python",
./bazel/grpc_python_deps.bzl:39:            url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
./bazel/grpc_python_deps.bzl:43:    if "rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:45:            name = "rules_python",
./bazel/grpc_python_deps.bzl:46:            url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
./bazel/grpc_python_deps.bzl:48:            strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
./WORKSPACE:101:load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")

Feel free to remove it.

@jtattermusch
Copy link
Copy Markdown
Contributor Author

@stale
Copy link
Copy Markdown

stale bot commented Jun 2, 2021

This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition/never stale release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants