[Python-modules-team] Bug#949974: Finish hangs after flush

Enrico Zini enrico at debian.org
Mon Jan 27 20:10:26 GMT 2020


Package: python3-tornado
Version: 5.1.1-4
Severity: normal

Hello,

thank you for maintaining tornado in Debian.

Here's a simple variation of Tornado's hello example, supposing one
wants to take timing or log things after a flush:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
import tornado.ioloop
import tornado.web


class MainHandler(tornado.web.RequestHandler):
    async def get(self):
        print("START")
        self.write("Hello, world")
        await self.flush()
        print("DATA WRITTEN")
        await self.finish()
        print("REQUEST DONE")


def make_app():
    return tornado.web.Application([
        (r"/", MainHandler),
    ])


if __name__ == "__main__":
    app = make_app()
    app.listen(8888)
    tornado.ioloop.IOLoop.current().start()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Running this code, curl localhost:8888, and the output on tornado is:

  START
  DATA WRITTEN

That is, finish() seems to hang forever if it has no more data to write.


Enrico


-- System Information:
Debian Release: 10.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-tornado depends on:
ii  ca-certificates  20190110
ii  libc6            2.28-10
ii  python3          3.7.3-1

python3-tornado recommends no packages.

Versions of packages python3-tornado suggests:
ii  python-tornado-doc  5.1.1-4
ii  python3-pycurl      7.43.0.2-0.1
ii  python3-twisted     18.9.0-3

-- no debconf information



More information about the Python-modules-team mailing list