Skip to content

Commit

Permalink
python: Flip --incompatible_python_disable_py2 to true
Browse files Browse the repository at this point in the history
This changes the default to rejecting Python 2 values. For more
information, see #17293

Fixes #17293

RELNOTES[INC]: --incompatible_python_disable_py2 is flipped to true. See #17293 for details.

PiperOrigin-RevId: 507897246
Change-Id: I67cbadbb0f543d8153ad0355af22e48ead9083ef
  • Loading branch information
rickeylev authored and copybara-github committed Feb 7, 2023
1 parent 0838537 commit 95a57ef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public String getTypeDescription() {

@Option(
name = "incompatible_python_disable_py2",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.INPUT_STRICTNESS,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
Expand Down

3 comments on commit 95a57ef

@SalmaSamy
Copy link
Contributor

Choose a reason for hiding this comment

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

Hello @rickeylev,
It looks like this change caused BuildFarm to fail in the downstream, can you please check it?

@rickeylev
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's unlike that error is caused by this commit. The reported error is:

buildfarm/persistentworkers/src/test/java/persistent/testutil/BUILD:1:13: error loading package '@bazel_tools//src/main/protobuf': cannot load '@rules_python//python:proto.bzl': no such file and referenced by '//persistentworkers/src/test/java/persistent/testutil:testutil'

This commit would cause a failure that would say something to the effect of "python 2 is not allowed".

A possible cause might be buildfarm using an older version of rules_python; if so, the fix would be to upgrade the version of rules_python it is using.

I think there was some recent work to make some bazel integration tests use rules_python for the py rules; perhaps those are the cause.

@rickeylev
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 think this is the one that introduces the rules_python load there: #17545

Please sign in to comment.