Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Python 2 configuration and targets #1006

Merged
merged 6 commits into from
Jan 27, 2023
Merged

Conversation

rickeylev
Copy link
Contributor

@rickeylev rickeylev commented Jan 27, 2023

Bazel is dropping support for Python 2

Also raises the minimum Bazel version in the examples to 5.0, as 4.0 has built-in dependencies on Python 2.

Fixes #1005

Work towards bazelbuild/bazel#17293

Bazel is dropping support for Python 2

Work towards bazelbuild/bazel#17293
@rickeylev
Copy link
Contributor Author

rickeylev commented Jan 27, 2023

re: CI failure: The failing case is the "minimum supported version test" because @bazel_tools//tools/android:strip_resources wants to use Python 2.

That was fixed back in 2019: bazelbuild/bazel@d93a146

As far as I can tell, that code is in the 4.0 release (which is what the CI is using, I think). So I'm not sure what's going on.

Copy link
Member

@jsharpe jsharpe left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes but can you just disable the failing tests rather than bump the minimum supported version?

@@ -201,18 +201,13 @@ tasks:
- "--experimental_enable_aggregating_middleman=False"
min_supported_version_examples:
name: "Minimum Supported Version Examples"
bazel: "4.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

Technically bazel 4 is still under LTS support until the end of this year and so I'd rather that we just disable the failing tests and keep this at 4 as the rest of these changes only affect the examples / tests and don't change the ability of this ruleset to continue support v4.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I restored 4.0 as the min version.

I'll try my hand at modifying the config.yaml to skip the offending tests, but I might come back asking for some help on how to do so. (If you happen to have a link that explains these bazelci config files, that'd be great; the only thing i've found is https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/README.md which doesn't explain many of the things i see or how to use them).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I think I figured it out.

Ready for another look

Copy link
Member

@jsharpe jsharpe left a comment

Choose a reason for hiding this comment

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

LGTM

@jsharpe jsharpe merged commit 34fa6a7 into bazel-contrib:main Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag --incompatible_python_disable_py2 will break rules_foreign_cc in Bazel 7.0
2 participants