Repository: EUDAT-B2HANDLE/PYHANDLE (language: python)

Issue:
Python 3.9 support



Discussion / hints:

Fix patch:
diff --git a/Jenkinsfile b/Jenkinsfile
index 88bece9..090a8ef 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -80,6 +80,23 @@ pipeline {
                         cobertura coberturaReportFile: '**/coverage.xml'
                     }
                 }
+                 stage ('Test python 3.9') {
+                    agent {
+                        dockerfile {
+                            filename "pyhandle/tests/Dockerfile-py3.9"
+                            dir "$PROJECT_DIR"
+                            additionalBuildArgs "-t eudat-pyhandle:py3.9"
+                            args "-u root:root"
+                        }
+                    }
+                    steps {
+                        sh '''
+                            cd $WORKSPACE/$PROJECT_DIR/pyhandle/tests
+                            ./docker-entrypoint.sh coverage
+                        '''
+                        cobertura coberturaReportFile: '**/coverage.xml'
+                    }
+                }
             }
        }
     }
diff --git a/setup.py b/setup.py
index 8dffec0..d55d2ca 100644
--- a/setup.py
+++ b/setup.py
@@ -94,8 +94,7 @@ def find_version(*file_paths):
           'future',
           'six',
           'pymysql==0.8.0 ; python_version < "2.8.0"',
-          'pymysql==0.8.0 ; python_version < "3.8.0"',
-          'pymysql==1.2.0 ; python_version > "3.8.0"'
+          'pymysql==0.8.0 ; python_version < "3.10.0"',
 
       ],
       tests_require=test_dependencies,


Test patch:
diff --git a/pyhandle/tests/Dockerfile-py3.9 b/pyhandle/tests/Dockerfile-py3.9
new file mode 100644
index 0000000..c179997
--- /dev/null
+++ b/pyhandle/tests/Dockerfile-py3.9
@@ -0,0 +1,15 @@
+# vim:set ft=dockerfile:
+FROM       python:3.9
+
+RUN        pip install \
+           mock \
+           coverage \
+           nose
+
+ADD        . /opt/PYHANDLE
+RUN        cd /opt/PYHANDLE && \
+           python setup.py install
+
+WORKDIR    /opt/PYHANDLE/pyhandle/tests
+
+CMD ["./docker-entrypoint.sh", "coverage"]CMD ["./docker-entrypoint.sh", "coverage"]
\ No newline at end of file