Remove references to six (#9096)
We no longer support Python 2 and therefore no longer need to depend on
six. I'm hoping this will make it possible to merge #8214.
diff --git a/BUILD b/BUILD
index a9ed429..39ea104 100644
--- a/BUILD
+++ b/BUILD
@@ -954,7 +954,6 @@
protoc = ":protoc",
py_libs = [
":python_srcs",
- "@six//:six",
],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
diff --git a/Makefile.am b/Makefile.am
index 6fb1c84..f37ae9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1426,7 +1426,6 @@
examples/pubspec.yaml \
protobuf.bzl \
protobuf_deps.bzl \
- third_party/six.BUILD \
third_party/zlib.BUILD \
util/python/BUILD \
internal.bzl
diff --git a/kokoro/linux/aarch64/python_run_tests_with_qemu_aarch64.sh b/kokoro/linux/aarch64/python_run_tests_with_qemu_aarch64.sh
index 527fc48..5026d04 100755
--- a/kokoro/linux/aarch64/python_run_tests_with_qemu_aarch64.sh
+++ b/kokoro/linux/aarch64/python_run_tests_with_qemu_aarch64.sh
@@ -7,7 +7,7 @@
cd python
PYTHON="/opt/python/cp38-cp38/bin/python"
-${PYTHON} -m pip install --user six pytest auditwheel
+${PYTHON} -m pip install --user pytest auditwheel
# check that we are really using aarch64 python
(${PYTHON} -c 'import sysconfig; print(sysconfig.get_platform())' | grep -q "linux-aarch64") || (echo "Wrong python platform, needs to be aarch64 python."; exit 1)
diff --git a/kokoro/release/python/windows/build_artifacts.bat b/kokoro/release/python/windows/build_artifacts.bat
index 5c5df7c..340bda8 100644
--- a/kokoro/release/python/windows/build_artifacts.bat
+++ b/kokoro/release/python/windows/build_artifacts.bat
@@ -9,7 +9,6 @@
set REPO_DIR=protobuf
set BUILD_DLL=OFF
set UNICODE=ON
-set PB_TEST_DEP="six==1.9"
set OTHER_TEST_DEP="setuptools==38.5.1"
set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl
index ec9d8e9..422ee06 100644
--- a/protobuf_deps.bzl
+++ b/protobuf_deps.bzl
@@ -24,14 +24,6 @@
urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
)
- if not native.existing_rule("six"):
- http_archive(
- name = "six",
- build_file = "@com_google_protobuf//:third_party/six.BUILD",
- sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
- urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"],
- )
-
if not native.existing_rule("rules_cc"):
http_archive(
name = "rules_cc",
diff --git a/third_party/BUILD b/third_party/BUILD
index b66101a..a8b35ef 100644
--- a/third_party/BUILD
+++ b/third_party/BUILD
@@ -1 +1 @@
-exports_files(["six.BUILD", "zlib.BUILD"])
+exports_files(["zlib.BUILD"])
diff --git a/third_party/six.BUILD b/third_party/six.BUILD
deleted file mode 100644
index 041c72c..0000000
--- a/third_party/six.BUILD
+++ /dev/null
@@ -1,19 +0,0 @@
-load("@rules_python//python:defs.bzl", "py_library")
-
-# Consume `six.py` as `__init__.py` for compatibility
-# with `--incompatible_default_to_explicit_init_py`.
-# https://github.com/protocolbuffers/protobuf/pull/6795#issuecomment-546060749
-# https://github.com/bazelbuild/bazel/issues/10076
-genrule(
- name = "copy_six",
- srcs = ["six-1.12.0/six.py"],
- outs = ["__init__.py"],
- cmd = "cp $< $(@)",
-)
-
-py_library(
- name = "six",
- srcs = ["__init__.py"],
- srcs_version = "PY2AND3",
- visibility = ["//visibility:public"],
-)