- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | hniksic |
|---|---|
| Recipients | asvetlov, hniksic, yselivanov |
| Date | 2018-12-19.20:35:51 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1545251752.03.0.788709270274.issue35539@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
|---|
It seems impossible to correctly close() an asyncio Process on which terminate has been invoked. Take the following coroutine:
async def test():
proc = await asyncio.create_subprocess_shell(
"sleep 1", stdout=asyncio.subprocess.PIPE)
proc.terminate()
await proc.wait()
After running it with asyncio.run(), Python prints a warning about "Event loop is closed" exception ignored in BaseSubprocessTransport.__del__. The code does wait for the process to exit, and neither proc nor proc.stdout have a close() method, so the warning seems spurious.
Commenting out proc.terminate() makes the program finish without an exception (but then it waits for a full second, of course).
Runnable example attached. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-12-19 20:35:52 | hniksic | set | recipients: + hniksic, asvetlov, yselivanov |
| 2018-12-19 20:35:52 | hniksic | set | messageid: <1545251752.03.0.788709270274.issue35539@psf.upfronthosting.co.za> |
| 2018-12-19 20:35:51 | hniksic | link | issue35539 messages |
| 2018-12-19 20:35:51 | hniksic | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
