python-pikepdf fails to build with Python 3.11.0a7. =================================== FAILURES =================================== _______________________________ test_page_attrs ________________________________ [gw0] linux -- Python 3.11.0 /usr/bin/python3 graph = <pikepdf.Pdf description='/builddir/build/BUILD/pikepdf-5.1.2/tests/resources/graph.pdf'> def test_page_attrs(graph): # Test __getattr__ assert isinstance(graph.pages[0].Resources, Dictionary) del graph.pages[0].Resources with pytest.raises(AttributeError, match="can't delete"): > del graph.pages[0].obj tests/test_page.py:263: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pikepdf.Page({ "/Contents": pikepdf.Stream(owner=<...>, data=<...>, { "/Length": 44 }), "/MediaBox": [ 0, 0, Decimal('545.2800'), Decimal('443.5200') ], "/Parent": <reference to /Pages>, "/Type": "/Page" })> name = 'obj' @augment_override_cpp def __delattr__(self, name): if hasattr(self.__class__, name): > return object.__delattr__(self, name) E AttributeError: property of 'Page' object has no deleter ../../BUILDROOT/python-pikepdf-5.1.2-1.fc37.x86_64/usr/lib64/python3.11/site-packages/pikepdf/_methods.py:1252: AttributeError During handling of the above exception, another exception occurred: graph = <pikepdf.Pdf description='/builddir/build/BUILD/pikepdf-5.1.2/tests/resources/graph.pdf'> def test_page_attrs(graph): # Test __getattr__ assert isinstance(graph.pages[0].Resources, Dictionary) del graph.pages[0].Resources > with pytest.raises(AttributeError, match="can't delete"): E AssertionError: Regex pattern "can't delete" does not match "property of 'Page' object has no deleter". tests/test_page.py:262: AssertionError =========================== short test summary info ============================ SKIPPED [1] tests/test_image_access.py:738: jbig2dec not installed SKIPPED [1] tests/test_image_access.py:753: jbig2dec not installed SKIPPED [1] tests/test_image_access.py:744: jbig2dec not installed SKIPPED [1] tests/test_image_access.py:762: jbig2dec not installed SKIPPED [1] tests/test_pdfa.py:35: verapdf not found SKIPPED [1] tests/test_pdfa.py:53: verapdf not found SKIPPED [1] tests/test_pdfa.py:83: verapdf not found SKIPPED [1] tests/test_private_pdfs.py:25: private resources not available XFAIL tests/test_foreign.py::test_issue_271 current qpdf behavior FAILED tests/test_page.py::test_page_attrs - AssertionError: Regex pattern "c... ============= 1 failed, 501 passed, 8 skipped, 1 xfailed in 11.18s ============= 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/04304273-python-pikepdf/ For all our attempts to build python-pikepdf with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-pikepdf/ 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.
I don't see any entry for this change in the what's new, but I assume they did some re-writing of the exception text.
The failure is caused by this change in Python: https://github.com/python/cpython/commit/0cb765b2cec9b020224af016a83bf35c45b71932 The fix is pretty easy so I'm gonna report it to upstream today and I might prepare a fix as well.
Downstream PR: https://src.fedoraproject.org/rpms/python-pikepdf/pull-request/2
This fix was merged but I cannot verify it currently due to uninstallable matplotlib.
I managed to build matplotlib with tests in COPR, so I think we are good. https://download.copr.fedorainfracloud.org/results/@python/python3.11/fedora-rawhide-x86_64/04403772-python-matplotlib/builder-live.log.gz It is still failing in the Koschei tho.
I don't see any failure for either in Koschei.
The last three builds of pikepdf are green in Python 3.11 COPR so this can be closed. https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-pikepdf/