Repository: fonttools/fonttools

Issue:
drop support for 3.7?
Python 3.7 is EOL in about 7 months in June 2023 (see https://endoflife.date/python)

Other popular projects like numpy or scipy are already requiring Python 3.8 in their latest versions.

I think we can do the same without waiting for June 2023. Any objections?


Discussion:
e.g. we would get `typing.Protocol` for free without needing to add `typing_extensions` to deps https://github.com/fonttools/fonttools/issues/2163

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -153,8 +153,11 @@ def doraise_py_compile(file, cfile=None, dfile=None, doraise=False):
 	"Natural Language :: English",
 	"Operating System :: OS Independent",
 	"Programming Language :: Python",
-	"Programming Language :: Python :: 2",
 	"Programming Language :: Python :: 3",
+	"Programming Language :: Python :: 3.8",
+	"Programming Language :: Python :: 3.9",
+	"Programming Language :: Python :: 3.10",
+	"Programming Language :: Python :: 3.11",
 	"Topic :: Text Processing :: Fonts",
 	"Topic :: Multimedia :: Graphics",
 	"Topic :: Multimedia :: Graphics :: Graphics Conversion",
@@ -461,7 +464,7 @@ def build_extensions(self):
 	url="http://github.com/fonttools/fonttools",
 	license="MIT",
 	platforms=["Any"],
-	python_requires=">=3.7",
+	python_requires=">=3.8",
 	long_description=long_description,
 	package_dir={'': 'Lib'},
 	packages=find_packages("Lib"),


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -9,6 +9,10 @@ on:
 permissions:
   contents: read
 
+env:
+  # turns off tox's output redirection so we can debug package installation
+  TOX_OPTIONS: -vv
+
 jobs:
   lint:
     runs-on: ubuntu-latest
@@ -23,20 +27,20 @@ jobs:
     - name: Install packages
       run: pip install tox
     - name: Run Tox
-      run: tox -e mypy,package_readme
+      run: tox $TOX_OPTIONS -e mypy,package_readme
 
   test:
     runs-on: ${{ matrix.platform }}
     if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
     strategy:
       matrix:
-        python-version: ["3.7", "3.10"]
+        python-version: ["3.8", "3.10"]
         platform: [ubuntu-latest, macos-latest, windows-latest]
         exclude: # Only test on the latest supported stable Python on macOS and Windows.
           - platform: macos-latest
-            python-version: 3.7
+            python-version: 3.8
           - platform: windows-latest
-            python-version: 3.7
+            python-version: 3.8
     steps:
     - uses: actions/checkout@v3
     - name: Set up Python ${{ matrix.python-version }}
@@ -46,9 +50,9 @@ jobs:
     - name: Install packages
       run: pip install tox coverage
     - name: Run Tox
-      run: tox -e py-cov
+      run: tox $TOX_OPTIONS -e py-cov
     - name: Run Tox without lxml
-      run: tox -e py-cov-nolxml
+      run: tox $TOX_OPTIONS -e py-cov-nolxml
     - name: Produce coverage files
       run: |
         coverage combine
@@ -71,11 +75,11 @@ jobs:
     - name: Set up Python 3.x
       uses: actions/setup-python@v4
       with:
-        python-version: "3.10"
+        python-version: "3.11"
     - name: Install packages
       run: pip install tox
     - name: Run Tox
-      run: tox -e py-cy-nolxml
+      run: tox $TOX_OPTIONS -e py-cy-nolxml
 
   test-pypy3:
     runs-on: ubuntu-latest
@@ -85,8 +89,8 @@ jobs:
     - name: Set up Python pypy3
       uses: actions/setup-python@v4
       with:
-        python-version: "pypy-3.7"
+        python-version: "pypy-3.8"
     - name: Install packages
       run: pip install tox
     - name: Run Tox
-      run: tox -e pypy3-nolxml
+      run: tox $TOX_OPTIONS -e pypy3-nolxml