Skip to content
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

Closed
DanielFarina mannequin opened this issue Jun 11, 2013 · 7 comments
Closed

2.x subprocess contains set notation #62386

DanielFarina mannequin opened this issue Jun 11, 2013 · 7 comments
Labels
stdlib Python modules in the Lib dir

Comments

@DanielFarina
Copy link
Mannequin

DanielFarina mannequin commented Jun 11, 2013

BPO 18186
Nosy @ned-deily, @berkerpeksag
Files
  • old-set-notation-v1.patch
  • fix-subprocess-compat-documentation-v1.patch
  • 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:

    assignee = None
    closed_at = <Date 2013-06-11.22:02:43.836>
    created_at = <Date 2013-06-11.09:01:09.988>
    labels = ['library']
    title = '2.x subprocess contains set notation'
    updated_at = <Date 2013-06-11.22:02:43.836>
    user = 'https://bugs.python.org/DanielFarina'

    bugs.python.org fields:

    activity = <Date 2013-06-11.22:02:43.836>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-06-11.22:02:43.836>
    closer = 'ned.deily'
    components = ['Library (Lib)']
    creation = <Date 2013-06-11.09:01:09.988>
    creator = 'Daniel.Farina'
    dependencies = []
    files = ['30542', '30549']
    hgrepos = []
    issue_num = 18186
    keywords = ['patch']
    message_count = 7.0
    messages = ['190953', '190955', '190956', '190957', '190991', '190992', '190995']
    nosy_count = 4.0
    nosy_names = ['ned.deily', 'python-dev', 'berker.peksag', 'Daniel.Farina']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue18186'
    versions = ['Python 2.7']

    @DanielFarina
    Copy link
    Mannequin Author

    DanielFarina mannequin commented Jun 11, 2013

    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.

    @DanielFarina DanielFarina mannequin added the stdlib Python modules in the Lib dir label Jun 11, 2013
    @berkerpeksag
    Copy link
    Member

    Python 2.6 only receives security fixes. You can also look at the subprocess32 module: https://pypi.python.org/pypi/subprocess32

    @DanielFarina
    Copy link
    Mannequin Author

    DanielFarina mannequin commented Jun 11, 2013

    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.

    @DanielFarina
    Copy link
    Mannequin Author

    DanielFarina mannequin commented Jun 11, 2013

    Also, this fix would be for 2.7. My mistake, even though the goal was to import on older Pythons.

    @DanielFarina DanielFarina mannequin reopened this Jun 11, 2013
    @ned-deily
    Copy link
    Member

    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.

    @DanielFarina
    Copy link
    Mannequin Author

    DanielFarina mannequin commented Jun 11, 2013

    Okay, fair enough, in that case, here's a patch to fix the documentation as to not make incorrect statements.

    @DanielFarina DanielFarina mannequin reopened this Jun 11, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 11, 2013

    New changeset 4b2fdd4dd700 by Ned Deily in branch '2.7':
    Issue bpo-18186: remove obsolete 2.2 compatibility comment.
    http://hg.python.org/cpython/rev/4b2fdd4dd700

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants