Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork960
Commit1b2d3f0
committed
__init__: don't run refresh on import
Consumers of gitpython may not need to use it in all use cases, and maywant to be able to run (without using gitpython) in environments wheregit is not available on PATH. While this can be worked around by settingthe GIT_PYTHON_REFRESH environment variable, adding special handling forgitpython means that it can't be imported just like everything else inan import block at the top of the module, and environment variables havepotentially undesired propagation behaviour.Previously, it was also nontrivial to distinguish gitpython failing toimport because of missing git or because e.g. gitpython isn't installedat all, because the exception that's raised is an ImportError withoutfurther qualification (except in the error message).Thus, we now no longer perform `refresh` at the module top level.1 parent2d4c541 commit1b2d3f0
3 files changed
+17
-5
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
5 | 18 |
| |
6 | 19 |
| |
7 | 20 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 |
| - | |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 | 295 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + |
0 commit comments
Comments
(0)