From bfcedcd8709925f5f0e9d785621361f2ae2b8770 Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Fri, 10 Jun 2022 12:25:58 +0200
Subject: [PATCH] MAINT: Require Python>=3.8

---
 DEPENDENCIES.md                     | 2 +-
 README_SETUP.md                     | 4 ++--
 setup.py                            | 2 +-
 src/caosdb/connection/connection.py | 2 ++
 tox.ini                             | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md
index d6f91cb9..117e764e 100644
--- a/DEPENDENCIES.md
+++ b/DEPENDENCIES.md
@@ -1,5 +1,5 @@
 * caosdb-server >= 0.7.2
-* Python >= 3.6
+* Python >= 3.8
 * pip >= 20.0.2
 
 Any other dependencies are defined in the setup.py and are being installed via pip
diff --git a/README_SETUP.md b/README_SETUP.md
index dc667da8..48928d6c 100644
--- a/README_SETUP.md
+++ b/README_SETUP.md
@@ -4,7 +4,7 @@
 
 ### Requirements ###
 
-PyCaosDB needs at least Python 3.6.  Additionally, the following packages are required (they will
+PyCaosDB needs at least Python 3.8.  Additionally, the following packages are required (they will
 typically be installed automatically):
 
 - `lxml`
@@ -19,7 +19,7 @@ Optional packages:
 
 #### Linux ####
 
-Make sure that Python (at least version 3.6) and pip is installed, using your system tools and
+Make sure that Python (at least version 3.8) and pip is installed, using your system tools and
 documentation.
 
 Then open a terminal and continue in the [Generic installation](#generic-installation) section.
diff --git a/setup.py b/setup.py
index a20e689d..70d87707 100755
--- a/setup.py
+++ b/setup.py
@@ -168,7 +168,7 @@ def setup_package():
             "Topic :: Scientific/Engineering :: Information Analysis",
         ],
         packages=find_packages('src'),
-        python_requires='>=3.6',
+        python_requires='>=3.8',
         package_dir={'': 'src'},
         install_requires=['lxml>=4.6.3',
                           'PyYAML>=6.0', 'future', 'PySocks>=1.6.7'],
diff --git a/src/caosdb/connection/connection.py b/src/caosdb/connection/connection.py
index 6c3946ee..8a2e9408 100644
--- a/src/caosdb/connection/connection.py
+++ b/src/caosdb/connection/connection.py
@@ -179,6 +179,8 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
             try:
                 ssl_version = ssl.PROTOCOL_TLS
             except AttributeError:
+                # TODO(tfitschen): This can be removed since we require Python
+                # >= 3.8 anyway, can't it?
                 # deprecated since Python 3.6, but necessary until there.
                 try:
                     ssl_version = ssl.PROTOCOL_TLSv1_2
diff --git a/tox.ini b/tox.ini
index 62658ae5..e3218918 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist=py36, py37, py38, py39, py310
+envlist=py38, py39, py310
 skip_missing_interpreters = true
 
 [testenv]
-- 
GitLab