Bug 2041892 - python-tblib fails to build with Python 3.11: doctest failure due to enhanced tracebacks
Summary: python-tblib fails to build with Python 3.11: doctest failure due to enhanced...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-tblib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-01-18 13:23 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:49:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ionelmc python-tblib issues 64 0 None open Tests fail with Python 3.11 2022-02-21 07:37:32 UTC

Description Tomáš Hrnčiar 2022-01-18 13:23:54 UTC
python-tblib fails to build with Python 3.11.0a4.

=================================== FAILURES ===================================
_____________________________ [doctest] README.rst _____________________________
596     Exception: Guessing time !
597     <BLANKLINE>
598     >>> pool.terminate()  # doctest: +SKIP
599 
600 Not very useful is it? Let's sort this out::
601 
602     >>> from tblib.decorators import apply_with_return_error, Error
603     >>> from itertools import repeat
604     >>> pool = Pool()
605     >>> try:
Differences (unified diff with -expected +actual):
    @@ -1,19 +1,30 @@
     Traceback (most recent call last):
    -  File "<doctest README.rst[...]>", line 4, in <module>
    +  File "<doctest README.rst[74]>", line 4, in <module>
         i.reraise()
    -  File "...tblib...decorators.py", line ..., in reraise
    +    ^^^^^^^^^^^
    +  File "/builddir/build/BUILDROOT/python-tblib-1.7.0-2.fc36.x86_64/usr/lib/python3.11/site-packages/tblib/decorators.py", line 20, in reraise
         reraise(self.exc_type, self.exc_value, self.traceback)
    -  File "...tblib...decorators.py", line ..., in return_exceptions_wrapper
    +    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +  File "/usr/lib/python3.11/site-packages/six.py", line 718, in reraise
    +    raise value.with_traceback(tb)
    +    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +  File "/builddir/build/BUILDROOT/python-tblib-1.7.0-2.fc36.x86_64/usr/lib/python3.11/site-packages/tblib/decorators.py", line 27, in return_exceptions_wrapper
         return func(*args, **kwargs)
    -  File "...tblib...decorators.py", line ..., in apply_with_return_error
    +    ^^^^^^^^^^^^^^^^^
    +  File "/builddir/build/BUILDROOT/python-tblib-1.7.0-2.fc36.x86_64/usr/lib/python3.11/site-packages/tblib/decorators.py", line 47, in apply_with_return_error
         return args[0](*args[1:])
    -  File "...examples.py", line 2, in func_a
    +      ^^^^^^^^^^^^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 2, in func_a
         func_b()
    -  File "...examples.py", line 6, in func_b
    +      ^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 6, in func_b
         func_c()
    -  File "...examples.py", line 10, in func_c
    +      ^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 10, in func_c
         func_d()
    -  File "...examples.py", line 14, in func_d
    +      ^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 14, in func_d
         raise Exception("Guessing time !")
    +      ^^^^^^^^^^^^^^^^^
     Exception: Guessing time !
     <BLANKLINE>

/builddir/build/BUILD/tblib-1.7.0/README.rst:605: DocTestFailure
650     ...     finally:
651     ...         pool.close()
652     ...
653     >>> def local_1():
654     ...     local_0()
655     ...
656     >>> def local_2():
657     ...     local_1()
658     ...
659     >>> try:
Differences (unified diff with -expected +actual):
    @@ -1,25 +1,39 @@
     Traceback (most recent call last):
    -  File "<doctest README.rst[...]>", line 2, in <module>
    +  File "<doctest README.rst[79]>", line 2, in <module>
         local_2()
    -  File "<doctest README.rst[...]>", line 2, in local_2
    +    ^^^^^^^^^
    +  File "<doctest README.rst[78]>", line 2, in local_2
         local_1()
    -  File "<doctest README.rst[...]>", line 2, in local_1
    +    ^^^^^^^^^
    +  File "<doctest README.rst[77]>", line 2, in local_1
         local_0()
    -  File "<doctest README.rst[...]>", line 6, in local_0
    +    ^^^^^^^^^
    +  File "<doctest README.rst[76]>", line 6, in local_0
         i.reraise()
    -  File "...tblib...decorators.py", line 20, in reraise
    +    ^^^^^^^^^^^
    +  File "/builddir/build/BUILDROOT/python-tblib-1.7.0-2.fc36.x86_64/usr/lib/python3.11/site-packages/tblib/decorators.py", line 20, in reraise
         reraise(self.exc_type, self.exc_value, self.traceback)
    -  File "...tblib...decorators.py", line 27, in return_exceptions_wrapper
    +    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +  File "/usr/lib/python3.11/site-packages/six.py", line 718, in reraise
    +    raise value.with_traceback(tb)
    +    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +  File "/builddir/build/BUILDROOT/python-tblib-1.7.0-2.fc36.x86_64/usr/lib/python3.11/site-packages/tblib/decorators.py", line 27, in return_exceptions_wrapper
         return func(*args, **kwargs)
    -  File "...tblib...decorators.py", line 47, in apply_with_return_error
    +    ^^^^^^^^^^^^^^^^^
    +  File "/builddir/build/BUILDROOT/python-tblib-1.7.0-2.fc36.x86_64/usr/lib/python3.11/site-packages/tblib/decorators.py", line 47, in apply_with_return_error
         return args[0](*args[1:])
    -  File "...tests...examples.py", line 2, in func_a
    +      ^^^^^^^^^^^^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 2, in func_a
         func_b()
    -  File "...tests...examples.py", line 6, in func_b
    +      ^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 6, in func_b
         func_c()
    -  File "...tests...examples.py", line 10, in func_c
    +      ^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 10, in func_c
         func_d()
    -  File "...tests...examples.py", line 14, in func_d
    +      ^^^^^^
    +  File "/builddir/build/BUILD/tblib-1.7.0/tests/examples.py", line 14, in func_d
         raise Exception("Guessing time !")
    +      ^^^^^^^^^^^^^^^^^
     Exception: Guessing time !
     <BLANKLINE>

/builddir/build/BUILD/tblib-1.7.0/README.rst:659: DocTestFailure
=============================== warnings summary ===============================
../../../../usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1183
  /usr/lib/python3.11/site-packages/_pytest/config/__init__.py:1183: PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.
    self.issue_config_time_warning(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED README.rst::README.rst
=================== 1 failed, 23 passed, 1 warning in 1.52s ====================

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/03193231-python-tblib/

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

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 Miro Hrončok 2022-01-19 09:44:14 UTC
This seems to be caused by:

PEP 657 -- Include Fine Grained Error Locations in Tracebacks
https://www.python.org/dev/peps/pep-0657/

Comment 2 Ben Cotton 2022-02-08 21:10:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 3 Miro Hrončok 2022-06-22 11:49:14 UTC
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.


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