GitPython 3.1.40__py3-none-any.whl → 3.1.41__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,5 +52,6 @@ Contributors are:
52
52
  -Joseph Hale <me _at_ jhale.dev>
53
53
  -Santos Gallegos <stsewd _at_ proton.me>
54
54
  -Wenhan Zhu <wzhu.cosmos _at_ gmail.com>
55
+ -Eliah Kagan <eliah.kagan _at_ gmail.com>
55
56
 
56
57
  Portions derived from other open source works and are clearly marked.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GitPython
3
- Version: 3.1.40
3
+ Version: 3.1.41
4
4
  Summary: GitPython is a Python library used to interact with Git repositories
5
5
  Home-page: https://github.com/gitpython-developers/GitPython
6
6
  Author: Sebastian Thiel, Michael Trier
7
7
  Author-email: byronimo@gmail.com, mtrier@gmail.com
8
- License: BSD
8
+ License: BSD-3-Clause
9
9
  Classifier: Development Status :: 5 - Production/Stable
10
10
  Classifier: Environment :: Console
11
11
  Classifier: Intended Audience :: Developers
@@ -35,11 +35,12 @@ Requires-Dist: coverage[toml] ; extra == 'test'
35
35
  Requires-Dist: ddt !=1.4.3,>=1.1.1 ; extra == 'test'
36
36
  Requires-Dist: mypy ; extra == 'test'
37
37
  Requires-Dist: pre-commit ; extra == 'test'
38
- Requires-Dist: pytest ; extra == 'test'
38
+ Requires-Dist: pytest >=7.3.1 ; extra == 'test'
39
39
  Requires-Dist: pytest-cov ; extra == 'test'
40
40
  Requires-Dist: pytest-instafail ; extra == 'test'
41
- Requires-Dist: pytest-subtests ; extra == 'test'
41
+ Requires-Dist: pytest-mock ; extra == 'test'
42
42
  Requires-Dist: pytest-sugar ; extra == 'test'
43
+ Requires-Dist: sumtypes ; extra == 'test'
43
44
  Requires-Dist: mock ; (python_version < "3.8") and extra == 'test'
44
45
 
