[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-27 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36686> ___ __

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-26 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- keywords: +patch pull_requests: +13493 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13586 ___ Python tracker <https://bugs.python.org/issu

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-04-20 Thread Simon Bernier St-Pierre
Simon Bernier St-Pierre added the comment: Could be cool to also mention that `encoding` / `errors` does not work yet. https://bugs.python.org/issue31087 -- ___ Python tracker <https://bugs.python.org/issue36

[issue36687] subprocess encoding

2019-04-20 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36687> ___ ___ Pyth

[issue36687] subprocess encoding

2019-04-20 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- nosy: sbstp priority: normal severity: normal status: open title: subprocess encoding ___ Python tracker <https://bugs.python.org/issue36

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-04-20 Thread Simon Bernier St-Pierre
New submission from Simon Bernier St-Pierre : I had trouble figuring out how to simply inherit stdin, stdout, or stderr in the asyncio.create_subprocess_exec / asyncio.subprocess_exec docs. My experiments show that passing either None or `sys.std*` works but the way the docs are written make

[issue30957] pathlib: Path and PurePath cannot be subclassed

2017-07-18 Thread Simon Bernier St-Pierre
New submission from Simon Bernier St-Pierre: Because of the special way Path and PurePath are instantiated, they can't be inherited like a normal class. Here's an example of the issue: >>> import pathlib >>> class MyPath(pathlib.Path): ... pass ... >>> p = MyPa

[issue26395] asyncio does not support yielding from recvfrom (socket/udp)

2016-02-22 Thread Simon Bernier St-Pierre
Changes by Simon Bernier St-Pierre <sbernierstpie...@gmail.com>: -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue26395] asyncio does not support yielding from recvfrom (socket/udp)

2016-02-21 Thread Simon Bernier St-Pierre
Simon Bernier St-Pierre added the comment: I created a patch for it on the asyncio github repo. https://github.com/python/asyncio/pull/321 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26395] asyncio does not support yielding from recvfrom (socket/udp)

2016-02-20 Thread Simon Bernier St-Pierre
Simon Bernier St-Pierre added the comment: I want to have a loop that receives data like this: socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) socket.bind(('0.0.0.0', port)) socket.setblocking(False) while True: data, addr = await loop.sock_recvfrom(sock, 4096) # process

[issue26395] asyncio does not support yielding from recvfrom (socket/udp)

2016-02-20 Thread Simon Bernier St-Pierre
Simon Bernier St-Pierre added the comment: That could work. I came up with this class MyProtocol(aio.DatagramProtocol): def __init__(self, fut): self._fut = fut def datagram_received(self, data, addr): self.fut.set_result((data, addr)) fut = aio.Future

[issue26395] asyncio does not support yielding from recvfrom (socket/udp)

2016-02-20 Thread Simon Bernier St-Pierre
New submission from Simon Bernier St-Pierre: I want to receive data on a UDP socket that was bound, without blocking the event loop. I've looked through the asyncio docs, and I haven't found a way of doing that using the coroutine API (yield from/await). There is a sock_recv method