Bug 2057511 - python-manuel fails to build with Python 3.11: doctest failure due to enhanced tracebacks
Summary: python-manuel fails to build with Python 3.11: doctest failure due to enhance...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-manuel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-02-23 14:50 UTC by Tomáš Hrnčiar
Modified: 2022-02-23 17:02 UTC (History)
6 users (show)

Fixed In Version: python-manuel-1.10.1-15.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-23 17:02:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-02-23 14:50:31 UTC
python-manuel fails to build with Python 3.11.0a5.

======================================================================
FAIL: /builddir/build/BUILD/manuel-1.10.1/src/manuel/index.txt:Ignoring Blocks
/builddir/build/BUILD/manuel-1.10.1/src/manuel/index.txt:Ignoring Blocks
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/manuel-1.10.1/src/manuel/testing.py", line 48, in runTest
    raise real_doctest.DocTestCase.failureException(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 
----------------------------------------------------------------------
File "/builddir/build/BUILD/manuel-1.10.1/src/manuel/index.txt", line 776, in index.txt
Failed example:
    document.process_with(m, globs={})
Expected:
    Traceback (most recent call last):
      ...
      File "<memory>:4", line 2
         def foo:
                ^
    SyntaxError: invalid syntax...
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.11/doctest.py", line 1346, in __run
        exec(compile(example.source, filename, "single",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest index.txt[0]>", line 1, in <module>
        document.process_with(m, globs={})
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/manuel-1.10.1/src/manuel/__init__.py", line 144, in process_with
        self.parse_with(m)
        ^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/manuel-1.10.1/src/manuel/__init__.py", line 130, in parse_with
        parser(self)
        ^^^^^^^^^^^^
      File "/builddir/build/BUILD/manuel-1.10.1/src/manuel/codeblock.py", line 22, in find_code_blocks
        code = compile(source, source_location, 'exec', 0, True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<memory>:3", line 3
        def foo:
               ^
    SyntaxError: expected '('


----------------------------------------------------------------------
Ran 60 tests in 0.065s

FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=60 errors=0 failures=1>

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/03527311-python-manuel/

For all our attempts to build python-manuel with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-manuel/

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.

Comment 1 Jerry James 2022-02-23 17:02:11 UTC
Fixed in Rawhide.  Upstream pull request: https://github.com/benji-york/manuel/pull/23.


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