Bug 2250678 - python-shapely fails to build with Python 3.13: AssertionError: docstring indentation doesn't match
Summary: python-shapely fails to build with Python 3.13: AssertionError: docstring ind...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-shapely
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-11-20 14:08 UTC by Karolina Surma
Modified: 2023-11-22 18:39 UTC (History)
5 users (show)

Fixed In Version: python-shapely-2.0.2-5.fc40
Clone Of:
Environment:
Last Closed: 2023-11-22 18:39:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github shapely shapely issues 1937 0 None open Test failure on Python 3.13 because it strips indents from docstrings 2023-11-22 17:27:30 UTC

Description Karolina Surma 2023-11-20 14:08:28 UTC
python-shapely fails to build with Python 3.13.0a1.
_______________________ test_requires_geos_method[3.8.0] _______________________

version = '3.8.0', mocked_geos_version = '3.7.1', sphinx_doc_build = None

    @pytest.mark.parametrize("version", ["3.6.0", "3.8.0"])
    def test_requires_geos_method(version, mocked_geos_version, sphinx_doc_build):
        """The requires_geos decorator adjusts methods docstrings correctly"""
        wrapped = requires_geos(version)(SomeClass.func)
    
>       assert wrapped.__doc__ == expected_docstring.format(version=version, indent=" " * 8)
E       AssertionError: assert 'Docstring th...escription.\n' == 'Docstring th...on.\n        '
E           Docstring that will be mocked.
E         -         A multiline.
E         ? --------
E         + A multiline.
E           
E         -         .. note:: 'func' requires at least GEOS 3.8.0.
E         ? ------...
E         
E         ...Full output truncated (6 lines hidden), use '-vv' to show

tests/test_misc.py:123: AssertionError
=========================== short test summary info ============================
FAILED tests/test_misc.py::test_requires_geos_not_ok[3.7.2] - AssertionError:...
FAILED tests/test_misc.py::test_requires_geos_not_ok[3.8.0] - AssertionError:...
FAILED tests/test_misc.py::test_requires_geos_not_ok[3.8.1] - AssertionError:...
FAILED tests/test_misc.py::test_requires_geos_doc_build[3.6.0] - AssertionErr...
FAILED tests/test_misc.py::test_requires_geos_doc_build[3.8.0] - AssertionErr...
FAILED tests/test_misc.py::test_requires_geos_method[3.6.0] - AssertionError:...
FAILED tests/test_misc.py::test_requires_geos_method[3.8.0] - AssertionError:...
============ 7 failed, 3494 passed, 37 skipped, 3 xfailed in 5.74s =============

https://docs.python.org/3.13/whatsnew/3.13.html:
Compiler now strip indents from docstrings. This will reduce the size of bytecode cache (e.g. .pyc file). For example, cache file size for sqlalchemy.orm.session in SQLAlchemy 2.0 is reduced by about 5%. This change will affect tools using docstrings, like doctest. (Contributed by Inada Naoki in gh-81283.)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06660930-python-shapely/

For all our attempts to build python-shapely with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-shapely/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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.

Comment 1 Fedora Update System 2023-11-22 18:38:16 UTC
FEDORA-2023-01191dc2a8 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-01191dc2a8

Comment 2 Fedora Update System 2023-11-22 18:39:39 UTC
FEDORA-2023-01191dc2a8 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.