Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate public access to typing imports in git
This adds comments to entries in git.__all__ for each of the entries that come from the standard library typing module, noting them as deprecated. These imports were included in __all__ inadvertently due to the way __all__ was dynamically constructed, and placed in __all__ explicitly when __all__ became static in gitpython-developers#1659. They are there for backward compatibility, in case some code relies on them being there. But a module is unlikely to rely intentionally on the git module providing them, since they are not conceptually related to GitPython. `from git import *` should not typically be used, since wildcard imports are not generally recommended, as discussed in PEP-8. But if someone does choose to use it, they would probably benefit less from DeprecationWarning being issued for each of those names than they would usually benefit from DeprecationWarning. This could lead to developers deciding not to enable DeprecationWarning when it may otherwise be useful. For this reason, no attempt is currently made to issue DeprecationWarning when those names are accessed as attributes of the git module.
- Loading branch information