45
46
  ![Python package](https://github.com/gitpython-developers/GitPython/workflows/Python%20package/badge.svg)
@@ -141,6 +142,20 @@ pip install -e ".[test]"
141
142
 
142
143
  In the less common case that you do not want to install test dependencies, `pip install -e .` can be used instead.
143
144
 
145
+ #### With editable *dependencies* (not preferred, and rarely needed)
146
+
147
+ In rare cases, you may want to work on GitPython and one or both of its [gitdb](https://github.com/gitpython-developers/gitdb) and [smmap](https://github.com/gitpython-developers/smmap) dependencies at the same time, with changes in your local working copy of gitdb or smmap immediatley reflected in the behavior of your local working copy of GitPython. This can be done by making editable installations of those dependencies in the same virtual environment where you install GitPython.
148
+
149
+ If you want to do that *and* you want the versions in GitPython's git submodules to be used, then pass `-e git/ext/gitdb` and/or `-e git/ext/gitdb/gitdb/ext/smmap` to `pip install`. This can be done in any order, and in separate `pip install` commands or the same one, so long as `-e` appears before *each* path. For example, you can install GitPython, gitdb, and smmap editably in the currently active virtual environment this way:
150
+
151
+ ```bash
152
+ pip install -e ".[test]" -e git/ext/gitdb -e git/ext/gitdb/gitdb/ext/smmap
153
+ ```
154
+
155
+ The submodules must have been cloned for that to work, but that will already be the case if you have run `./init-tests-after-clone.sh`. You can use `pip list` to check which packages are installed editably and which are installed normally.
156
+
157
+ To reiterate, this approach should only rarely be used. For most development it is preferable to allow the gitdb and smmap dependencices to be retrieved automatically from PyPI in their latest stable packaged versions.
158
+
144
159
  ### Limitations
145
160
 
146
161
  #### Leakage of System Resources
@@ -319,7 +334,7 @@ gpg --edit-key 4C08421980C9
319
334
 
320
335
  ### LICENSE
321
336
 
322
- [New BSD License](https://opensource.org/license/bsd-3-clause/). See the [LICENSE file][license].
337
+ [3-Clause BSD License](https://opensource.org/license/bsd-3-clause/), also known as the New BSD License. See the [LICENSE file][license].
323
338
 
324
339
  [contributing]: https://github.com/gitpython-developers/GitPython/blob/main/CONTRIBUTING.md
325
340
  [license]: https://github.com/gitpython-developers/GitPython/blob/main/LICENSE
@@ -0,0 +1,44 @@
1
+ git/__init__.py,sha256=tsqz7gpXuDRVq_4v32kxsNcSL8OpPLPhnNE6x5YWVek,3565
2
+ git/cmd.py,sha256=O7dS-QIt0CvrcP_8yfIjs1FkWCN40NLQ4PKCu9iN4GE,57713
3
+ git/compat.py,sha256=WGmGWAwpeLnp1hGwXkDm57hGjvd00mqhXXFXtoeAmRQ,3430
4
+ git/config.py,sha256=LPI99x5VU2W6Osr_0JfbIf8DQ41-Bckjd5QWpkeMy44,34541
5
+ git/db.py,sha256=pHczdHStrA7kDNlZXWkHtHdCm16dxomWP1caoiCd9qQ,2373
6
+ git/diff.py,sha256=C9IDk3DlvJSPqecTgW1znkP_17tb5Dw0A3zGTbcxFac,23583
7
+ git/exc.py,sha256=EdTxJ_TMRqN377xDHSJnKthlyd9bxP4lrtxmy_4nPgs,6990
8
+ git/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ git/remote.py,sha256=_wwAYyyHYB6M_IW0LY3xbJUHERV5h3tKPoQzcTPzA6k,45368
10
+ git/types.py,sha256=gOGkkEo6FV5caSfH1bpm4nvgavhSZuIoOyBnfydFQ14,3062
11
+ git/util.py,sha256=jPOEExcW9Dekccv6HIkMeDh0YAU5vf4NirlzsxvxpIU,42299
12
+ git/index/__init__.py,sha256=p2THvsiwJxsHfmZ8y1qgRQYyixUTjCqA7UvFU3x-Gj4,245
13
+ git/index/base.py,sha256=u7ZNDT_rrArRtMJdxWKUpGB548n9F_gsk98Cofe-WZM,58674
14
+ git/index/fun.py,sha256=15bHv4NGc7ix5mrBXdpcv45UtAeFTxiBl_0AaOiPUJI,16480
15
+ git/index/typ.py,sha256=YXcZkqj27zYyIIl63d6Ziy_HnaQfBYY7myx46gXwGDs,6399
16
+ git/index/util.py,sha256=m29sIVFrviQBVCNpm0wneyDT2_a42ZGuHuA9qfjKyAU,3807
17
+ git/objects/__init__.py,sha256=VCNAKk0DuLrDywRqpKvsclYPG3FQvvkfp2NKa5xvEtM,936
18
+ git/objects/base.py,sha256=5x8TiAstqVTfblTA8Rx9cOKf4OxRiEvVsxHyyok-zSo,7935
19
+ git/objects/blob.py,sha256=saOGrQIHLMIptPPtZW9bBorcKTCD0AJTph5ENXYqy2g,990
20
+ git/objects/commit.py,sha256=xSnO9k2Ol-lQaOhDqUig_MoVbVE0ciX1Fw0H4vnH61w,28991
21
+ git/objects/fun.py,sha256=AVuHV94BZzEvu9Bk1n-BKvBVt4qJr_-ajlLDMrZWFX8,8786
22
+ git/objects/tag.py,sha256=hJ54onZiN_phrx6OpB0aZUaaBtHJx-uTZrgP8f9FfWQ,3823
23
+ git/objects/tree.py,sha256=8l3ZN9LX3_yGq0gF_pCPv6SgTmv5_AIVbsfCXPUEiWE,14391
24
+ git/objects/util.py,sha256=6ixwVW_ZWoptjNuZB8WHCzqGunc-Z4m_nS98awkiAnQ,22908
25
+ git/objects/submodule/__init__.py,sha256=5hDkqdqcqYZ6cQXP4S8JQT7UBWnrbYzo7GrrEn8b_TI,227
26
+ git/objects/submodule/base.py,sha256=ohl5El3LyJ_J3_LhnpRWtv5fftLbApQl1iQYmou3I0E,61728
27
+ git/objects/submodule/root.py,sha256=3RWww-v-WxoI6ejLlzJsToVGQwO8j3Q3gSyjibf_JP4,19960
28
+ git/objects/submodule/util.py,sha256=T0JZAuxjWc7xvz37lnkOu60gDReC5Pmtvx98NYSQS20,3459
29
+ git/refs/__init__.py,sha256=2tQPcfYLW_o_-46vCax0VhvAE8KMsE2OquGJ7TVi1C0,435
30
+ git/refs/head.py,sha256=B3LunzZo3Ez8gOzwsYePDaW7PG7ZtxFcD55Uhb9h1oI,10095
31
+ git/refs/log.py,sha256=itRAZ-N-dT4FcoDrm1kBbCb4kI6727_CJQAEx8q1QKc,12072
32
+ git/refs/reference.py,sha256=MV2ASx1pzGY_VBJrOmZpWTyI0tOeuxuYVGinFh7PgLU,5622
33
+ git/refs/remote.py,sha256=wD_9tzh7LcHXy4ri9DugIVMhwHB8eBR1ygDxCnlWkPs,2779
34
+ git/refs/symbolic.py,sha256=9oBKCCoBLSWnEWdO1h9JiQLkhNRc4ShSukxJ3ZvLYq8,33371
35
+ git/refs/tag.py,sha256=XTJr--vJj2F__HvdtKmpyP1tJ1ADMY5evPLyrCjStTs,4547
36
+ git/repo/__init__.py,sha256=R88bSPa2-QCSwaCJ4fjWgiNPcneCFs1eajYI1R-apg0,212
37
+ git/repo/base.py,sha256=SOF2Xj3jEVKkujf6xJceZrN9DdPD6Thjc-ews2f29qY,56529
38
+ git/repo/fun.py,sha256=fxKH9TKKO3JY294V749V6nqriDmcfyEgJgJ-I5NQIrs,13083
39
+ GitPython-3.1.41.dist-info/AUTHORS,sha256=te58dvSkF-Ru6CFfw39VqZ0BP5IrCf_qobf7LiiM4RQ,2242
40
+ GitPython-3.1.41.dist-info/LICENSE,sha256=hvyUwyGpr7wRUUcTURuv3tIl8lEA3MD3NQ6CvCMbi-s,1503
41
+ GitPython-3.1.41.dist-info/METADATA,sha256=O2h4kXxWFoJHypZyGIzBW71W9PfEGxz9rX_RU-Oz2kI,14410
42
+ GitPython-3.1.41.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
43
+ GitPython-3.1.41.dist-info/top_level.txt,sha256=0hzDuIp8obv624V3GmbqsagBWkk8ohtGU-Bc1PmTT0o,4
44
+ GitPython-3.1.41.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
git/__init__.py CHANGED
@@ -1,69 +1,43 @@
1
- # __init__.py
2
1
  # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
3
2
  #
4
- # This module is part of GitPython and is released under
5
- # the BSD License: https://opensource.org/license/bsd-3-clause/
6
- # flake8: noqa
7
- # @PydevCodeAnalysisIgnore
8
- from git.exc import * # @NoMove @IgnorePep8
9
- import inspect
10
- import os
11
- import sys
12
- import os.path as osp
13
-
14
- from typing import Optional
15
- from git.types import PathLike
16
-
17
- __version__ = '3.1.40'
18
-
19
-
20
- # { Initialization
21
- def _init_externals() -> None:
22
- """Initialize external projects by putting them into the path"""
23
- if __version__ == '3.1.40' and "PYOXIDIZER" not in os.environ:
24
- sys.path.insert(1, osp.join(osp.dirname(__file__), "ext", "gitdb"))
25
-
26
- try:
27
- import gitdb
28
- except ImportError as e:
29
- raise ImportError("'gitdb' could not be found in your PYTHONPATH") from e
30
- # END verify import
3
+ # This module is part of GitPython and is released under the
4
+ # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
31
5
 
6
+ # @PydevCodeAnalysisIgnore
32
7
 
33
- # } END initialization
34
-
8
+ __version__ = '3.1.41'
35
9
 
36
- #################
37
- _init_externals()
38
- #################
10
+ from typing import List, Optional, Sequence, Tuple, Union, TYPE_CHECKING
39
11
 
40
- # { Imports
12
+ from gitdb.util import to_hex_sha
13
+ from git.exc import * # noqa: F403 # @NoMove @IgnorePep8
14
+ from git.types import PathLike
41
15
 
42
16
  try:
17
+ from git.compat import safe_decode # @NoMove @IgnorePep8
43
18
  from git.config import GitConfigParser # @NoMove @IgnorePep8
44
- from git.objects import * # @NoMove @IgnorePep8
45
- from git.refs import * # @NoMove @IgnorePep8
46
- from git.diff import * # @NoMove @IgnorePep8
47
- from git.db import * # @NoMove @IgnorePep8
19
+ from git.objects import * # noqa: F403 # @NoMove @IgnorePep8
20
+ from git.refs import * # noqa: F403 # @NoMove @IgnorePep8
21
+ from git.diff import * # noqa: F403 # @NoMove @IgnorePep8
22
+ from git.db import * # noqa: F403 # @NoMove @IgnorePep8
48
23
  from git.cmd import Git # @NoMove @IgnorePep8
49
24
  from git.repo import Repo # @NoMove @IgnorePep8
50
- from git.remote import * # @NoMove @IgnorePep8
51
- from git.index import * # @NoMove @IgnorePep8
25
+ from git.remote import * # noqa: F403 # @NoMove @IgnorePep8
26
+ from git.index import * # noqa: F403 # @NoMove @IgnorePep8
52
27
  from git.util import ( # @NoMove @IgnorePep8
53
28
  LockFile,
54
29
  BlockingLockFile,
55
30
  Stats,
56
31
  Actor,
32
+ remove_password_if_present,
57
33
  rmtree,
58
34
  )
59
- except GitError as _exc:
35
+ except GitError as _exc: # noqa: F405
60
36
  raise ImportError("%s: %s" % (_exc.__class__.__name__, _exc)) from _exc
61
37
 
62
- # } END imports
63
-
64
38
  # __all__ must be statically defined by py.typed support
65
39
  # __all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))]
66
- __all__ = [
40
+ __all__ = [ # noqa: F405
67
41
  "Actor",
68
42
  "AmbiguousObjectName",
69
43
  "BadName",
@@ -152,7 +126,7 @@ def refresh(path: Optional[PathLike] = None) -> None:
152
126
 
153
127
  if not Git.refresh(path=path):
154
128
  return
155
- if not FetchInfo.refresh():
129
+ if not FetchInfo.refresh(): # noqa: F405
156
130
  return # type: ignore [unreachable]
157
131
 
158
132
  GIT_OK = True