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

Docs of subprocess.CREATE_NEW_CONSOLE are wrong #61125

Closed
Bluehorn mannequin opened this issue Jan 10, 2013 · 5 comments
Closed

Docs of subprocess.CREATE_NEW_CONSOLE are wrong #61125

Bluehorn mannequin opened this issue Jan 10, 2013 · 5 comments
Assignees

Comments

@Bluehorn
Copy link
Mannequin

Bluehorn mannequin commented Jan 10, 2013

BPO 16921
Nosy @tjguk, @briancurtin, @asvetlov, @Bluehorn
Files
  • create_new_console.diff: Suggested documentation update
  • doc.diff: Remove mention of CREATE_NEW_CONSOLE for shell=True
  • 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 = 'https://github.com/tjguk'
    closed_at = <Date 2013-07-31.15:11:10.831>
    created_at = <Date 2013-01-10.17:42:20.418>
    labels = ['OS-windows']
    title = 'Docs of subprocess.CREATE_NEW_CONSOLE are wrong'
    updated_at = <Date 2013-07-31.15:11:10.830>
    user = 'https://github.com/Bluehorn'

    bugs.python.org fields:

    activity = <Date 2013-07-31.15:11:10.830>
    actor = 'tim.golden'
    assignee = 'tim.golden'
    closed = True
    closed_date = <Date 2013-07-31.15:11:10.831>
    closer = 'tim.golden'
    components = ['Windows']
    creation = <Date 2013-01-10.17:42:20.418>
    creator = 'torsten'
    dependencies = []
    files = ['28674', '28688']
    hgrepos = []
    issue_num = 16921
    keywords = ['patch']
    message_count = 5.0
    messages = ['179578', '179660', '179661', '179662', '179678']
    nosy_count = 5.0
    nosy_names = ['tim.golden', 'brian.curtin', 'asvetlov', 'torsten', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue16921'
    versions = ['Python 3.5']

    @Bluehorn
    Copy link
    Mannequin Author

    Bluehorn mannequin commented Jan 10, 2013

    The documentation of CREATE_NEW_CONSOLE at http://docs.python.org/3/library/subprocess.html#subprocess.CREATE_NEW_CONSOLE states:

    This flag is always set when Popen is created with shell=True.
    

    This does not fit the code which does

    if (_subprocess.GetVersion() >= 0x80000000 or os.path.basename(comspec).lower() == "command.com"):
        # Win9x, or using command.com on NT. We need to
        creationflags |= _subprocess.CREATE_NEW_CONSOLE
    

    So the statement is only true on very old versions on Windows. I suggest to fix the documentation (patch attached) or to remove that obsolete hack (and drop support for Windows <= NT).

    @Bluehorn Bluehorn mannequin added the OS-windows label Jan 10, 2013
    @tjguk
    Copy link
    Member

    tjguk commented Jan 11, 2013

    This code is no longer present in subprocess.py now that bpo-14470 has been applied.

    @tjguk tjguk closed this as completed Jan 11, 2013
    @tjguk
    Copy link
    Member

    tjguk commented Jan 11, 2013

    Reopening because there is in fact a doc issue reamining.

    @tjguk tjguk reopened this Jan 11, 2013
    @tjguk tjguk self-assigned this Jan 11, 2013
    @tjguk
    Copy link
    Member

    tjguk commented Jan 11, 2013

    I can't push from work; the (trivial) doc patch is attached. If no-one gets to it, I'll push from home this evening.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 11, 2013

    New changeset 1aac333f320a by Tim Golden in branch 'default':
    bpo-16921 Since Win9x is no longer supported, CREATE_NEW_CONSOLE is
    http://hg.python.org/cpython/rev/1aac333f320a

    @tjguk tjguk closed this as completed Jul 31, 2013
    @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
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant