|
144 | 144 | SymbolicReference,
|
145 | 145 | Tag,
|
146 | 146 | TagReference,
|
| 147 | + head, # noqa: F401 # Nonpublic. May disappear! Use git.refs.head. |
| 148 | + log, # noqa: F401 # Nonpublic. May disappear! Use git.refs.log. |
| 149 | + reference, # noqa: F401 # Nonpublic. May disappear! Use git.refs.reference. |
| 150 | + symbolic, # noqa: F401 # Nonpublic. May disappear! Use git.refs.symbolic. |
| 151 | + tag, # noqa: F401 # Nonpublic. May disappear! Use git.refs.tag. |
147 | 152 | )
|
148 | 153 | from git.diff import ( # @NoMove
|
149 | 154 | INDEX,
|
|
164 | 169 | IndexEntry,
|
165 | 170 | IndexFile,
|
166 | 171 | StageType,
|
167 |
| - util, # noqa: F401 # For backward compatibility. |
| 172 | + base, # noqa: F401 # Nonpublic. May disappear! Use git.index.base. |
| 173 | + fun, # noqa: F401 # Nonpublic. May disappear! Use git.index.fun. |
| 174 | + typ, # noqa: F401 # Nonpublic. May disappear! Use git.index.typ. |
| 175 | + # |
| 176 | + # NOTE: The expression `git.util` evaluates to git.index.util, and the import |
| 177 | + # `from git import util` imports git.index.util, NOT git.util. It may not be |
| 178 | + # feasible to change this until the next major version, to avoid breaking code |
| 179 | + # inadvertently relying on it. If git.index.util really is what you want, use or |
| 180 | + # import from that name, to avoid confusion. To use the "real" git.util module, |
| 181 | + # write `from git.util import ...`, or access it as `sys.modules["git.util"]`. |
| 182 | + # (This differs from other historical indirect-submodule imports that are |
| 183 | + # unambiguously nonpublic and are subject to immediate removal. Here, the public |
| 184 | + # git.util module, even though different, makes it less discoverable that the |
| 185 | + # expression `git.util` refers to a non-public attribute of the git module.) |
| 186 | + util, # noqa: F401 |
168 | 187 | )
|
169 | 188 | from git.util import ( # @NoMove
|
170 | 189 | Actor,
|
|
0 commit comments