Hi,

2014-01-26 Victor Stinner <[email protected]>:
> I created a subproces-stream branch (oops, typo!) in Tulip repository.
> It's a work in progress, but it works :-) Attached patch are the
> differences with the default branch.
>
> I tried to limit changes on existing code:
>
> - add SubprocessProtocol.pip_connection_made(): needed to retrieve the
> writer for stdin
> - add two attributes to SubprocessProtocol: read_pipe_protocol,
> write_pipe_protocol => factories to build protocols for stdout/stderr
> and stdin

I changed the code to use methods instead of attributes:
- SubprocessProtocol.create_read_pipe_protocol()
- SubprocessProtocol.create_write_pipe_protocol()

The default implementation is concrete. Using a method is more
convinient, self can be used to access protocol methods and
attributes.

With methods, the pipe_connection_made() method looks artificial, I removed it.

I created the follow issue with a patch just to change the
SubprocessProtocol API:
http://code.google.com/p/tulip/issues/detail?id=115

I also created an issue in Python bug tracker with release blocker
priority to remember that the issue is critical (in my opinion):
http://bugs.python.org/issue20400

My patch is simple, so I hope that it will be quickly reviewed.

--

It would be nice to add SubprocessStreamProtocol to asyncio before
Python 3.4 final, but I don't know if we will have time to finish the
work on that, nor if it is "allowed" to add new classes after the
beta3 (even if asyncio has a special status). 3.4.0 final is scheduled
for March 16, 2014.

Victor

Reply via email to