Repository: cupy/cupy

Issue:
[RFC] Drop Python 3.6 support in v10
We are now discussing to drop support for Python 3.6 in CuPy v10. Feel free to leave a comment here if you have any concerns.

Background:
* CUDA Python is unlikely to provide a wheel for Python 3.6, although it can be built from the source without any issue. CUDA Python currently requires [`-std=c++14`](https://github.com/NVIDIA/cuda-python/blob/427c597959e6fe1409195a30d42fc4a1886bc89a/setup.py#L38) so recent versions of gcc, which is not in RHEL/CentOS 7 by default, is needed. We want to avoid requiring CuPy wheel users to manually install non-default GCC.
* NumPy dropped Python 3.6 support in June 2020: https://numpy.org/neps/nep-0029-deprecation_policy.html
* Python 3.6 support become EOL in December 2021.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -102,7 +102,6 @@
 License :: OSI Approved :: MIT License
 Programming Language :: Python
 Programming Language :: Python :: 3
-Programming Language :: Python :: 3.6
 Programming Language :: Python :: 3.7
 Programming Language :: Python :: 3.8
 Programming Language :: Python :: 3.9
@@ -134,7 +133,7 @@
     packages=find_packages(exclude=['install', 'tests']),
     package_data=package_data,
     zip_safe=False,
-    python_requires='>=3.6.0',
+    python_requires='>=3.7',
     setup_requires=setup_requires,
     install_requires=install_requires,
     tests_require=tests_require,


Test patch:
diff --git a/.pfnci/linux/tests/cuda114.Dockerfile b/.pfnci/linux/tests/cuda114.Dockerfile
--- a/.pfnci/linux/tests/cuda114.Dockerfile
+++ b/.pfnci/linux/tests/cuda114.Dockerfile
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:11.4.0-devel-ubuntu18.04
+FROM nvidia/cuda:11.4.0-devel-ubuntu20.04
 
 RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get -qqy update && \
@@ -7,7 +7,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
 
 ENV PATH="/usr/lib/ccache:${PATH}"
 
-# Python 3.6 (Ubuntu 18.04)
+# Python 3.8 (Ubuntu 20.04)
 RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get -qqy install python3 python3-dev python3-pip python3-setuptools && \
     python3 -m pip install -U pip setuptools && \
diff --git a/.pfnci/linux/tests/cuda11x-cuda-python.Dockerfile b/.pfnci/linux/tests/cuda11x-cuda-python.Dockerfile
--- a/.pfnci/linux/tests/cuda11x-cuda-python.Dockerfile
+++ b/.pfnci/linux/tests/cuda11x-cuda-python.Dockerfile
@@ -1,13 +1,13 @@
-FROM nvidia/cuda:11.4.0-devel-ubuntu18.04
+FROM nvidia/cuda:11.4.0-devel-ubuntu20.04
 
 RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get -qqy update && \
-    apt-get -qqy install libnccl-dev=2.10.*+cuda11.4 libcudnn8-dev=8.2.*+cuda11.4 libcutensor-dev=1.3.* libcusparselt-dev=0.1.* && \
+    apt-get -qqy --allow-change-held-packages --allow-downgrades install libnccl2=2.10.*+cuda11.4 libnccl-dev=2.10.*+cuda11.4 libcudnn8-dev=8.2.*+cuda11.4 libcutensor-dev=1.3.* libcusparselt-dev=0.1.* && \
     apt-get -qqy install ccache
 
 ENV PATH="/usr/lib/ccache:${PATH}"
 
-# Python 3.6 (Ubuntu 18.04)
+# Python 3.8 (Ubuntu 20.04)
 RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get -qqy install python3 python3-dev python3-pip python3-setuptools && \
     python3 -m pip install -U pip setuptools && \