-
-
Notifications
You must be signed in to change notification settings - Fork 935
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ef46f97
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 00aee49
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 5 commits
- 4 files changed
- 2 contributors
Commits on Oct 20, 2023
-
Remove now-unused import in top-level __init__.py
The inspect module was only used to dynamically generate __all__, which is statically written since c862845. Although it includes everything it originally had for compatibility (8edc53b), this did not include modules, since the comprehension used to generate it omitted those (which is what it needed the inspect module for). So it was not, and is not, listed in __all__, and can be removed.
Configuration menu - View commit details
-
Copy full SHA for 8197e90 - Browse repository at this point
Copy the full SHA 8197e90View commit details -
Add __all__ in git.exc, adjust __init__.py imports
The git.exc module imports exceptions from gitdb.exc to republish them, as well as defining its own (also for use from outside). But because it did not define __all__, the intent for the exceptions it imported was unclear, since names that are introduced by imports and not present in __all__ are not generally considered public, even when __all__ is absent and a "*" import would reimport them. This rectifies that by adding __all__ and listing both imported and newly introduced exceptions explicitly in it. Although this strictly expands which names are public under typical conventions, it strictly contracts which names are imported by a "*" import, because the presence of __all__ suppresses names not listed in it from being imported that way. However, because under typical conventions those other names are not considered public, and they were not even weakly documented as public, this should be okay. (Even though this is not a breaking change, in that code it would break would already technically be broken... if it turns out that it is common to wrongly rely on the availabiliy of those names, then this may need to be revisited and slightly modified.) This brings the readily identified public interface of git.exc in line with what is weakly implied (and intended) by its docstring. This also modifies __init__.py accordingly: The top-level git module has for some time used a "*" import on git.exc, causing the extra names originally meant as implementation details to be included. Because its own __all__ was dynamically generated until c862845, #1659 also added 8edc53b to retain the formerly present names in __all__. So the change here imports those names from the modules that deliberately provide them, to preserve compatibility.
Configuration menu - View commit details
-
Copy full SHA for 7545b80 - Browse repository at this point
Copy the full SHA 7545b80View commit details -
Remove
@UnusedImport
from an import that is usedInclusion in __all__ is considered a use.
Configuration menu - View commit details
-
Copy full SHA for 2af3679 - Browse repository at this point
Copy the full SHA 2af3679View commit details -
Merge pull request #1719 from EliahKagan/static-all
Add `__all__` in git.exc
Configuration menu - View commit details
-
Copy full SHA for df777fd - Browse repository at this point
Copy the full SHA df777fdView commit details -
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 #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.
Configuration menu - View commit details
-
Copy full SHA for 00aee49 - Browse repository at this point
Copy the full SHA 00aee49View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff ef46f97...00aee49