소스 검색

Increase minimum Python version to 3.7 (#2241)

This does not make the code incompatible with Python 3.6, but does not check for Python 3.6 compatibility anymore which makes it possible to include Python >=3.7 only code.

To be clear, the minimum required Python version is now Python 3.7, so using features which are only in 3.7 and above is perfectly fine.

This removes Ubuntu 18.04 test from the CI because 18.04 uses Python 3.6 and therefore 18.04 in its default configuration is now no longer supported.
Vaclav Petras 3 년 전
부모
커밋
87fdb472fb
6개의 변경된 파일4개의 추가작업 그리고 50개의 파일을 삭제
  1. 0 45
      .github/workflows/build_ubuntu-18.04.sh
  2. 1 1
      .github/workflows/centos.yml
  3. 1 1
      .github/workflows/pylint.yml
  4. 0 1
      .github/workflows/ubuntu.yml
  5. 1 1
      REQUIREMENTS.html
  6. 1 1
      pyproject.toml

+ 0 - 45
.github/workflows/build_ubuntu-18.04.sh

@@ -1,45 +0,0 @@
-#!/usr/bin/env bash
-
-# The make step requires something like:
-# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/lib"
-# further steps additionally require:
-# export PATH="$PATH:$PREFIX/bin"
-
-# fail on non-zero return code from a subprocess
-set -e
-
-# print commands
-set -x
-
-if [ -z "$1" ]; then
-    echo "Usage: $0 PREFIX"
-    exit 1
-fi
-
-# non-existent variables as an errors
-set -u
-
-export INSTALL_PREFIX=$1
-
-./configure \
-    --prefix="$INSTALL_PREFIX/" \
-    --enable-largefile \
-    --with-cxx \
-    --with-zstd \
-    --with-bzlib \
-    --with-blas \
-    --with-lapack \
-    --with-readline \
-    --with-openmp \
-    --with-pthread \
-    --with-tiff \
-    --with-freetype \
-    --with-freetype-includes="/usr/include/freetype2/" \
-    --with-proj-share=/usr/share/proj \
-    --with-geos \
-    --with-sqlite \
-    --with-fftw \
-    --with-netcdf
-
-make
-make install

+ 1 - 1
.github/workflows/centos.yml

@@ -8,7 +8,7 @@ jobs:
   build:
     name: ${{ matrix.os }} build
 
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04
     container: ${{ matrix.os }}
     strategy:
       matrix:

+ 1 - 1
.github/workflows/pylint.yml

@@ -20,7 +20,7 @@ jobs:
         include:
           - os: ubuntu-20.04
             python-version: "3.10"
-            min-python-version: "3.6"
+            min-python-version: "3.7"
             pylint-version: "2.12.2"
 
     runs-on: ${{ matrix.os }}

+ 0 - 1
.github/workflows/ubuntu.yml

@@ -13,7 +13,6 @@ jobs:
     strategy:
       matrix:
         os:
-          - ubuntu-18.04
           - ubuntu-20.04
       fail-fast: false
 

+ 1 - 1
REQUIREMENTS.html

@@ -55,7 +55,7 @@ map formats<br>
 <a href="https://gdal.org">https://gdal.org</a>
 </li>
 
-<li><b>Python &gt;= 3.6</b> (for temporal framework, scripts, wxGUI, and ctypes interface)<br>
+<li><b>Python &gt;= 3.7</b> (for temporal framework, scripts, wxGUI, and ctypes interface)<br>
 <a href="https://www.python.org">https://www.python.org</a>
 </li>
 

+ 1 - 1
pyproject.toml

@@ -1,6 +1,6 @@
 [tool.black]
 line-length = 88
-target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
+target-version = ['py37', 'py38', 'py39', 'py310']
 include = '\.pyi?$'
 exclude = '''
 (