Switch all sources to PY3 only.

PiperOrigin-RevId: 338459870
Change-Id: I27338c3b4d12fa6e23bf6fd550f65363109e96e4
This commit is contained in:
Dan Moldovan 2020-10-22 06:27:18 -07:00 committed by TensorFlower Gardener
parent 10b5284c9d
commit 3b7416dc43
10 changed files with 55 additions and 60 deletions

View File

@ -35,7 +35,7 @@ py_library(
"slices.py", "slices.py",
"variables.py", "variables.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
"//tensorflow/python:util", "//tensorflow/python:util",
@ -52,7 +52,7 @@ py_test(
name = "asserts_test", name = "asserts_test",
srcs = ["asserts_test.py"], srcs = ["asserts_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -64,7 +64,7 @@ py_test(
name = "break_statements_test", name = "break_statements_test",
srcs = ["break_statements_test.py"], srcs = ["break_statements_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -88,7 +88,7 @@ py_test(
name = "conditional_expressions_test", name = "conditional_expressions_test",
srcs = ["conditional_expressions_test.py"], srcs = ["conditional_expressions_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -100,7 +100,7 @@ py_test(
name = "continue_statements_test", name = "continue_statements_test",
srcs = ["continue_statements_test.py"], srcs = ["continue_statements_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -126,7 +126,7 @@ py_test(
name = "directives_test", name = "directives_test",
srcs = ["directives_test.py"], srcs = ["directives_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -151,7 +151,7 @@ py_test(
name = "list_comprehensions_test", name = "list_comprehensions_test",
srcs = ["list_comprehensions_test.py"], srcs = ["list_comprehensions_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -163,7 +163,7 @@ py_test(
name = "lists_test", name = "lists_test",
srcs = ["lists_test.py"], srcs = ["lists_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -175,7 +175,7 @@ py_test(
name = "logical_expressions_test", name = "logical_expressions_test",
srcs = ["logical_expressions_test.py"], srcs = ["logical_expressions_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = ["notsan"], # b/163218460 tags = ["notsan"], # b/163218460
deps = [ deps = [
":converters", ":converters",
@ -188,7 +188,7 @@ py_test(
name = "return_statements_test", name = "return_statements_test",
srcs = ["return_statements_test.py"], srcs = ["return_statements_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -201,7 +201,7 @@ py_test(
name = "slices_test", name = "slices_test",
srcs = ["slices_test.py"], srcs = ["slices_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -214,7 +214,7 @@ py_test(
name = "variables_test", name = "variables_test",
srcs = ["variables_test.py"], srcs = ["variables_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":converters", ":converters",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -26,7 +26,7 @@ py_library(
"function_wrappers.py", "function_wrappers.py",
"unsupported_features_checker.py", "unsupported_features_checker.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
"//tensorflow/python:framework_ops", "//tensorflow/python:framework_ops",
@ -43,7 +43,7 @@ py_library(
srcs = [ srcs = [
"converter_testing.py", "converter_testing.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
":core", ":core",
@ -61,7 +61,7 @@ py_test(
name = "converter_test", name = "converter_test",
srcs = ["converter_test.py"], srcs = ["converter_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":core", ":core",
":test_lib", ":test_lib",
@ -73,7 +73,7 @@ py_test(
name = "function_wrappers_test", name = "function_wrappers_test",
srcs = ["function_wrappers_test.py"], srcs = ["function_wrappers_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":core", ":core",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -22,7 +22,7 @@ py_library(
"api.py", "api.py",
"conversion.py", "conversion.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
"//tensorflow/python:platform", "//tensorflow/python:platform",

View File

@ -22,7 +22,7 @@ py_library(
"directives.py", "directives.py",
"special_functions.py", "special_functions.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
"//tensorflow/python/autograph/operators", "//tensorflow/python/autograph/operators",
@ -33,7 +33,7 @@ py_test(
name = "special_functions_test", name = "special_functions_test",
srcs = ["special_functions_test.py"], srcs = ["special_functions_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":lang", ":lang",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -22,7 +22,6 @@ py_library(
"__init__.py", "__init__.py",
"conditional_expressions.py", "conditional_expressions.py",
"control_flow.py", "control_flow.py",
"control_flow_deprecated_py2.py",
"data_structures.py", "data_structures.py",
"exceptions.py", "exceptions.py",
"logical.py", "logical.py",
@ -30,7 +29,7 @@ py_library(
"slices.py", "slices.py",
"variables.py", "variables.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
"//tensorflow/python:array_ops", "//tensorflow/python:array_ops",
@ -54,7 +53,7 @@ py_test(
name = "data_structures_test", name = "data_structures_test",
srcs = ["data_structures_test.py"], srcs = ["data_structures_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":operators", ":operators",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -66,9 +65,6 @@ py_test(
srcs = ["conditional_expressions_test.py"], srcs = ["conditional_expressions_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY3", srcs_version = "PY3",
tags = [
"no_oss_py2",
],
deps = [ deps = [
":operators", ":operators",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -82,7 +78,6 @@ py_test(
srcs_version = "PY3", srcs_version = "PY3",
tags = [ tags = [
"no_gpu", # b/127001953 "no_gpu", # b/127001953
"no_oss_py2",
], ],
deps = [ deps = [
":operators", ":operators",
@ -96,7 +91,7 @@ py_test(
name = "exceptions_test", name = "exceptions_test",
srcs = ["exceptions_test.py"], srcs = ["exceptions_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":operators", ":operators",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -107,7 +102,7 @@ py_test(
name = "logical_test", name = "logical_test",
srcs = ["logical_test.py"], srcs = ["logical_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":operators", ":operators",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -134,7 +129,7 @@ py_test(
name = "slices_test", name = "slices_test",
srcs = ["slices_test.py"], srcs = ["slices_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":operators", ":operators",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -145,7 +140,7 @@ py_test(
name = "variables_test", name = "variables_test",
srcs = ["variables_test.py"], srcs = ["variables_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":operators", ":operators",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -38,7 +38,7 @@ py_library(
"transformer.py", "transformer.py",
"transpiler.py", "transpiler.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//tensorflow/python/autograph/pyct/common_transformers", "//tensorflow/python/autograph/pyct/common_transformers",
@ -53,7 +53,7 @@ py_test(
name = "anno_test", name = "anno_test",
srcs = ["anno_test.py"], srcs = ["anno_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -64,7 +64,7 @@ py_test(
name = "ast_util_test", name = "ast_util_test",
srcs = ["ast_util_test.py"], srcs = ["ast_util_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = [ tags = [
"no_oss_py2", "no_oss_py2",
], ],
@ -79,7 +79,7 @@ py_test(
name = "cache_test", name = "cache_test",
srcs = ["cache_test.py"], srcs = ["cache_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = [ tags = [
"no_oss_py2", "no_oss_py2",
], ],
@ -94,7 +94,7 @@ py_test(
name = "cfg_test", name = "cfg_test",
srcs = ["cfg_test.py"], srcs = ["cfg_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = [ tags = [
"no_oss_py2", "no_oss_py2",
], ],
@ -109,7 +109,7 @@ py_test(
name = "loader_test", name = "loader_test",
srcs = ["loader_test.py"], srcs = ["loader_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -121,7 +121,7 @@ py_test(
name = "error_utils_test", name = "error_utils_test",
srcs = ["error_utils_test.py"], srcs = ["error_utils_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -133,7 +133,7 @@ py_test(
name = "inspect_utils_test", name = "inspect_utils_test",
srcs = ["inspect_utils_test.py"], srcs = ["inspect_utils_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -152,7 +152,7 @@ py_test(
name = "naming_test", name = "naming_test",
srcs = ["naming_test.py"], srcs = ["naming_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -163,7 +163,7 @@ py_test(
name = "origin_info_test", name = "origin_info_test",
srcs = ["origin_info_test.py"], srcs = ["origin_info_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -175,7 +175,7 @@ py_test(
name = "parser_test", name = "parser_test",
srcs = ["parser_test.py"], srcs = ["parser_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -186,7 +186,7 @@ py_test(
name = "pretty_printer_test", name = "pretty_printer_test",
srcs = ["pretty_printer_test.py"], srcs = ["pretty_printer_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -197,7 +197,7 @@ py_test(
name = "qual_names_test", name = "qual_names_test",
srcs = ["qual_names_test.py"], srcs = ["qual_names_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -208,7 +208,7 @@ py_test(
name = "templates_test", name = "templates_test",
srcs = ["templates_test.py"], srcs = ["templates_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -221,7 +221,7 @@ py_test(
name = "transformer_test", name = "transformer_test",
srcs = ["transformer_test.py"], srcs = ["transformer_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -233,7 +233,7 @@ py_test(
name = "transpiler_test", name = "transpiler_test",
srcs = ["transpiler_test.py"], srcs = ["transpiler_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":pyct", ":pyct",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -21,7 +21,7 @@ py_library(
srcs = [ srcs = [
"anf.py", "anf.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"@gast_archive//:gast", "@gast_archive//:gast",
@ -33,7 +33,7 @@ py_test(
name = "anf_test", name = "anf_test",
srcs = ["anf_test.py"], srcs = ["anf_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = ["no_oss"], tags = ["no_oss"],
deps = [ deps = [
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -26,7 +26,7 @@ py_library(
"reaching_fndefs.py", "reaching_fndefs.py",
"type_inference.py", "type_inference.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//tensorflow/python:util", "//tensorflow/python:util",
@ -40,7 +40,7 @@ py_test(
name = "activity_test", name = "activity_test",
srcs = ["activity_test.py"], srcs = ["activity_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":static_analysis", ":static_analysis",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -53,7 +53,7 @@ py_library(
name = "activity_test_lib", name = "activity_test_lib",
testonly = True, testonly = True,
srcs = ["activity_test.py"], srcs = ["activity_test.py"],
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":static_analysis", ":static_analysis",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",

View File

@ -22,7 +22,7 @@ py_library(
"basic_definitions.py", "basic_definitions.py",
"decorators.py", "decorators.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -31,7 +31,7 @@ py_library(
srcs = [ srcs = [
"codegen.py", "codegen.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//tensorflow/python/autograph/pyct", "//tensorflow/python/autograph/pyct",
@ -45,7 +45,7 @@ py_test(
size = "large", size = "large",
srcs = ["codegen_test.py"], srcs = ["codegen_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = [ tags = [
"manual", "manual",
"no_windows", "no_windows",

View File

@ -29,7 +29,7 @@ py_library(
"tensors.py", "tensors.py",
"testing.py", "testing.py",
], ],
srcs_version = "PY2AND3", srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"], visibility = ["//tensorflow:__subpackages__"],
deps = [ deps = [
"//tensorflow/python:dtypes", "//tensorflow/python:dtypes",
@ -47,7 +47,7 @@ py_test(
name = "context_managers_test", name = "context_managers_test",
srcs = ["context_managers_test.py"], srcs = ["context_managers_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":utils", ":utils",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -58,7 +58,7 @@ py_test(
name = "misc_test", name = "misc_test",
srcs = ["misc_test.py"], srcs = ["misc_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":utils", ":utils",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -69,7 +69,7 @@ py_test(
name = "py_func_test", name = "py_func_test",
srcs = ["py_func_test.py"], srcs = ["py_func_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
tags = ["no_windows"], tags = ["no_windows"],
deps = [ deps = [
":utils", ":utils",
@ -81,7 +81,7 @@ py_test(
name = "tensor_list_test", name = "tensor_list_test",
srcs = ["tensor_list_test.py"], srcs = ["tensor_list_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":utils", ":utils",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",
@ -93,7 +93,7 @@ py_test(
name = "tensors_test", name = "tensors_test",
srcs = ["tensors_test.py"], srcs = ["tensors_test.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":utils", ":utils",
"//tensorflow/python:client_testlib", "//tensorflow/python:client_testlib",