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

Support PEP 405 include-system-site-packages configuration #7155

Merged
merged 8 commits into from
Nov 6, 2019

Commits on Nov 5, 2019

  1. Factor out running_under_virtualenv conditionals

    Why: This would allow for use in an updated `virtualenv_no_global` that
    supports PEP 405 virtual environments.
    pradyunsg committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    1b9c9e2 View commit details
    Browse the repository at this point in the history
  2. Refactor virtualenv_no_global

    Why: This change makes it easier to introduce handling for PEP 405 based
    virtual environment's global site-package exclusion logic
    pradyunsg committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    fd7c9b7 View commit details
    Browse the repository at this point in the history
  3. Correctly ignore system site-packages for venv

    Why: PEP 405 virtual environments have a different mechanism for
    ignoring system site-packages in virtual environments.
    pradyunsg committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    1aee0eb View commit details
    Browse the repository at this point in the history
  4. 📰

    pradyunsg committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    762ffd5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fe9ae3b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5332ec5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    57d34e0 View commit details
    Browse the repository at this point in the history
  8. Skip all failing tests when using venv

    Our isolation logic for venv isn't correct and that is causing these
    tests to fail. The culprits for this are:
    
      tests/lib/venv.py::VirtualEnvironment.user_site_packages
      tests/lib/venv.py::VirtualEnvironment.sitecustomize
    
    Both these together are supposed to create an environment to isolate the
    tests. However, they were written for virtualenv and make assumptions
    that are not true for environments created with venv. Until we can fix
    VirtualEnvironment to properly isolate the test from the underlying test
    environment when using venv, these tests will continue to fail.
    
    This is blocking an important bugfix for users facing issues with since
    pip is installing packages into `--user` when run in a venv, even when
    `--user` isn't visible from that environment.
    
    As a temporary band-aid for this problem, I'm skipping these tests to
    unblock us from shipping the bugfix for the aforementioned issue.
    
    The test isolation logic should be fixed to work for venv. Once such a
    fix is made, this commit should be reverted.
    pradyunsg committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    8981895 View commit details
    Browse the repository at this point in the history