Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork944
Commitc8ad3a3
committed
Deprecate public access to typing imports in git
This adds comments to entries in git.__all__ for each of theentries that come from the standard library typing module, notingthem as deprecated.These imports were included in __all__ inadvertently due to theway __all__ was dynamically constructed, and placed in __all__explicitly when __all__ became static in#1659. They are there forbackward compatibility, in case some code relies on them beingthere. But a module is unlikely to rely intentionally on the gitmodule providing them, since they are not conceptually related toGitPython.`from git import *` should not typically be used, since wildcardimports are not generally recommended, as discussed in PEP-8. Butif someone does choose to use it, they would probably benefit lessfrom DeprecationWarning being issued for each of those names thanthey would usually benefit from DeprecationWarning. This could leadto developers deciding not to enable DeprecationWarning when it mayotherwise be useful. For this reason, no attempt is currently madeto issue DeprecationWarning when those names are accessed asattributes of the git module.1 parente49327d commitc8ad3a3
1 file changed
+6
-6
lines changedLines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
| 41 | + | |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
| 61 | + | |
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 |
| - | |
| 66 | + | |
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 |
| - | |
73 |
| - | |
| 72 | + | |
| 73 | + | |
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
|
0 commit comments
Comments
(0)