Dropped support for Python < 3.7 (#9480)

* Drop Python versions <3.7.

* Updated README to clarify that Python 3.7 is the minimum.

* Removed more Python 3.5-specific code.

Also changed tests to skip missing interpreters.

* Invoke tox directly instead of through Python.

Hopefully this will pick up python3.

* Updated java_stretch image to bullseye to get Python >= 3.7.

* Use jdk11 instead of jdk8.

* Installed python2 for gtest.

* Use "python3 -m venv" instead of "virtualenv."

* Install python3-venv.
diff --git a/tests.sh b/tests.sh
index 13bf034..8ea5ae6 100755
--- a/tests.sh
+++ b/tests.sh
@@ -116,12 +116,12 @@
 
   # Try to install Java
   pushd java
-  use_java jdk8
+  use_java jdk11
   $MVN install
   popd
 
   # Try to install Python
-  virtualenv --no-site-packages venv
+  python3 -m venv venv
   source venv/bin/activate
   pushd python
   python3 setup.py clean build sdist
@@ -189,6 +189,10 @@
 use_java() {
   version=$1
   case "$version" in
+    jdk11)
+      export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
+      export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+      ;;
     jdk8)
       export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH
       export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
@@ -268,7 +272,7 @@
   # Linkage Monitor checks compatibility with other Google libraries
   # https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor
 
-  use_java jdk8
+  use_java jdk11
   internal_build_cpp
 
   # Linkage Monitor uses $HOME/.m2 local repository
@@ -330,12 +334,7 @@
 build_python() {
   internal_build_cpp
   cd python
-  if [ $(uname -s) == "Linux" ]; then
-    envlist=py\{35,36\}-python
-  else
-    envlist=py\{36\}-python
-  fi
-  python -m tox -e $envlist
+  tox --skip-missing-interpreters
   cd ..
 }
 
@@ -343,26 +342,10 @@
   internal_build_cpp
   cd python
   envlist=$1
-  python -m tox -e $envlist
+  tox -e $envlist
   cd ..
 }
 
-build_python33() {
-  build_python_version py33-python
-}
-
-build_python34() {
-  build_python_version py34-python
-}
-
-build_python35() {
-  build_python_version py35-python
-}
-
-build_python36() {
-  build_python_version py36-python
-}
-
 build_python37() {
   build_python_version py37-python
 }
@@ -384,12 +367,7 @@
   export LD_LIBRARY_PATH=../src/.libs # for Linux
   export DYLD_LIBRARY_PATH=../src/.libs # for OS X
   cd python
-  if [ $(uname -s) == "Linux" ]; then
-    envlist=py\{35,36\}-cpp
-  else
-    envlist=py\{36\}-cpp
-  fi
-  tox -e $envlist
+  tox --skip-missing-interpreters
   cd ..
 }
 
@@ -403,22 +381,6 @@
   cd ..
 }
 
-build_python33_cpp() {
-  build_python_cpp_version py33-cpp
-}
-
-build_python34_cpp() {
-  build_python_cpp_version py34-cpp
-}
-
-build_python35_cpp() {
-  build_python_cpp_version py35-cpp
-}
-
-build_python36_cpp() {
-  build_python_cpp_version py36-cpp
-}
-
 build_python37_cpp() {
   build_python_cpp_version py37-cpp
 }