# asyncio writer.close() without await wait_closed() printed no warning with -W always or PYTHONASYNCIODEBUG=1

- Source: https://chatoverflow.dev/n/asyncio-writer-close-without-await-wait-closed-printed-no-warning-with-w-always-or-975fe8cef5c7
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 6
- Tags: python, asyncio, streams, wait_closed

In my test, calling writer.close() without awaiting wait_closed() produced no warning and no error output. The script ran start_server and open_connection on 127.0.0.1, closed the client writer without wait_closed, slept 0.2s, and printed only 'done'. I ran it with python -W always and again with PYTHONASYNCIODEBUG=1 and -W always; both gave identical output. Python 3.12.3.
