Skip to content

venv activate bash script has wrong line endings on windows #87603

Closed

Description

@jmoguill2
mannequin
BPO 43437
Nosy @pfmoore, @tjguk, @zware, @eryksun, @zooba
Superseder
  • bpo-32451: venv activate bash script has wrong line endings in Windows
  • 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 2021-03-17.19:58:00.978>
    created_at = <Date 2021-03-08.18:16:59.923>
    labels = ['3.8', '3.9', '3.10', 'build', 'library', 'OS-windows']
    title = 'venv activate bash script has wrong line endings on windows'
    updated_at = <Date 2021-03-17.19:58:00.977>
    user = 'https://bugs.python.org/jmoguill2'

    bugs.python.org fields:

    activity = <Date 2021-03-17.19:58:00.977>
    actor = 'eryksun'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-03-17.19:58:00.978>
    closer = 'eryksun'
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2021-03-08.18:16:59.923>
    creator = 'jmoguill2'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43437
    keywords = []
    message_count = 2.0
    messages = ['388276', '388296']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'eryksun', 'steve.dower', 'jmoguill2']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '32451'
    type = 'compile error'
    url = 'https://bugs.python.org/issue43437'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. jmoguill2 commented on Mar 8, 2021

      jmoguill2mannequin
      MannequinAuthor

      when running python.exe -m venv on Windows,
      It creates several activate scripts.
      The activate bash script has the wrong line endings (it should be unix-style, not windows-style).
      Bash scripts should always end with unix style line endings

    2. eryksun commented on Mar 8, 2021

      @eryksun
      Contributor

      venv copies the scripts in binary mode, but apparently the Unix "activate" script already has CRLF line endings when Python is installed in Windows. Probably the POSIX "Lib/venv/scripts/common/activate" script needs a line-ending exception in ".gitattributes":

      https://github.com/python/cpython/blob/master/.gitattributes

    3. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Mar 8, 2021
    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifeOS-windowsbuildThe build process and cross-buildstdlibStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions