[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2018-05-15 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +6550

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2018-05-14 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-08-30 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-08-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

By the way, we're using GitHub PRs now for development, though you can still 
submit patch files if you prefer that.

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-08-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-08-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-08-25 Thread Martin Richard

Martin Richard added the comment:

Yes, the goal is to isolate the blocking IO in __init__ into other methods so 
Popen can be subclassed in asyncio.

The end goal is to ensure that when asyncio calls Popen(), it doesn't block the 
process. In the context of asyncio, there's no need to make Popen() IOs 
non-blocking as they will be performed with the asyncio API (rather than the IO 
methods provided by the Popen object).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-07-14 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Is the main goal to just make Popen.__init__ non-blocking? If not, #1191964 
aims at providing non-blocking reads/writes (including on Windows).

--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2016-09-30 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2016-09-30 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2016-09-27 Thread Martin Richard

New submission from Martin Richard:

Hi,

Currently, subprocess.Popen performs blocking IO in its constructor (at least 
on Unix): it reads on a pipe in order to detect outcome of the pre-exec and 
exec phase in the new child. There is no way yet to modify this behavior as 
this blocking call is part of a long Popen._execute_child() method.

This is a problem in asyncio (asyncio.subprocess_exec and 
asyncio.subprocess_shell).

I would like to submit a patch which breaks Popen.__init__() and 
Popen._execute_child() in several methods so it becomes possible to avoid 
blocking calls (read on pipe and waitpid) by overriding a few private methods 
without duplicating too much code. The goal is to use it in asyncio, as 
described in this pull request (which currently monkey-patches Popen):
https://github.com/python/asyncio/pull/428

This patch only targets the unix implementation.

Thanks for your feedback.

--
files: popen_execute_child_refactoring.patch
keywords: patch
messages: 277517
nosy: martius
priority: normal
severity: normal
status: open
title: Refactor subprocess.Popen to let a subclass handle IO asynchronously
type: enhancement
versions: Python 3.6
Added file: 
http://bugs.python.org/file44844/popen_execute_child_refactoring.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com