From f21e6768a7e970e3ec0f3c4b818f47f8dfd1c92b Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 14 Nov 2022 13:39:18 +0000 Subject: [PATCH] Revert "Merge pull request #2879 from fonttools/drop-py37" This reverts commit 66a3ec90713375aec5a95d1698ef1521fd432918, reversing changes made to 82b90236f839fc9fc8e694ddcdee0ad1604d30ec. A major user of fontTools, RoboFont, will need a bit more time to wean itself from Python 3.7. We can delay this change by a few more months to give them time to upgrade. --- .github/workflows/test.yml | 24 ++++++++++-------------- README.rst | 5 ++--- requirements.txt | 5 +++-- setup.py | 7 ++----- tox.ini | 7 ++----- 5 files changed, 19 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6541b15fe..812df445b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,10 +9,6 @@ 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 @@ -27,20 +23,20 @@ jobs: - name: Install packages run: pip install tox - name: Run Tox - run: tox $TOX_OPTIONS -e mypy,package_readme + run: tox -e mypy,package_readme test: runs-on: ${{ matrix.platform }} if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" strategy: matrix: - python-version: ["3.8", "3.10"] + python-version: ["3.7", "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.8 + python-version: 3.7 - platform: windows-latest - python-version: 3.8 + python-version: 3.7 steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -50,9 +46,9 @@ jobs: - name: Install packages run: pip install tox coverage - name: Run Tox - run: tox $TOX_OPTIONS -e py-cov + run: tox -e py-cov - name: Run Tox without lxml - run: tox $TOX_OPTIONS -e py-cov-nolxml + run: tox -e py-cov-nolxml - name: Produce coverage files run: | coverage combine @@ -75,11 +71,11 @@ jobs: - name: Set up Python 3.x uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install packages run: pip install tox - name: Run Tox - run: tox $TOX_OPTIONS -e py-cy-nolxml + run: tox -e py-cy-nolxml test-pypy3: runs-on: ubuntu-latest @@ -89,8 +85,8 @@ jobs: - name: Set up Python pypy3 uses: actions/setup-python@v4 with: - python-version: "pypy-3.8" + python-version: "pypy-3.7" - name: Install packages run: pip install tox - name: Run Tox - run: tox $TOX_OPTIONS -e pypy3-nolxml + run: tox -e pypy3-nolxml diff --git a/README.rst b/README.rst index 69878d1e2..61e5a66ae 100644 --- a/README.rst +++ b/README.rst @@ -18,9 +18,8 @@ are available at `Read the Docs `_. Installation ~~~~~~~~~~~~ -FontTools requires `Python `__ 3.8 -or later. We follow the same schedule of minimum Python version support as -NumPy (see `NEP 29 `__). +FontTools requires `Python `__ 3.7 +or later. The package is listed in the Python Package Index (PyPI), so you can install it with `pip `__: diff --git a/requirements.txt b/requirements.txt index 4e9b659b0..4acd9c3f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,11 +3,12 @@ brotli==1.0.9; platform_python_implementation != "PyPy" brotlicffi==1.0.9.2; platform_python_implementation == "PyPy" unicodedata2==15.0.0; python_version <= '3.11' -scipy==1.9.3; platform_python_implementation != "PyPy" +scipy==1.7.3; platform_python_implementation != "PyPy" and python_version <= '3.7' # pyup: ignore +scipy==1.9.3; platform_python_implementation != "PyPy" and python_version > '3.7' munkres==1.1.4; platform_python_implementation == "PyPy" zopfli==0.2.1 fs==2.4.16 -skia-pathops==0.7.3; platform_python_implementation != "PyPy" +skia-pathops==0.7.2; platform_python_implementation != "PyPy" # this is only required to run Tests/cu2qu/{ufo,cli}_test.py ufoLib2==0.14.0 pyobjc==9.0; sys_platform == "darwin" diff --git a/setup.py b/setup.py index 979465bbb..960a73b78 100755 --- a/setup.py +++ b/setup.py @@ -153,11 +153,8 @@ classifiers = {"classifiers": [ "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", @@ -464,7 +461,7 @@ setup_params = dict( url="http://github.com/fonttools/fonttools", license="MIT", platforms=["Any"], - python_requires=">=3.8", + python_requires=">=3.7", long_description=long_description, package_dir={'': 'Lib'}, packages=find_packages("Lib"), diff --git a/tox.ini b/tox.ini index 764dbbede..22b1de742 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.0 -envlist = mypy, py3{8,9,10,11}-cov, htmlcov +envlist = mypy, py3{7,8,9}-cov, htmlcov skip_missing_interpreters=true [testenv] @@ -11,15 +11,12 @@ setenv = # relatively recent 'manylinux2014' platform tag. # https://github.com/tox-dev/tox/issues/791#issuecomment-518713438 download = true -# building lxml from source takes too long on CI, force it to download pre-compiled -# wheel or fail if none is found with --only-binary=lxml -install_command = python -m pip install --only-binary=lxml {opts} {packages} deps = cov: coverage>=4.3 pytest pytest-randomly -rrequirements.txt - !nolxml: lxml==4.9.0 + !nolxml: lxml==4.6.4 extras = ufo woff