Merge pull request #2879 from fonttools/drop-py37

Drop Python3.7, require 3.8+ and run tests on 3.11 too
This commit is contained in:
Cosimo Lupo 2022-11-04 18:43:45 +00:00 committed by GitHub
commit 66a3ec9071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 19 deletions

View File

@ -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

View File

@ -18,8 +18,9 @@ are available at `Read the Docs <https://fonttools.readthedocs.io/>`_.
Installation
~~~~~~~~~~~~
FontTools requires `Python <http://www.python.org/download/>`__ 3.7
or later.
FontTools requires `Python <http://www.python.org/download/>`__ 3.8
or later. We follow the same schedule of minimum Python version support as
NumPy (see `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__).
The package is listed in the Python Package Index (PyPI), so you can
install it with `pip <https://pip.pypa.io>`__:

View File

@ -3,12 +3,11 @@
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.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'
scipy==1.9.3; platform_python_implementation != "PyPy"
munkres==1.1.4; platform_python_implementation == "PyPy"
zopfli==0.2.1
fs==2.4.16
skia-pathops==0.7.2; platform_python_implementation != "PyPy"
skia-pathops==0.7.3; platform_python_implementation != "PyPy"
# this is only required to run Tests/cu2qu/{ufo,cli}_test.py
ufoLib2==0.13.1
pyobjc==8.5.1; sys_platform == "darwin"

View File

@ -153,8 +153,11 @@ 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",
@ -461,7 +464,7 @@ setup_params = dict(
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"),

View File

@ -1,6 +1,6 @@
[tox]
minversion = 3.0
envlist = mypy, py3{7,8,9}-cov, htmlcov
envlist = mypy, py3{8,9,10,11}-cov, htmlcov
skip_missing_interpreters=true
[testenv]
@ -11,12 +11,15 @@ 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.6.4
!nolxml: lxml==4.9.0
extras =
ufo
woff