Bug 2246286

Summary: python-zope-interface fails to build with Python 3.13: AssertionError: actual indentation not matching the expected
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-zope-interfaceAssignee: Lumír Balhar <lbalhar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, lbalhar, mhroncok, orion, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-14 13:09:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2244836    

Description Karolina Surma 2023-10-26 07:35:06 UTC
python-zope-interface fails to build with Python 3.13.0a1.

This report is automated and not very verbose, but we'll try to get back here with details.

+ python3 -m unittest discover -s zope/interface -t .
................................s......................s.........................................................ss.....s.............s.s..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..........F....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: test_asReStructuredText_empty_with_multiline_docstring (zope.interface.tests.test_document.Test_asReStructuredText.test_asReStructuredText_empty_with_multiline_docstring)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-zope-interface-6.0-2.fc40.x86_64/usr/lib64/python3.13/site-packages/zope/interface/tests/test_document.py", line 298, in test_asReStructuredText_empty_with_multiline_docstring
    self.assertEqual(self._callFUT(IEmpty), EXPECTED)
AssertionError: '``IE[39 chars]n \n It can be used to annotate any class or o[66 chars]\n\n' != '``IE[39 chars]n \n             It can be used to annotate an[90 chars]\n\n'
  ``IEmpty``
  
   This is an empty interface.
   
-  It can be used to annotate any class or object, because it promises
+              It can be used to annotate any class or object, because it promises
? ++++++++++++
-  nothing.
+              nothing.
  
   Attributes:
  
   Methods:
  


======================================================================
FAIL: test_asStructuredText_empty_with_multiline_docstring (zope.interface.tests.test_document.Test_asStructuredText.test_asStructuredText_empty_with_multiline_docstring)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-zope-interface-6.0-2.fc40.x86_64/usr/lib64/python3.13/site-packages/zope/interface/tests/test_document.py", line 74, in test_asStructuredText_empty_with_multiline_docstring
    self.assertEqual(self._callFUT(IEmpty), EXPECTED)
AssertionError: 'IEmp[35 chars]n \n It can be used to annotate any class or o[66 chars]\n\n' != 'IEmp[35 chars]n \n             It can be used to annotate an[90 chars]\n\n'
  IEmpty
  
   This is an empty interface.
   
-  It can be used to annotate any class or object, because it promises
+              It can be used to annotate any class or object, because it promises
? ++++++++++++
-  nothing.
+              nothing.
  
   Attributes:
  
   Methods:
  


----------------------------------------------------------------------
Ran 1355 tests in 0.391s

FAILED (failures=2, skipped=7)

https://docs.python.org/3.13/whatsnew/3.13.html
This may be related to:
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/06558506-python-zope-interface/

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

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 Karolina Surma 2023-11-01 14:28:22 UTC
Reported upstream: https://github.com/zopefoundation/zope.interface/issues/279

Comment 2 Lumír Balhar 2023-12-19 09:49:05 UTC
Upstream PR: https://github.com/zopefoundation/zope.interface/pull/281