Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Compatibility with subprocess#6

Closed
Bluehorn wants to merge 8 commits intogoogle:masterfrom
Bluehorn:compat
Closed

Compatibility with subprocess#6
Bluehorn wants to merge 8 commits intogoogle:masterfrom
Bluehorn:compat

Conversation

@Bluehorn
Copy link

While the README.md suggests that subprocess32 can replace subprocess, this does not seem the case with a current CPython 2.7 since multiprocessing uses a protected function in subprocess not provided by subprocess32.

Also just doing import subprocess32 as subprocess causes problems if other code still imports subprocess directly and tries to catch exceptions like CalledProcessError. This commit tries to mimic the original API more closely.

christopherobin and others added 4 commits November 17, 2015 14:28
…l classes.

Checked with this snippet:

```
import subprocess, subprocess32

for name in dir(subprocess32):
    new_value = getattr(subprocess32, name)
    old_value = getattr(subprocess, name, None)
    if old_value is not None and isinstance(old_value, type):
        assert issubclass(new_value, old_value), "Incompatible type: {0}".format(name)
```
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@gpshead gpshead closed this Jun 16, 2020
@Bluehorn Bluehorn deleted the compat branch June 19, 2020 12:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants