drop Python 3.6, require >= 3.7
3.10 is out next week, while 3.6 reaches end of life by the end of this year. It's time to require 3.7 or greater, so we can finally use built-in dataclasses and more. Fixes https://github.com/fonttools/fonttools/issues/2350
This commit is contained in:
parent
b4a789ee9e
commit
64299aa4b1
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -27,17 +27,17 @@ jobs:
|
|||||||
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
python-version: [3.7, 3.8, 3.9]
|
||||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
exclude: # Only test on the oldest and latest supported stable Python on macOS and Windows.
|
exclude: # Only test on the oldest and latest supported stable Python on macOS and Windows.
|
||||||
- platform: macos-latest
|
- platform: macos-latest
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- platform: macos-latest
|
- platform: macos-latest
|
||||||
python-version: 3.8
|
python-version: 3.9
|
||||||
- platform: windows-latest
|
- platform: windows-latest
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- platform: windows-latest
|
- platform: windows-latest
|
||||||
python-version: 3.8
|
python-version: 3.9
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
10
README.rst
10
README.rst
@ -18,14 +18,8 @@ are available at `Read the Docs <https://fonttools.readthedocs.io/>`_.
|
|||||||
Installation
|
Installation
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
FontTools 4.x requires `Python <http://www.python.org/download/>`__ 3.6
|
FontTools requires `Python <http://www.python.org/download/>`__ 3.7
|
||||||
or later. FontTools 3.x requires Python 2.7 or later.
|
or later.
|
||||||
|
|
||||||
**NOTE** From August 2019, until no later than January 1 2020, the support
|
|
||||||
for *Python 2.7* will be limited to only critical bug fixes, and no new features
|
|
||||||
will be added to the ``py27`` branch. You can read more `here <https://python3statement.org>`__
|
|
||||||
and `here <https://github.com/fonttools/fonttools/issues/765>`__ for the
|
|
||||||
reasons behind this decision.
|
|
||||||
|
|
||||||
The package is listed in the Python Package Index (PyPI), so you can
|
The package is listed in the Python Package Index (PyPI), so you can
|
||||||
install it with `pip <https://pip.pypa.io>`__:
|
install it with `pip <https://pip.pypa.io>`__:
|
||||||
|
@ -830,7 +830,6 @@ def test_updatePaths(tmpdir):
|
|||||||
assert s1.filename == name2
|
assert s1.filename == name2
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.version_info[:2] < (3, 6), reason="pathlib is only tested on 3.6 and up")
|
|
||||||
def test_read_with_path_object():
|
def test_read_with_path_object():
|
||||||
import pathlib
|
import pathlib
|
||||||
source = (pathlib.Path(__file__) / "../data/test.designspace").resolve()
|
source = (pathlib.Path(__file__) / "../data/test.designspace").resolve()
|
||||||
@ -839,7 +838,6 @@ def test_read_with_path_object():
|
|||||||
doc.read(source)
|
doc.read(source)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.version_info[:2] < (3, 6), reason="pathlib is only tested on 3.6 and up")
|
|
||||||
def test_with_with_path_object(tmpdir):
|
def test_with_with_path_object(tmpdir):
|
||||||
import pathlib
|
import pathlib
|
||||||
tmpdir = str(tmpdir)
|
tmpdir = str(tmpdir)
|
||||||
|
@ -58,7 +58,6 @@ class ReadWriteTest(unittest.TestCase):
|
|||||||
data = self.write(font, 'OTHER', dohex=True)
|
data = self.write(font, 'OTHER', dohex=True)
|
||||||
self.assertEqual(font.getData(), data)
|
self.assertEqual(font.getData(), data)
|
||||||
|
|
||||||
@unittest.skipIf(sys.version_info[:2] < (3, 6), "pathlib is only tested on 3.6 and up")
|
|
||||||
def test_read_with_path(self):
|
def test_read_with_path(self):
|
||||||
import pathlib
|
import pathlib
|
||||||
font = t1Lib.T1Font(pathlib.Path(PFB))
|
font = t1Lib.T1Font(pathlib.Path(PFB))
|
||||||
|
2
mypy.ini
2
mypy.ini
@ -1,5 +1,5 @@
|
|||||||
[mypy]
|
[mypy]
|
||||||
python_version = 3.6
|
python_version = 3.7
|
||||||
files = Lib/fontTools/misc/plistlib
|
files = Lib/fontTools/misc/plistlib
|
||||||
follow_imports = silent
|
follow_imports = silent
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
2
setup.py
2
setup.py
@ -450,7 +450,7 @@ setup_params = dict(
|
|||||||
url="http://github.com/fonttools/fonttools",
|
url="http://github.com/fonttools/fonttools",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
platforms=["Any"],
|
platforms=["Any"],
|
||||||
python_requires=">=3.6",
|
python_requires=">=3.7",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
package_dir={'': 'Lib'},
|
package_dir={'': 'Lib'},
|
||||||
packages=find_packages("Lib"),
|
packages=find_packages("Lib"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user