fonttools fails to build with Python 3.11.0a6. =================================== FAILURES =================================== ___________________________ test_formatVersionTuple ____________________________ ufo_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_formatVersionTuple0/TestFont.ufo') def test_formatVersionTuple(ufo_path): reader = UFOReader(ufo_path) assert reader.formatVersionTuple == (3, 0) assert reader.formatVersionTuple.major == 3 assert reader.formatVersionTuple.minor == 0 > assert str(reader.formatVersionTuple) == "3.0" E AssertionError: assert 'UFOFormatVersion.FORMAT_3_0' == '3.0' E - 3.0 E + UFOFormatVersion.FORMAT_3_0 https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03814609-fonttools/ For all our attempts to build fonttools with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/fonttools/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
fonttools is currently one of the biggest blockers of the Python 3.11 mass rebuild currently in progress. Hence, setting the severity to urgent. I believe the problem reported here is just a bad enum str() expectation in the tests. However, there are now 2 failures: =================================== FAILURES =================================== ____________________ TestCu2QuPen.test_ignore_single_points ____________________ self = <pens.cu2quPen_test.TestCu2QuPen testMethod=test_ignore_single_points> def test_ignore_single_points(self): pen = DummyPen() try: logging.captureWarnings(True) with CapturingLogHandler("py.warnings", level="WARNING") as log: quadpen = Cu2QuPen(pen, MAX_ERR, ignore_single_points=True) finally: logging.captureWarnings(False) quadpen.moveTo((0, 0)) quadpen.endPath() quadpen.moveTo((1, 1)) quadpen.closePath() self.assertGreaterEqual(len(log.records), 1) self.assertIn("ignore_single_points is deprecated", > log.records[0].args[0]) E IndexError: tuple index out of range Tests/pens/cu2quPen_test.py:261: IndexError ___________________________ test_formatVersionTuple ____________________________ ufo_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_formatVersionTuple0/TestFont.ufo') def test_formatVersionTuple(ufo_path): reader = UFOReader(ufo_path) assert reader.formatVersionTuple == (3, 0) assert reader.formatVersionTuple.major == 3 assert reader.formatVersionTuple.minor == 0 > assert str(reader.formatVersionTuple) == "3.0" E AssertionError: assert 'UFOFormatVersion.FORMAT_3_0' == '3.0' E - 3.0 E + UFOFormatVersion.FORMAT_3_0 Tests/ufoLib/ufoLib_test.py:38: AssertionError
Considering the severity of this, I've pushed a patch downstream: https://src.fedoraproject.org/rpms/fonttools/c/56762bce3fbd532389751251f0177c27be1864ce?branch=rawhide Parag, could you please bring this to upstream? Thanks.
Thanks for fixing this quickly. Submitted upstream PR https://github.com/fonttools/fonttools/pull/2655
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.