Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1928081 - python-utils fails to build with Python 3.10: AttributeError: 'NoneType' object has no attribute '__suppress_context__'
Summary: python-utils fails to build with Python 3.10: AttributeError: 'NoneType' obje...
Alias: None
Product: Fedora
Classification: Fedora
Component: python-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
Reported: 2021-02-12 10:59 UTC by Tomáš Hrnčiar
Modified: 2021-03-03 00:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-03-03 00:31:00 UTC
Type: Bug

Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-02-12 10:59:57 UTC
python-utils fails to build with Python 3.10.0a5.

=================================== FAILURES ===================================
_____________________ [doctest] python_utils.logger.Logged _____________________
013     >>> class MyClass(Logged):
014     ...     def __init__(self):
015     ...         Logged.__init__(self)
016     >>> my_class = MyClass()
017     >>> my_class.debug('debug')
018     >>>'info')
019     >>> my_class.warning('warning')
020     >>> my_class.error('error')
021     >>> my_class.exception('exception')
UNEXPECTED EXCEPTION: AttributeError("'NoneType' object has no attribute '__suppress_context__'")
Traceback (most recent call last):
  File "/usr/lib64/python3.10/", line 1340, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest python_utils.logger.Logged[6]>", line 1, in <module>
  File "/builddir/build/BUILD/python-utils-2.4.0/python_utils/", line 56, in exception
    cls.logger.exception(msg, *args, **kwargs)
  File "/usr/lib64/python3.10/logging/", line 1497, in exception
    self.error(msg, *args, exc_info=exc_info, **kwargs)
  File "/usr/lib64/python3.10/logging/", line 1491, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib64/python3.10/logging/", line 1609, in _log
  File "/usr/lib64/python3.10/logging/", line 1619, in handle
  File "/usr/lib64/python3.10/logging/", line 1681, in callHandlers
  File "/usr/lib64/python3.10/logging/", line 963, in handle
  File "/usr/lib/python3.10/site-packages/_pytest/", line 331, in emit
  File "/usr/lib64/python3.10/logging/", line 1102, in emit
  File "/usr/lib64/python3.10/logging/", line 1094, in emit
    msg = self.format(record)
  File "/usr/lib64/python3.10/logging/", line 938, in format
    return fmt.format(record)
  File "/usr/lib/python3.10/site-packages/_pytest/", line 92, in format
    return super().format(record)
  File "/usr/lib64/python3.10/logging/", line 682, in format
    record.exc_text = self.formatException(record.exc_info)
  File "/usr/lib64/python3.10/logging/", line 632, in formatException
    traceback.print_exception(ei[0], ei[1], tb, None, sio)
  File "/usr/lib64/python3.10/", line 113, in print_exception
    te = TracebackException(type(value), value, tb, limit=limit, compact=True)
  File "/usr/lib64/python3.10/", line 531, in __init__
    need_context = cause is None and not e.__suppress_context__
AttributeError: 'NoneType' object has no attribute '__suppress_context__'
/builddir/build/BUILD/python-utils-2.4.0/python_utils/ UnexpectedException

For the build logs, see:

For all our attempts to build python-utils with Python 3.10, see:

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.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 2021-02-13 09:07:15 UTC

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