New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.x subprocess contains set notation #62386
Comments
I was vendoring subprocess to pick up the change for bpo-16327 when I noticed I could not import it on 2.6. The backwards compatibility claim at the top is 2.2. Included is a tiny patch that uses a semantically equivalent form. |
Python 2.6 only receives security fixes. You can also look at the subprocess32 module: https://pypi.python.org/pypi/subprocess32 |
Then most assuredly the message at the top is out of date. It seems a pity that for this small change that older python versions cannot use the same code verbatim. It reads: # This module should remain compatible with Python 2.2, see PEP-291. |
Also, this fix would be for 2.7. My mistake, even though the goal was to import on older Pythons. |
Your proposed change would still not make the source compatible with Python 2.2 (released over a decade ago) as set() was introduced in 2.4. When the subprocess module was introduced back then, it made sense to maintain compatibility with then-recent releases but it no longer makes sense when Python 2.7 is reaching the end of its life and all previous versions of Python 2 are retired or no longer receive bug fixes. In Python 3, a number of these compatibility claims have been removed from the source, including the one in subprocess. We could do a comment cleanup in the Python 2 source, as well, but at this point it hardly seems worth it. And since we do no testing against previously retired releases, making this code change is no guarantee that the module would really work in any previous version of Python 2.x. That's for you to decide if you are backporting to these unsupported versions. |
Okay, fair enough, in that case, here's a patch to fix the documentation as to not make incorrect statements. |
New changeset 4b2fdd4dd700 by Ned Deily in branch '2.7': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: