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

Add --prompt option to venv #67018

Closed
ukaszBalcerzak mannequin opened this issue Nov 9, 2014 · 7 comments
Closed

Add --prompt option to venv #67018

ukaszBalcerzak mannequin opened this issue Nov 9, 2014 · 7 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@ukaszBalcerzak
Copy link
Mannequin

ukaszBalcerzak mannequin commented Nov 9, 2014

BPO 22829
Nosy @vsajip, @ncoghlan, @berkerpeksag, @matrixise
Files
  • venv-prompt-argument.patch
  • venv-prompt-argument-3_5.patch
  • venv-prompt-argument-3_6.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 2016-08-06.09:44:01.281>
    created_at = <Date 2014-11-09.17:59:17.089>
    labels = ['type-feature', 'library']
    title = 'Add --prompt option to venv'
    updated_at = <Date 2016-08-06.09:44:01.278>
    user = 'https://bugs.python.org/ukaszBalcerzak'

    bugs.python.org fields:

    activity = <Date 2016-08-06.09:44:01.278>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-08-06.09:44:01.281>
    closer = 'python-dev'
    components = ['Library (Lib)']
    creation = <Date 2014-11-09.17:59:17.089>
    creator = '\xc5\x81ukasz.Balcerzak'
    dependencies = []
    files = ['37156', '39076', '40962']
    hgrepos = []
    issue_num = 22829
    keywords = ['patch']
    message_count = 7.0
    messages = ['230894', '241265', '241303', '241329', '254193', '254197', '272080']
    nosy_count = 6.0
    nosy_names = ['vinay.sajip', 'ncoghlan', 'python-dev', 'berker.peksag', 'matrixise', '\xc5\x81ukasz.Balcerzak']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22829'
    versions = ['Python 3.6']

    @ukaszBalcerzak
    Copy link
    Mannequin Author

    ukaszBalcerzak mannequin commented Nov 9, 2014

    virtualenv tool allows to set alternative prompt prefix, Python's venv module should allow this too.

    Basically, this allows one to run:

    python -mvenv --prompt Quux myenv

    And see "(Quux)" as a prefix after environment activation (instead of the "myenv" in this case).

    @matrixise
    Copy link
    Member

    matrixise commented Apr 16, 2015

    Based on the patch of Łukasz, I have updated it to the last revision of Python 3.5a3 (today, 16th April)

    stephane@sg1 ~/p/c/bin> ./python3.5 --version
    Python 3.5.0a3+
    stephane@sg1 ~/p/c/bin> ./python3.5
    Python 3.5.0a3+ (default:c969413584cf+, Apr 16 2015, 15:17:46)

    I tested the patch, this one works fine and the prompt is really changed if we specify it on the command line of -m venv

    @berkerpeksag
    Copy link
    Member

    berkerpeksag commented Apr 17, 2015

    Thanks! The patch looks good to me. Some review comments: http://bugs.python.org/review/22829/

    @berkerpeksag berkerpeksag added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Apr 17, 2015
    @matrixise
    Copy link
    Member

    matrixise commented Apr 17, 2015

    ok, I will propose an update with the comments of the review.

    @matrixise
    Copy link
    Member

    matrixise commented Nov 6, 2015

    oops, forgotten to provide the patch :/

    @matrixise
    Copy link
    Member

    matrixise commented Nov 6, 2015

    Hi @berker.peksag

    Please, could you review this patch, I have followed your remarks and adjust the patch.

    Thank you

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 6, 2016

    New changeset 6703847eeb31 by Vinay Sajip in branch 'default':
    Closes bpo-22829: Added --prompt option to venv.
    https://hg.python.org/cpython/rev/6703847eeb31

    @python-dev python-dev mannequin closed this as completed Aug 6, 2016
    @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 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants