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 support for csh and fish in venv activation scripts #59622

Closed
asvetlov opened this issue Jul 22, 2012 · 6 comments
Closed

Add support for csh and fish in venv activation scripts #59622

asvetlov opened this issue Jul 22, 2012 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@asvetlov
Copy link
Contributor

BPO 15417
Nosy @vsajip, @carljm, @asvetlov
Files
  • issue15417.diff
  • 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/asvetlov'
    closed_at = <Date 2012-10-04.18:50:27.570>
    created_at = <Date 2012-07-22.00:04:37.878>
    labels = ['library']
    title = 'Add support for csh and fish in venv activation scripts'
    updated_at = <Date 2012-10-04.18:50:27.569>
    user = 'https://github.com/asvetlov'

    bugs.python.org fields:

    activity = <Date 2012-10-04.18:50:27.569>
    actor = 'asvetlov'
    assignee = 'asvetlov'
    closed = True
    closed_date = <Date 2012-10-04.18:50:27.570>
    closer = 'asvetlov'
    components = ['Library (Lib)']
    creation = <Date 2012-07-22.00:04:37.878>
    creator = 'asvetlov'
    dependencies = []
    files = ['26474']
    hgrepos = []
    issue_num = 15417
    keywords = ['patch', 'needs review']
    message_count = 6.0
    messages = ['166091', '166092', '166229', '166233', '166236', '171986']
    nosy_count = 4.0
    nosy_names = ['vinay.sajip', 'carljm', 'asvetlov', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue15417'
    versions = ['Python 3.4']

    @asvetlov asvetlov added the stdlib Python modules in the Lib dir label Jul 22, 2012
    @asvetlov
    Copy link
    Contributor Author

    I have added required shell files

    @asvetlov
    Copy link
    Contributor Author

    No idea if Doc/using/venv-create.inc should be updated to reflect support of new shells.

    virtualenv does nothing in own documentation btw.

    @vsajip
    Copy link
    Member

    vsajip commented Jul 23, 2012

    I have no objection in principle to supporting additional shells, but do have the following comments/questions:

    1. Georg feels that this is a new feature he doesn't want to add to 3.3. IMO we have to respect his judgement as RM, no matter how trivial the change might seem. It's more about the discipline of the process than it is about any one specific change.

    2. Where do we draw the line in terms of support for ("arbitrary") shells? Each activation script will potentially need maintenance into the future. It was originally envisaged that the stdlib code would add minimal support for activation scripts and that third-party tools would add support for additional shells and other value-adding features. The venv API design was intended to facilitate usage by third-party code.

    @asvetlov
    Copy link
    Contributor Author

    1. I agree with you about exclusion from 3.3.

    2. Hmm. Good question. For now virtualenv has support for cmd.exe, csh, fish, bash/zsh and PowerShell.
      I propose to add csh and fish to venv too.
      If later somebody will push request for adding yet another shell support we can consider it. Personally I doubt if we will see many requests for that.

    3. Which standard way to append new activation script in third-party tool? I see th only way: inherit from venv.EnvBuilder and override setup_scripts method pointing to new directory with desired activators as path parameter for self.install_scripts(...).
      Also that third-party tool have to reimplement functionality of create and main functions with setting up ArgumentParser. Doesn't look like trivial steps if you wish to just add single activation script.

    @vsajip
    Copy link
    Member

    vsajip commented Jul 23, 2012

    inherit from venv.EnvBuilder and override setup_scripts method
    pointing to new directory with desired activators as path parameter
    for self.install_scripts(...).

    Yes, that's it. A third party tool would potentially do more than just custom scripts, and would presumably have its own command line parameters and handling code, reflecting the features it offers.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 4, 2012

    New changeset c519b490f4e4 by Andrew Svetlov in branch 'default':
    Issue bpo-15417: Add support for csh and fish in venv activation scripts.
    http://hg.python.org/cpython/rev/c519b490f4e4

    @asvetlov asvetlov closed this as completed Oct 4, 2012
    @asvetlov asvetlov self-assigned this Oct 4, 2012
    @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