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

Never modify sys.path #1720

Merged
merged 2 commits into from
Oct 20, 2023
Merged

Never modify sys.path #1720

merged 2 commits into from
Oct 20, 2023

Commits on Oct 20, 2023

  1. Never modify sys.path

    This removes the logic that, under some (most) circumstances when
    not using a version from PyPI, would insert the location of the
    gitdb git-submodule near the front of sys.path.
    
    (As noted in gitpython-developers#1717, the specific way this was being done was not
    causing the git-submodule's version of gitdb to actually be used.
    But it was still modifying sys.path, which this now prevents.)
    
    The installation test, which had verified the insertion into
    sys.path, is modified accordingly, except that for now the check
    that the very first sys.path entry is undisturbed is kept in place.
    EliahKagan committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    00aee49 View commit details
    Browse the repository at this point in the history
  2. Document how to use vendored dependencies

    This adds a subsection to the end of the installation instructions
    in the readme to explain how to cause the versions of the gitdb
    and/or smmap dependencies that are vendored as submodules of the
    GitPython repository to be used, instead of the PyPI versions, in
    the infrequent case that this is desired.
    
    This goes along with he removal of the logic that conditionally
    modified sys.path, since that logic was intended to facilitate this
    (and at one time had). The approach now documented in the readme
    uses editable installs and does not involve modifying sys.path.
    
    Because the need for this is uncommon, it may end up being moved
    entirely into documentation in the doc/ directory in the future.
    EliahKagan committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    610c46d View commit details
    Browse the repository at this point in the history