Skip to content

Commit 93c3382

Browse files
alanchiaotensorflower-gardener
authored andcommitted
Declare dropped Python 2 support in BUILD files.
PiperOrigin-RevId: 324640050
1 parent fe119fc commit 93c3382

File tree

26 files changed

+79
-81
lines changed

26 files changed

+79
-81
lines changed

tensorflow_model_optimization/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exports_files(["LICENSE"])
1515
py_library(
1616
name = "tensorflow_model_optimization",
1717
srcs = ["__init__.py"],
18-
srcs_version = "PY2AND3",
18+
srcs_version = "PY3",
1919
deps = [
2020
"//tensorflow_model_optimization/python",
2121
"//tensorflow_model_optimization/python/core/api",

tensorflow_model_optimization/python/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports_files(["LICENSE"])
77
py_library(
88
name = "python",
99
srcs = ["__init__.py"],
10-
srcs_version = "PY2AND3",
10+
srcs_version = "PY3",
1111
deps = [
1212
"//tensorflow_model_optimization/python/core",
1313
],

tensorflow_model_optimization/python/core/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports_files(["LICENSE"])
77
py_library(
88
name = "core",
99
srcs = ["__init__.py"],
10-
srcs_version = "PY2AND3",
10+
srcs_version = "PY3",
1111
deps = [
1212
":version",
1313
"//tensorflow_model_optimization/python/core/clustering",
@@ -21,5 +21,5 @@ py_library(
2121
py_library(
2222
name = "version",
2323
srcs = ["version.py"],
24-
srcs_version = "PY2AND3",
24+
srcs_version = "PY3",
2525
)

tensorflow_model_optimization/python/core/api/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ py_library(
1616
"sparsity/__init__.py",
1717
"sparsity/keras/__init__.py",
1818
],
19-
srcs_version = "PY2AND3",
19+
srcs_version = "PY3",
2020
deps = [
2121
"//tensorflow_model_optimization/python/core/clustering/keras",
2222
"//tensorflow_model_optimization/python/core/quantization/keras",

tensorflow_model_optimization/python/core/clustering/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ licenses(["notice"]) # Apache 2.0
55
py_library(
66
name = "clustering",
77
srcs = ["__init__.py"],
8-
srcs_version = "PY2AND3",
8+
srcs_version = "PY3",
99
deps = ["//tensorflow_model_optimization/python/core/clustering/keras"],
1010
)

tensorflow_model_optimization/python/core/clustering/keras/BUILD

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ py_library(
1111
srcs = [
1212
"__init__.py",
1313
],
14-
srcs_version = "PY2AND3",
14+
srcs_version = "PY3",
1515
deps = [
1616
":cluster",
1717
],
@@ -20,7 +20,7 @@ py_library(
2020
py_library(
2121
name = "cluster",
2222
srcs = ["cluster.py"],
23-
srcs_version = "PY2AND3",
23+
srcs_version = "PY3",
2424
visibility = ["//visibility:public"],
2525
deps = [
2626
":cluster_config",
@@ -33,14 +33,14 @@ py_library(
3333
py_library(
3434
name = "cluster_config",
3535
srcs = ["cluster_config.py"],
36-
srcs_version = "PY2AND3",
36+
srcs_version = "PY3",
3737
visibility = ["//visibility:public"],
3838
)
3939

4040
py_library(
4141
name = "clustering_registry",
4242
srcs = ["clustering_registry.py"],
43-
srcs_version = "PY2AND3",
43+
srcs_version = "PY3",
4444
visibility = ["//visibility:public"],
4545
deps = [
4646
":clusterable_layer",
@@ -50,14 +50,14 @@ py_library(
5050
py_library(
5151
name = "clusterable_layer",
5252
srcs = ["clusterable_layer.py"],
53-
srcs_version = "PY2AND3",
53+
srcs_version = "PY3",
5454
visibility = ["//visibility:public"],
5555
)
5656

5757
py_library(
5858
name = "clustering_centroids",
5959
srcs = ["clustering_centroids.py"],
60-
srcs_version = "PY2AND3",
60+
srcs_version = "PY3",
6161
visibility = ["//visibility:public"],
6262
deps = [
6363
":cluster_config",
@@ -67,7 +67,7 @@ py_library(
6767
py_library(
6868
name = "cluster_wrapper",
6969
srcs = ["cluster_wrapper.py"],
70-
srcs_version = "PY2AND3",
70+
srcs_version = "PY3",
7171
visibility = ["//visibility:public"],
7272
deps = [
7373
":cluster_config",

tensorflow_model_optimization/python/core/internal/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ licenses(["notice"]) # Apache 2.0
55
py_library(
66
name = "internal",
77
srcs = ["__init__.py"],
8-
srcs_version = "PY2AND3",
8+
srcs_version = "PY3",
99
deps = [
1010
"//tensorflow_model_optimization/python/core/internal/tensor_encoding",
1111
],

tensorflow_model_optimization/python/core/internal/tensor_encoding/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ licenses(["notice"]) # Apache 2.0
55
py_library(
66
name = "tensor_encoding",
77
srcs = ["__init__.py"],
8-
srcs_version = "PY2AND3",
8+
srcs_version = "PY3",
99
deps = [
1010
"//tensorflow_model_optimization/python/core/internal/tensor_encoding/core",
1111
"//tensorflow_model_optimization/python/core/internal/tensor_encoding/encoders",

tensorflow_model_optimization/python/core/internal/tensor_encoding/core/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ py_test(
3131
name = "core_encoder_test",
3232
size = "small",
3333
srcs = ["core_encoder_test.py"],
34+
python_version = "PY3",
3435
deps = [
3536
":core_encoder",
3637
":encoding_stage",
@@ -54,6 +55,7 @@ py_test(
5455
name = "encoding_stage_test",
5556
size = "small",
5657
srcs = ["encoding_stage_test.py"],
58+
python_version = "PY3",
5759
deps = [
5860
":encoding_stage",
5961
# absl/testing:parameterized dep1,
@@ -78,6 +80,7 @@ py_test(
7880
name = "gather_encoder_test",
7981
size = "small",
8082
srcs = ["gather_encoder_test.py"],
83+
python_version = "PY3",
8184
deps = [
8285
":core_encoder",
8386
":encoding_stage",
@@ -104,6 +107,7 @@ py_test(
104107
name = "simple_encoder_test",
105108
size = "small",
106109
srcs = ["simple_encoder_test.py"],
110+
python_version = "PY3",
107111
deps = [
108112
":core_encoder",
109113
":simple_encoder",

tensorflow_model_optimization/python/core/internal/tensor_encoding/encoders/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ py_test(
2929
name = "common_encoders_test",
3030
size = "small",
3131
srcs = ["common_encoders_test.py"],
32+
python_version = "PY3",
3233
deps = [
3334
":common_encoders",
3435
# absl/testing:parameterized dep1,

0 commit comments

Comments
 (0)