This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 2.x subprocess contains set notation
Type: Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Daniel.Farina, berker.peksag, ned.deily, python-dev
Priority: normal Keywords: patch

Created on 2013-06-11 09:01 by Daniel.Farina, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
old-set-notation-v1.patch Daniel.Farina, 2013-06-11 09:01 review
fix-subprocess-compat-documentation-v1.patch Daniel.Farina, 2013-06-11 21:36 review
Messages (7)
msg190953 - (view) Author: Daniel Farina (Daniel.Farina) Date: 2013-06-11 09:01
I was vendoring subprocess to pick up the change for #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.
msg190955 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2013-06-11 09:50
Python 2.6 only receives security fixes. You can also look at the subprocess32 module: https://pypi.python.org/pypi/subprocess32
msg190956 - (view) Author: Daniel Farina (Daniel.Farina) Date: 2013-06-11 09:52
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.
msg190957 - (view) Author: Daniel Farina (Daniel.Farina) Date: 2013-06-11 09:53
Also, this fix would be for 2.7.  My mistake, even though the goal was to import on older Pythons.
msg190991 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-06-11 21:26
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.
msg190992 - (view) Author: Daniel Farina (Daniel.Farina) Date: 2013-06-11 21:36
Okay, fair enough, in that case, here's a patch to fix the documentation as to not make incorrect statements.
msg190995 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-06-11 22:01
New changeset 4b2fdd4dd700 by Ned Deily in branch '2.7':
Issue #18186: remove obsolete 2.2 compatibility comment.
http://hg.python.org/cpython/rev/4b2fdd4dd700
History
Date User Action Args
2022-04-11 14:57:46adminsetgithub: 62386
2013-06-11 22:02:43ned.deilysetstatus: open -> closed
2013-06-11 22:01:18python-devsetnosy: + python-dev
messages: + msg190995
2013-06-11 21:36:45Daniel.Farinasetstatus: closed -> open
files: + fix-subprocess-compat-documentation-v1.patch
messages: + msg190992
2013-06-11 21:26:05ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg190991

resolution: not a bug -> out of date
2013-06-11 09:53:14Daniel.Farinasetstatus: closed -> open

messages: + msg190957
versions: + Python 2.7, - Python 2.6
2013-06-11 09:52:34Daniel.Farinasetmessages: + msg190956
2013-06-11 09:50:11berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg190955

resolution: not a bug
stage: resolved
2013-06-11 09:01:09Daniel.Farinacreate