Skip to content

venv module doesn't create a copy of python binary by default #79631

Closed

Description

@mkkot
mannequin
BPO 35450
Nosy @brettcannon, @terryjreedy, @vsajip, @csabella, @miss-islington, @mkkot
PRs
  • bpo-35450: reflect in docs that venv module is not always creating a … #11144
  • [3.7] bpo-35450: reflect in docs that venv module is not always creating a … (GH-11144) #11167
  • [3.6] bpo-35450: reflect in docs that venv module is not always creating a … (GH-11144) #11168
  • 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 2018-12-15.13:49:17.178>
    created_at = <Date 2018-12-09.18:05:37.447>
    labels = ['3.7', '3.8', 'docs']
    title = "venv module doesn't create a copy of python binary by default"
    updated_at = <Date 2018-12-15.13:49:17.176>
    user = 'https://github.com/mkkot'

    bugs.python.org fields:

    activity = <Date 2018-12-15.13:49:17.176>
    actor = 'cheryl.sabella'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2018-12-15.13:49:17.178>
    closer = 'cheryl.sabella'
    components = ['Documentation']
    creation = <Date 2018-12-09.18:05:37.447>
    creator = 'mkkot'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35450
    keywords = ['patch']
    message_count = 10.0
    messages = ['331445', '331648', '331649', '331766', '331865', '331866', '331867', '331869', '331877', '331901']
    nosy_count = 7.0
    nosy_names = ['brett.cannon', 'terry.reedy', 'vinay.sajip', 'docs@python', 'cheryl.sabella', 'miss-islington', 'mkkot']
    pr_nums = ['11144', '11167', '11168']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35450'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Activity

    1. mkkot commented on Dec 9, 2018

      mkkotmannequin
      MannequinAuthor

      Hello,
      from documentation:
      https://docs.python.org/3/library/venv.html

      "python3 -m venv /path/to/new/virtual/environment

      Running this command creates the target directory (creating any parent directories that don’t exist already) and places a pyvenv.cfg file in it with a home key pointing to the Python installation from which the command was run. It also creates a bin (or Scripts on Windows) subdirectory containing **a copy** of the python binary (or binaries, in the case of Windows)."

      This is not true. In my case it creates symlinks to python binary by default. This is quite different. Upgrading system's python version broke my virtual environment because I believed I'm having a static copy of python binary in my virtual environment.

    2. added
      docsDocumentation in the Doc dir
      on Dec 9, 2018
    3. brettcannon commented on Dec 11, 2018

      @brettcannon
      Member

      Correct, that should say something like "copy/symlink of the Python binary/binaries (as appropriate by the platform or arguments used at environment creation time)."

    4. brettcannon commented on Dec 11, 2018

      @brettcannon
      Member

      Obviously if you're willing to create a PR, Marcin, that would be great!

    5. mkkot commented on Dec 13, 2018

      mkkotmannequin
      MannequinAuthor

      I'm very honoured with your request. Doing this for the first time with Python, hope you can accept it despite warnings.

      #11144

    6. miss-islington commented on Dec 14, 2018

      @miss-islington
      Contributor

      New changeset f5107df by Miss Islington (bot) (mkkot) in branch 'master':
      bpo-35450: reflect in docs that venv module is not always creating a … (GH-11144)
      f5107df

    7. brettcannon commented on Dec 14, 2018

      @brettcannon
      Member

      New changeset 1fb312c by Brett Cannon (Miss Islington (bot)) in branch '3.6':
      bpo-35450: reflect in docs that venv module is not always creating a copy of the Python binary (GH-11144) (GH-11168)
      1fb312c

    8. brettcannon commented on Dec 14, 2018

      @brettcannon
      Member

      New changeset d5176fe by Brett Cannon (Miss Islington (bot)) in branch '3.7':
      bpo-35450: reflect in docs that venv module is not always creating a copy of the Python binary (GH-11144) (GH-11167)
      d5176fe

    9. terryjreedy commented on Dec 14, 2018

      @terryjreedy
      Member

      Close this?

    10. mkkot commented on Dec 14, 2018

      mkkotmannequin
      MannequinAuthor

      Actually the documentation hasn't been regenerated yet. I hope it will over night?

    11. csabella commented on Dec 15, 2018

      @csabella
      Contributor

      It looks like the documentation has regenerated. Thanks!

    12. 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.7 (EOL)end of life3.8 (EOL)end of lifedocsDocumentation in the Doc dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions