◐ Shell
reader mode source ↗
Skip to content

bpo-20104: Expose posix_spawn in the os module#5109

Merged
gpshead merged 8 commits into
python:masterfrom
pablogsal:bpo20104
Jan 29, 2018
Merged

bpo-20104: Expose posix_spawn in the os module#5109
gpshead merged 8 commits into
python:masterfrom
pablogsal:bpo20104

Conversation

@pablogsal

@pablogsal pablogsal commented Jan 6, 2018

Copy link
Copy Markdown
Member

This PR exposes posix_spawn in the os module. This also adds a new class in said module to work with posix_spawn file_actions argument.

https://bugs.python.org/issue20104

@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@gpshead

gpshead commented Jan 8, 2018

Copy link
Copy Markdown
Member

I suggest creating namedtuple instances for each of dup2, open, and close in the module and requiring this parameter to be a sequence of those.

@pablogsal

Copy link
Copy Markdown
Member Author

Is then ok to bring collections to the os module? I am asking this because is a big dependency.

@gpshead

gpshead commented Jan 8, 2018

Copy link
Copy Markdown
Member

good point. given that, just define a trio of simple data classes of your own or some constants to indicate open/close/dup2 for use as the first element of a tuple? the "good" thing about os/posix module APIs is that they can be quite low level looking. This is the module providing a relatively raw wrapper of system calls. higher level abstrations to make using them easier often live in other modules.

@pablogsal

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@gpshead: please review the changes made to this pull request.

@serhiy-storchaka serhiy-storchaka changed the title bpo-20104 Expose expose posix_spawn in the os module Jan 12, 2018
@serhiy-storchaka serhiy-storchaka changed the title bpo-20104 Expose posix_spawn in the os module Jan 12, 2018
@pablogsal

Copy link
Copy Markdown
Member Author

@pppery Thanks! Corrected in b9db2c8

@pablogsal pablogsal force-pushed the bpo20104 branch 7 times, most recently from 7c9d964 to b25b7d1 Compare January 21, 2018 02:12
12 hidden items Load more…
@pablogsal

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@gpshead: please review the changes made to this pull request.

@gpshead gpshead merged commit 6c6ddf9 into python:master Jan 29, 2018
@pablogsal pablogsal deleted the bpo20104 branch January 29, 2018 02:12
@serhiy-storchaka

Copy link
Copy Markdown
Member

Also there are trailing spaces added by this PR.

@pablogsal

pablogsal commented Apr 1, 2018

Copy link
Copy Markdown
Member Author

@serhiy-storchaka I am trying to correct all these new issues in Corrected in #6331. Please, notice that some of them (like the result of posix_spawn not checked and the return before _Py_END_SUPPRESS_IPH) were already corrected as this is an outdated diff. Thanks for all the effort with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants