Bug 1808318 - python-enlighten fails to build with Python 3.9: AttributeError: '_io.TextIOWrapper' object has no attribute '__bool__'
Summary: python-enlighten fails to build with Python 3.9: AttributeError: '_io.TextIOW...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-enlighten
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Avram Lubkin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-02-28 09:18 UTC by Miro Hrončok
Modified: 2020-04-07 13:15 UTC (History)
4 users (show)

Fixed In Version: python-enlighten-1.5.1-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-07 05:04:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-02-28 09:18:47 UTC
python-enlighten fails to build with Python 3.9.0a4.

ERROR: test_at_exit (tests.test_manager.TestManager)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/enlighten-1.4.0/tests/test_manager.py", line 337, in test_at_exit
    manager = _manager.Manager(stream=tty.stdout, counter_class=MockCounter)
  File "/builddir/build/BUILD/enlighten-1.4.0/enlighten/_manager.py", line 73, in __init__
    self.stream = stream or sys.stdout
  File "/usr/lib64/python3.9/unittest/mock.py", line 2146, in __get__
    return self.create_mock()
  File "/usr/lib64/python3.9/unittest/mock.py", line 2142, in create_mock
    _set_return_value(parent, m, entry)
  File "/usr/lib64/python3.9/unittest/mock.py", line 2040, in _set_return_value
    method._mock_wraps = getattr(mock._mock_wraps, name)
AttributeError: '_io.TextIOWrapper' object has no attribute '__bool__'
======================================================================
ERROR: test_direct (tests.test_counter.TestCounter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/enlighten-1.4.0/tests/test_counter.py", line 612, in test_direct
    ctr = Counter(stream=self.tty.stdout, total=100, desc='Test', unit='ticks')
  File "/builddir/build/BUILD/enlighten-1.4.0/enlighten/counter.py", line 30, in __init__
    manager = get_manager(stream=kwargs.get('stream', sys.stdout),
  File "/builddir/build/BUILD/enlighten-1.4.0/enlighten/_manager.py", line 398, in get_manager
    stream = stream or sys.stdout
  File "/usr/lib64/python3.9/unittest/mock.py", line 2146, in __get__
    return self.create_mock()
  File "/usr/lib64/python3.9/unittest/mock.py", line 2142, in create_mock
    _set_return_value(parent, m, entry)
  File "/usr/lib64/python3.9/unittest/mock.py", line 2040, in _set_return_value
    method._mock_wraps = getattr(mock._mock_wraps, name)
AttributeError: '_io.TextIOWrapper' object has no attribute '__bool__'

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01256082-python-enlighten/

For all our attempts to build python-enlighten with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-enlighten/

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

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
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 2020-03-29 21:41:04 UTC
FEDORA-2020-5671bd08f2 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5671bd08f2

Comment 2 Fedora Update System 2020-03-30 03:00:56 UTC
FEDORA-2020-5671bd08f2 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5671bd08f2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5671bd08f2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2020-04-07 05:04:55 UTC
FEDORA-2020-5671bd08f2 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2020-04-07 13:15:54 UTC
FEDORA-2020-5671bd08f2 has been pushed to the Fedora 32 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.