Bug 1723199

Summary: python-thriftpy fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-thriftpyAssignee: Igor Raits <igor.raits>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: igor.raits, piotr1212
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: 2019-07-31 22:14:00 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: 1686977    

Description Miro Hrončok 2019-06-23 20:06:21 UTC
python-thriftpy fails to build with Python 3.8.0b1.

=================================== FAILURES ===================================
________________ TornadoRPCTestCase.test_asynchronous_exception ________________

self = <test_tornado.TornadoRPCTestCase testMethod=test_asynchronous_exception>

    @testing.gen_test
    def test_asynchronous_exception(self):
        exc = None
        try:
            yield self.client.remove('Brian Kernighan')
        except Exception as e:
            exc = e
>       assert isinstance(exc, addressbook.PersonNotExistsError)
E       AssertionError: assert False
E        +  where False = isinstance(TTransportException(type=4, message='Stream is closed'), <class 'addressbook.PersonNotExistsError'>)
E        +    where <class 'addressbook.PersonNotExistsError'> = addressbook.PersonNotExistsError

test_tornado.py:122: AssertionError
----------------------------- Captured stderr call -----------------------------
ERROR:thriftpy.tornado:thrift exception in handle_stream
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 205, in handle_stream
    self._processor.handle_exception(e, result)
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 202, in handle_stream
    result.success = yield gen.maybe_future(call())
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 735, in run
    value = future.result()
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 209, in wrapper
    yielded = next(result)
  File "/builddir/build/BUILD/thriftpy-0.3.9/tests/test_tornado.py", line 51, in remove
    yield gen.Task(self.io_loop.add_callback)
AttributeError: module 'tornado.gen' has no attribute 'Task'
INFO:thriftpy.tornado:client disconnected 127.0.0.1:60030
------------------------------ Captured log call -------------------------------
tornado.py                 209 ERROR    thrift exception in handle_stream
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 205, in handle_stream
    self._processor.handle_exception(e, result)
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 202, in handle_stream
    result.success = yield gen.maybe_future(call())
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 735, in run
    value = future.result()
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 209, in wrapper
    yielded = next(result)
  File "/builddir/build/BUILD/thriftpy-0.3.9/tests/test_tornado.py", line 51, in remove
    yield gen.Task(self.io_loop.add_callback)
AttributeError: module 'tornado.gen' has no attribute 'Task'
tornado.py                 212 INFO     client disconnected 127.0.0.1:60030
_________________ TornadoRPCTestCase.test_asynchronous_result __________________

self = <thriftpy.tornado.TTornadoStreamTransport object at 0x7f990c3b6610>

    @contextmanager
    def io_exception_context(self):
        try:
>           yield

../../../BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py:116: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <thriftpy.tornado.TTornadoStreamTransport object at 0x7f990c3b6610>

    @gen.coroutine
    def read_frame(self):
        # IOStream processes reads one at a time
        with (yield self._read_lock.acquire()):
            with self.io_exception_context():
>               frame_header = yield self._read_bytes(4)

../../../BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py:135: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tornado.gen.Runner object at 0x7f990c3b6910>

    def run(self) -> None:
        """Starts or resumes the generator, running until it reaches a
        yield point that is not ready.
        """
        if self.running or self.finished:
            return
        try:
            self.running = True
            while True:
                future = self.future
                if future is None:
                    raise Exception("No pending future")
                if not future.done():
                    return
                self.future = None
                try:
                    exc_info = None
    
                    try:
>                       value = future.result()
E                       tornado.iostream.StreamClosedError: Stream is closed

/usr/lib64/python3.8/site-packages/tornado/gen.py:735: StreamClosedError

During handling of the above exception, another exception occurred:

self = <test_tornado.TornadoRPCTestCase testMethod=test_asynchronous_result>

    @testing.gen_test
    def test_asynchronous_result(self):
        dennis = addressbook.Person(name='Dennis Ritchie')
        yield self.client.add(dennis)
>       success = yield self.client.remove(dennis.name)

test_tornado.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.8/site-packages/tornado/gen.py:735: in run
    value = future.result()
/usr/lib64/python3.8/site-packages/tornado/gen.py:742: in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
../../../BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py:218: in _recv
    frame = yield self._oprot.trans.read_frame()
/usr/lib64/python3.8/site-packages/tornado/gen.py:735: in run
    value = future.result()
/usr/lib64/python3.8/site-packages/tornado/gen.py:742: in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
../../../BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py:144: in read_frame
    raise gen.Return(frame)
/usr/lib64/python3.8/contextlib.py:131: in __exit__
    self.gen.throw(type, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <thriftpy.tornado.TTornadoStreamTransport object at 0x7f990c3b6610>

    @contextmanager
    def io_exception_context(self):
        try:
            yield
        except (socket.error, OSError, IOError) as e:
>           raise TTransportException(
                type=TTransportException.END_OF_FILE,
                message=str(e))
E           thriftpy.transport.TTransportException: TTransportException(type=4, message='Stream is closed')

../../../BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py:118: TTransportException
----------------------------- Captured stderr call -----------------------------
ERROR:thriftpy.tornado:thrift exception in handle_stream
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 205, in handle_stream
    self._processor.handle_exception(e, result)
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 202, in handle_stream
    result.success = yield gen.maybe_future(call())
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 735, in run
    value = future.result()
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 209, in wrapper
    yielded = next(result)
  File "/builddir/build/BUILD/thriftpy-0.3.9/tests/test_tornado.py", line 51, in remove
    yield gen.Task(self.io_loop.add_callback)
AttributeError: module 'tornado.gen' has no attribute 'Task'
INFO:thriftpy.tornado:client disconnected 127.0.0.1:58966
------------------------------ Captured log call -------------------------------
tornado.py                 209 ERROR    thrift exception in handle_stream
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 205, in handle_stream
    self._processor.handle_exception(e, result)
  File "/builddir/build/BUILDROOT/python-thriftpy-0.3.9-10.fc31.x86_64/usr/lib64/python3.8/site-packages/thriftpy/tornado.py", line 202, in handle_stream
    result.success = yield gen.maybe_future(call())
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 735, in run
    value = future.result()
  File "/usr/lib64/python3.8/site-packages/tornado/gen.py", line 209, in wrapper
    yielded = next(result)
  File "/builddir/build/BUILD/thriftpy-0.3.9/tests/test_tornado.py", line 51, in remove
    yield gen.Task(self.io_loop.add_callback)
AttributeError: module 'tornado.gen' has no attribute 'Task'
tornado.py                 212 INFO     client disconnected 127.0.0.1:58966



For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00942524-python-thriftpy/

For all our attempts to build python-thriftpy with Python 3.8, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-thriftpy/

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

Let us know here if you have any questions.

Comment 1 Miro Hrončok 2019-07-30 14:52:04 UTC
Igor?

Comment 2 Miro Hrončok 2019-07-31 22:14:00 UTC
The package was retired.