New submission from Vajrasky Kok: These examples coming from: https://docs.python.org/3/library/asyncio-eventloop.html#example-hello-world-callback
and https://docs.python.org/3/library/asyncio-eventloop.html#example-set-signal-handlers-for-sigint-and-sigterm throw resource usage warning. One of them gives this output: Event loop running forever, press CTRL+c to interrupt. pid 3075: send SIGINT or SIGTERM to exit. ^Cgot signal SIGINT: exit sys:1: ResourceWarning: unclosed <socket object at 0x7f7124783448> sys:1: ResourceWarning: unclosed <socket object at 0x7f7124c230e8> The patch adds closing the loop code in the examples. ---------- assignee: docs@python components: Documentation, asyncio files: close_loop_on_example.patch keywords: patch messages: 222344 nosy: docs@python, gvanrossum, haypo, vajrasky, yselivanov priority: normal severity: normal status: open title: Example in asyncio event throws resource usage warning type: resource usage versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35866/close_loop_on_example.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21921> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com