GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a note to the `venv` documentation that users should **not** put their code _inside_ the virtual environment · Issue #109414 · python/cpython

Add a note to the venv documentation that users should **not** put their code _inside_ the virtual environment #109414

New issue
Copy link
New issue
Copy link
Closed
Closed
Add a note to the venv documentation that users should **not** put their code _inside_ the virtual environment#109414
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@brettcannon
brettcannon
opened on Sep 14, 2023
Issue body actions

Documentation

The venv docs don't explicitly call out that the virtual environment directory should be viewed as self-contained unit and not as a directory to place one's own code.

Linked PRs

  • gh-109414: Add some basic information about venvs in the introduction. #109440
  • [3.11] gh-109414: Add some basic information about venvs in the introduction. (GH-109440) #109480
  • [3.12] gh-109414: Add some basic information about venvs in the introduction. (GH-109440) #109481

Activity

  1. brettcannon
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Sep 14, 2023
  2. brettcannon commented on Sep 14, 2023

    @brettcannon
    brettcannon
    on Sep 14, 2023
    MemberAuthor
    More actions

    /cc @vsajip

  3. vsajip commented on Sep 14, 2023

    @vsajip
    vsajip
    on Sep 14, 2023
    Member
    More actions

    There is an admonition:

    Because of this, environments are inherently non-portable, in the general case. You should always have a simple means of recreating an environment (for example, if you have a requirements file requirements.txt, you can invoke pip install -r requirements.txt using the environment’s pip to install all of the packages needed by the environment).

    I don't object to adding more information, but doesn't this

    virtual environment directory ... and not as a directory to place one's own code.

    come under the "bleedin' obvious" category?

  4. brettcannon commented on Sep 14, 2023

    @brettcannon
    brettcannon
    on Sep 14, 2023
    MemberAuthor
    More actions

    doesn't this

    virtual environment directory ... and not as a directory to place one's own code.

    come under the "bleedin' obvious" category?

    That's what I thought, but based on https://mastodon.social/@fschulze/111053590685791015 and the amount of people we are running into with VS Code who are getting upset we don't format code we find in a virtual environment because we treat it as outside of a user's domain, it apparently isn't getting out enough into the general community.

  5. vsajip
    added 2 commits that reference this issue on Sep 15, 2023

    pythongh-109414: Add some basic information about venvs in the introd…

    5450d88

    gh-109414: Add some basic information about venvs in the introduction. (

    a6846d4
  6. miss-islington
    added 2 commits that reference this issue on Sep 16, 2023

    pythongh-109414: Add some basic information about venvs in the introd…

    0d584d7

    pythongh-109414: Add some basic information about venvs in the introd…

    fbe857c
  7. vsajip
    added a commit that references this issue on Sep 16, 2023

    [3.11] gh-109414: Add some basic information about venvs in the intro…

    e16a9af
  8. Yhg1s
    added a commit that references this issue on Sep 17, 2023

    [3.12] gh-109414: Add some basic information about venvs in the intro…

    6552879
  9. vsajip
    closed this as completedon Sep 17, 2023
  10. csm10495
    added a commit that references this issue on Sep 28, 2023

    pythongh-109414: Add some basic information about venvs in the introd…

    b7ff008
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

    docsDocumentation in the Doc dirDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.