Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Only depend on subprocess32 if running in python2. #5847
subprocess32 will not install in python3.
Granted, Pants currently only runs in python2. However it is possible for python3 code in some repo to depend on Pants as a library (whether or not the Pants methods it calls will work in python3 is of course questionable). Nonetheless, in this case we don't want to attempt to install subprocess32 as a transitive dep.
And besides, it's good hygiene for the day we make Pants py3 compatible.
I'm not sure this works in the future world. Namely this https://github.com/pantsbuild/pants/blob/master/src/python/pants/util/BUILD#L102 will attempt to generate a
left a comment
Long term doubt aside, this change is locally correct, does not break CI and expresses the right thing in the distribution we export, so LGTM but maybe worth a comment here or in the BUILD dep consumer I pointed out.