GitPython 3.1.34__tar.gz → 3.1.36__tar.gz
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.
- {GitPython-3.1.34 → GitPython-3.1.36}/AUTHORS +1 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/GitPython.egg-info/PKG-INFO +92 -27
- GitPython-3.1.36/GitPython.egg-info/requires.txt +15 -0
- GitPython-3.1.34/README.md → GitPython-3.1.36/PKG-INFO +120 -26
- GitPython-3.1.34/PKG-INFO → GitPython-3.1.36/README.md +78 -55
- GitPython-3.1.36/VERSION +1 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/changes.rst +14 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/__init__.py +2 -2
- {GitPython-3.1.34 → GitPython-3.1.36}/git/cmd.py +4 -5
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/submodule/base.py +4 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/symbolic.py +2 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/util.py +16 -1
- {GitPython-3.1.34 → GitPython-3.1.36}/pyproject.toml +1 -1
- {GitPython-3.1.34 → GitPython-3.1.36}/setup.py +7 -4
- {GitPython-3.1.34 → GitPython-3.1.36}/test-requirements.txt +3 -9
- GitPython-3.1.34/GitPython.egg-info/requires.txt +0 -4
- GitPython-3.1.34/VERSION +0 -1
- {GitPython-3.1.34 → GitPython-3.1.36}/CHANGES +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/CONTRIBUTING.md +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/GitPython.egg-info/SOURCES.txt +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/GitPython.egg-info/dependency_links.txt +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/GitPython.egg-info/not-zip-safe +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/GitPython.egg-info/top_level.txt +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/LICENSE +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/MANIFEST.in +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/.gitignore +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/Makefile +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/requirements.txt +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/conf.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/index.rst +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/intro.rst +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/quickstart.rst +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/reference.rst +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/roadmap.rst +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/doc/source/tutorial.rst +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/compat.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/config.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/db.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/diff.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/exc.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/index/__init__.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/index/base.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/index/fun.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/index/typ.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/index/util.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/__init__.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/base.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/blob.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/commit.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/fun.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/submodule/__init__.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/submodule/root.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/submodule/util.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/tag.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/tree.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/objects/util.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/py.typed +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/__init__.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/head.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/log.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/reference.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/remote.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/refs/tag.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/remote.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/repo/__init__.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/repo/base.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/repo/fun.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/git/types.py +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/requirements.txt +0 -0
- {GitPython-3.1.34 → GitPython-3.1.36}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: GitPython
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.36
|
|
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
|
|
@@ -22,10 +22,23 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
26
|
Requires-Python: >=3.7
|
|
26
27
|
Description-Content-Type: text/markdown
|
|
27
28
|
License-File: LICENSE
|
|
28
29
|
License-File: AUTHORS
|
|
30
|
+
Requires-Dist: gitdb<5,>=4.0.1
|
|
31
|
+
Requires-Dist: typing-extensions>=3.7.4.3; python_version < "3.8"
|
|
32
|
+
Provides-Extra: test
|
|
33
|
+
Requires-Dist: black; extra == "test"
|
|
34
|
+
Requires-Dist: coverage[toml]; extra == "test"
|
|
35
|
+
Requires-Dist: ddt!=1.4.3,>=1.1.1; extra == "test"
|
|
36
|
+
Requires-Dist: mypy; extra == "test"
|
|
37
|
+
Requires-Dist: pre-commit; extra == "test"
|
|
38
|
+
Requires-Dist: pytest; extra == "test"
|
|
39
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
40
|
+
Requires-Dist: pytest-sugar; extra == "test"
|
|
41
|
+
Requires-Dist: virtualenv; extra == "test"
|
|
29
42
|
|
|
30
43
|

|
|
31
44
|
[](https://readthedocs.org/projects/gitpython/?badge=stable)
|
|
@@ -78,30 +91,51 @@ The installer takes care of installing them for you.
|
|
|
78
91
|
|
|
79
92
|
### INSTALL
|
|
80
93
|
|
|
81
|
-
|
|
94
|
+
GitPython and its required package dependencies can be installed in any of the following ways, all of which should typically be done in a [virtual environment](https://docs.python.org/3/tutorial/venv.html).
|
|
82
95
|
|
|
83
|
-
|
|
84
|
-
python setup.py install
|
|
85
|
-
```
|
|
96
|
+
#### From PyPI
|
|
86
97
|
|
|
87
|
-
|
|
98
|
+
To obtain and install a copy [from PyPI](https://pypi.org/project/GitPython/), run:
|
|
88
99
|
|
|
89
100
|
```bash
|
|
90
101
|
pip install GitPython
|
|
91
102
|
```
|
|
92
103
|
|
|
93
|
-
|
|
104
|
+
(A distribution package can also be downloaded for manual installation at [the PyPI page](https://pypi.org/project/GitPython/).)
|
|
105
|
+
|
|
106
|
+
#### From downloaded source code
|
|
107
|
+
|
|
108
|
+
If you have downloaded the source code, run this from inside the unpacked `GitPython` directory:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install .
|
|
112
|
+
```
|
|
94
113
|
|
|
95
|
-
|
|
114
|
+
#### By cloning the source code repository
|
|
96
115
|
|
|
97
|
-
|
|
116
|
+
To clone the [the GitHub repository](https://github.com/gitpython-developers/GitPython) from source to work on the code, you can do it like so:
|
|
98
117
|
|
|
99
118
|
```bash
|
|
100
119
|
git clone https://github.com/gitpython-developers/GitPython
|
|
101
|
-
|
|
120
|
+
cd GitPython
|
|
121
|
+
git fetch --tags
|
|
102
122
|
./init-tests-after-clone.sh
|
|
103
123
|
```
|
|
104
124
|
|
|
125
|
+
If you are cloning [your own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks), then replace the above `git clone` command with one that gives the URL of your fork. Or use this [`gh`](https://cli.github.com/) command (assuming you have `gh` and your fork is called `GitPython`):
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
gh repo clone GitPython
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Having cloned the repo, create and activate your [virtual environment](https://docs.python.org/3/tutorial/venv.html). Then make an [editable install](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs):
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install -e ".[test]"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
In the less common case that you do not want to install test dependencies, `pip install -e .` can be used instead.
|
|
138
|
+
|
|
105
139
|
### Limitations
|
|
106
140
|
|
|
107
141
|
#### Leakage of System Resources
|
|
@@ -122,28 +156,57 @@ See [Issue #525](https://github.com/gitpython-developers/GitPython/issues/525).
|
|
|
122
156
|
|
|
123
157
|
### RUNNING TESTS
|
|
124
158
|
|
|
125
|
-
_Important_: Right after cloning this repository, please be sure to have
|
|
126
|
-
the `./init-tests-after-clone.sh`
|
|
127
|
-
you will encounter test failures.
|
|
159
|
+
_Important_: Right after cloning this repository, please be sure to have
|
|
160
|
+
executed `git fetch --tags` followed by the `./init-tests-after-clone.sh`
|
|
161
|
+
script in the repository root. Otherwise you will encounter test failures.
|
|
128
162
|
|
|
129
163
|
On _Windows_, make sure you have `git-daemon` in your PATH. For MINGW-git, the `git-daemon.exe`
|
|
130
164
|
exists in `Git\mingw64\libexec\git-core\`; CYGWIN has no daemon, but should get along fine
|
|
131
165
|
with MINGW's.
|
|
132
166
|
|
|
133
|
-
|
|
134
|
-
In the root directory, run: `pip install -r test-requirements.txt`
|
|
167
|
+
#### Install test dependencies
|
|
135
168
|
|
|
136
|
-
|
|
169
|
+
Ensure testing libraries are installed. This is taken care of already if you installed with:
|
|
137
170
|
|
|
138
|
-
|
|
171
|
+
```bash
|
|
172
|
+
pip install -e ".[test]"
|
|
173
|
+
```
|
|
139
174
|
|
|
140
|
-
|
|
175
|
+
Otherwise, you can run:
|
|
141
176
|
|
|
142
|
-
|
|
177
|
+
```bash
|
|
178
|
+
pip install -r test-requirements.txt
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### Test commands
|
|
182
|
+
|
|
183
|
+
To test, run:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
pytest
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
To lint, run:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
pre-commit run --all-files
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
To typecheck, run:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
mypy -p git
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
For automatic code formatting, run:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
black git
|
|
205
|
+
```
|
|
143
206
|
|
|
144
|
-
Configuration for flake8 is in the
|
|
207
|
+
Configuration for flake8 is in the `./.flake8` file.
|
|
145
208
|
|
|
146
|
-
Configurations for mypy
|
|
209
|
+
Configurations for `mypy`, `pytest`, `coverage.py`, and `black` are in `./pyproject.toml`.
|
|
147
210
|
|
|
148
211
|
The same linting and testing will also be performed against different supported python versions
|
|
149
212
|
upon submitting a pull request (or on each push if you have a fork with a "main" branch and actions enabled).
|
|
@@ -167,13 +230,15 @@ Please have a look at the [contributions file][contributing].
|
|
|
167
230
|
|
|
168
231
|
### How to make a new release
|
|
169
232
|
|
|
170
|
-
- Update/verify the **version** in the `VERSION` file
|
|
171
|
-
- Update/verify that the `doc/source/changes.rst` changelog file was updated
|
|
172
|
-
- Commit everything
|
|
173
|
-
- Run `git tag -s <version>` to tag the version in Git
|
|
174
|
-
-
|
|
233
|
+
- Update/verify the **version** in the `VERSION` file.
|
|
234
|
+
- Update/verify that the `doc/source/changes.rst` changelog file was updated.
|
|
235
|
+
- Commit everything.
|
|
236
|
+
- Run `git tag -s <version>` to tag the version in Git.
|
|
237
|
+
- _Optionally_ create and activate a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) using `venv` or `virtualenv`.\
|
|
238
|
+
(When run in a virtual environment, the next step will automatically take care of installing `build` and `twine` in it.)
|
|
239
|
+
- Run `make release`.
|
|
175
240
|
- Close the milestone mentioned in the _changelog_ and create a new one. _Do not reuse milestones by renaming them_.
|
|
176
|
-
-
|
|
241
|
+
- Go to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
|
|
177
242
|
|
|
178
243
|
### How to verify a release (DEPRECATED)
|
|
179
244
|
|
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: GitPython
|
|
3
|
+
Version: 3.1.36
|
|
4
|
+
Summary: GitPython is a Python library used to interact with Git repositories
|
|
5
|
+
Home-page: https://github.com/gitpython-developers/GitPython
|
|
6
|
+
Author: Sebastian Thiel, Michael Trier
|
|
7
|
+
Author-email: byronimo@gmail.com, mtrier@gmail.com
|
|
8
|
+
License: BSD
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Operating System :: POSIX
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Requires-Python: >=3.7
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
License-File: AUTHORS
|
|
30
|
+
Requires-Dist: gitdb<5,>=4.0.1
|
|
31
|
+
Requires-Dist: typing-extensions>=3.7.4.3; python_version < "3.8"
|
|
32
|
+
Provides-Extra: test
|
|
33
|
+
Requires-Dist: black; extra == "test"
|
|
34
|
+
Requires-Dist: coverage[toml]; extra == "test"
|
|
35
|
+
Requires-Dist: ddt!=1.4.3,>=1.1.1; extra == "test"
|
|
36
|
+
Requires-Dist: mypy; extra == "test"
|
|
37
|
+
Requires-Dist: pre-commit; extra == "test"
|
|
38
|
+
Requires-Dist: pytest; extra == "test"
|
|
39
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
40
|
+
Requires-Dist: pytest-sugar; extra == "test"
|
|
41
|
+
Requires-Dist: virtualenv; extra == "test"
|
|
42
|
+
|
|
1
43
|

|
|
2
44
|
[](https://readthedocs.org/projects/gitpython/?badge=stable)
|
|
3
45
|
[](https://repology.org/metapackage/python:gitpython/versions)
|
|
@@ -49,30 +91,51 @@ The installer takes care of installing them for you.
|
|
|
49
91
|
|
|
50
92
|
### INSTALL
|
|
51
93
|
|
|
52
|
-
|
|
94
|
+
GitPython and its required package dependencies can be installed in any of the following ways, all of which should typically be done in a [virtual environment](https://docs.python.org/3/tutorial/venv.html).
|
|
53
95
|
|
|
54
|
-
|
|
55
|
-
python setup.py install
|
|
56
|
-
```
|
|
96
|
+
#### From PyPI
|
|
57
97
|
|
|
58
|
-
|
|
98
|
+
To obtain and install a copy [from PyPI](https://pypi.org/project/GitPython/), run:
|
|
59
99
|
|
|
60
100
|
```bash
|
|
61
101
|
pip install GitPython
|
|
62
102
|
```
|
|
63
103
|
|
|
64
|
-
|
|
104
|
+
(A distribution package can also be downloaded for manual installation at [the PyPI page](https://pypi.org/project/GitPython/).)
|
|
105
|
+
|
|
106
|
+
#### From downloaded source code
|
|
107
|
+
|
|
108
|
+
If you have downloaded the source code, run this from inside the unpacked `GitPython` directory:
|
|
65
109
|
|
|
66
|
-
|
|
110
|
+
```bash
|
|
111
|
+
pip install .
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### By cloning the source code repository
|
|
67
115
|
|
|
68
|
-
|
|
116
|
+
To clone the [the GitHub repository](https://github.com/gitpython-developers/GitPython) from source to work on the code, you can do it like so:
|
|
69
117
|
|
|
70
118
|
```bash
|
|
71
119
|
git clone https://github.com/gitpython-developers/GitPython
|
|
72
|
-
|
|
120
|
+
cd GitPython
|
|
121
|
+
git fetch --tags
|
|
73
122
|
./init-tests-after-clone.sh
|
|
74
123
|
```
|
|
75
124
|
|
|
125
|
+
If you are cloning [your own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks), then replace the above `git clone` command with one that gives the URL of your fork. Or use this [`gh`](https://cli.github.com/) command (assuming you have `gh` and your fork is called `GitPython`):
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
gh repo clone GitPython
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Having cloned the repo, create and activate your [virtual environment](https://docs.python.org/3/tutorial/venv.html). Then make an [editable install](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs):
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install -e ".[test]"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
In the less common case that you do not want to install test dependencies, `pip install -e .` can be used instead.
|
|
138
|
+
|
|
76
139
|
### Limitations
|
|
77
140
|
|
|
78
141
|
#### Leakage of System Resources
|
|
@@ -93,28 +156,57 @@ See [Issue #525](https://github.com/gitpython-developers/GitPython/issues/525).
|
|
|
93
156
|
|
|
94
157
|
### RUNNING TESTS
|
|
95
158
|
|
|
96
|
-
_Important_: Right after cloning this repository, please be sure to have
|
|
97
|
-
the `./init-tests-after-clone.sh`
|
|
98
|
-
you will encounter test failures.
|
|
159
|
+
_Important_: Right after cloning this repository, please be sure to have
|
|
160
|
+
executed `git fetch --tags` followed by the `./init-tests-after-clone.sh`
|
|
161
|
+
script in the repository root. Otherwise you will encounter test failures.
|
|
99
162
|
|
|
100
163
|
On _Windows_, make sure you have `git-daemon` in your PATH. For MINGW-git, the `git-daemon.exe`
|
|
101
164
|
exists in `Git\mingw64\libexec\git-core\`; CYGWIN has no daemon, but should get along fine
|
|
102
165
|
with MINGW's.
|
|
103
166
|
|
|
104
|
-
|
|
105
|
-
|
|
167
|
+
#### Install test dependencies
|
|
168
|
+
|
|
169
|
+
Ensure testing libraries are installed. This is taken care of already if you installed with:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
pip install -e ".[test]"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Otherwise, you can run:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pip install -r test-requirements.txt
|
|
179
|
+
```
|
|
106
180
|
|
|
107
|
-
|
|
181
|
+
#### Test commands
|
|
108
182
|
|
|
109
|
-
To
|
|
183
|
+
To test, run:
|
|
110
184
|
|
|
111
|
-
|
|
185
|
+
```bash
|
|
186
|
+
pytest
|
|
187
|
+
```
|
|
112
188
|
|
|
113
|
-
|
|
189
|
+
To lint, run:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
pre-commit run --all-files
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
To typecheck, run:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
mypy -p git
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
For automatic code formatting, run:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
black git
|
|
205
|
+
```
|
|
114
206
|
|
|
115
|
-
Configuration for flake8 is in the
|
|
207
|
+
Configuration for flake8 is in the `./.flake8` file.
|
|
116
208
|
|
|
117
|
-
Configurations for mypy
|
|
209
|
+
Configurations for `mypy`, `pytest`, `coverage.py`, and `black` are in `./pyproject.toml`.
|
|
118
210
|
|
|
119
211
|
The same linting and testing will also be performed against different supported python versions
|
|
120
212
|
upon submitting a pull request (or on each push if you have a fork with a "main" branch and actions enabled).
|
|
@@ -138,13 +230,15 @@ Please have a look at the [contributions file][contributing].
|
|
|
138
230
|
|
|
139
231
|
### How to make a new release
|
|
140
232
|
|
|
141
|
-
- Update/verify the **version** in the `VERSION` file
|
|
142
|
-
- Update/verify that the `doc/source/changes.rst` changelog file was updated
|
|
143
|
-
- Commit everything
|
|
144
|
-
- Run `git tag -s <version>` to tag the version in Git
|
|
145
|
-
-
|
|
233
|
+
- Update/verify the **version** in the `VERSION` file.
|
|
234
|
+
- Update/verify that the `doc/source/changes.rst` changelog file was updated.
|
|
235
|
+
- Commit everything.
|
|
236
|
+
- Run `git tag -s <version>` to tag the version in Git.
|
|
237
|
+
- _Optionally_ create and activate a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) using `venv` or `virtualenv`.\
|
|
238
|
+
(When run in a virtual environment, the next step will automatically take care of installing `build` and `twine` in it.)
|
|
239
|
+
- Run `make release`.
|
|
146
240
|
- Close the milestone mentioned in the _changelog_ and create a new one. _Do not reuse milestones by renaming them_.
|
|
147
|
-
-
|
|
241
|
+
- Go to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
|
|
148
242
|
|
|
149
243
|
### How to verify a release (DEPRECATED)
|
|
150
244
|
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: GitPython
|
|
3
|
-
Version: 3.1.34
|
|
4
|
-
Summary: GitPython is a Python library used to interact with Git repositories
|
|
5
|
-
Home-page: https://github.com/gitpython-developers/GitPython
|
|
6
|
-
Author: Sebastian Thiel, Michael Trier
|
|
7
|
-
Author-email: byronimo@gmail.com, mtrier@gmail.com
|
|
8
|
-
License: BSD
|
|
9
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
-
Classifier: Environment :: Console
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Operating System :: POSIX
|
|
15
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
-
Classifier: Typing :: Typed
|
|
18
|
-
Classifier: Programming Language :: Python
|
|
19
|
-
Classifier: Programming Language :: Python :: 3
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
-
Requires-Python: >=3.7
|
|
26
|
-
Description-Content-Type: text/markdown
|
|
27
|
-
License-File: LICENSE
|
|
28
|
-
License-File: AUTHORS
|
|
29
|
-
|
|
30
1
|

|
|
31
2
|
[](https://readthedocs.org/projects/gitpython/?badge=stable)
|
|
32
3
|
[](https://repology.org/metapackage/python:gitpython/versions)
|
|
@@ -78,30 +49,51 @@ The installer takes care of installing them for you.
|
|
|
78
49
|
|
|
79
50
|
### INSTALL
|
|
80
51
|
|
|
81
|
-
|
|
52
|
+
GitPython and its required package dependencies can be installed in any of the following ways, all of which should typically be done in a [virtual environment](https://docs.python.org/3/tutorial/venv.html).
|
|
82
53
|
|
|
83
|
-
|
|
84
|
-
python setup.py install
|
|
85
|
-
```
|
|
54
|
+
#### From PyPI
|
|
86
55
|
|
|
87
|
-
|
|
56
|
+
To obtain and install a copy [from PyPI](https://pypi.org/project/GitPython/), run:
|
|
88
57
|
|
|
89
58
|
```bash
|
|
90
59
|
pip install GitPython
|
|
91
60
|
```
|
|
92
61
|
|
|
93
|
-
|
|
62
|
+
(A distribution package can also be downloaded for manual installation at [the PyPI page](https://pypi.org/project/GitPython/).)
|
|
63
|
+
|
|
64
|
+
#### From downloaded source code
|
|
65
|
+
|
|
66
|
+
If you have downloaded the source code, run this from inside the unpacked `GitPython` directory:
|
|
94
67
|
|
|
95
|
-
|
|
68
|
+
```bash
|
|
69
|
+
pip install .
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### By cloning the source code repository
|
|
96
73
|
|
|
97
|
-
|
|
74
|
+
To clone the [the GitHub repository](https://github.com/gitpython-developers/GitPython) from source to work on the code, you can do it like so:
|
|
98
75
|
|
|
99
76
|
```bash
|
|
100
77
|
git clone https://github.com/gitpython-developers/GitPython
|
|
101
|
-
|
|
78
|
+
cd GitPython
|
|
79
|
+
git fetch --tags
|
|
102
80
|
./init-tests-after-clone.sh
|
|
103
81
|
```
|
|
104
82
|
|
|
83
|
+
If you are cloning [your own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks), then replace the above `git clone` command with one that gives the URL of your fork. Or use this [`gh`](https://cli.github.com/) command (assuming you have `gh` and your fork is called `GitPython`):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
gh repo clone GitPython
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Having cloned the repo, create and activate your [virtual environment](https://docs.python.org/3/tutorial/venv.html). Then make an [editable install](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install -e ".[test]"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
In the less common case that you do not want to install test dependencies, `pip install -e .` can be used instead.
|
|
96
|
+
|
|
105
97
|
### Limitations
|
|
106
98
|
|
|
107
99
|
#### Leakage of System Resources
|
|
@@ -122,28 +114,57 @@ See [Issue #525](https://github.com/gitpython-developers/GitPython/issues/525).
|
|
|
122
114
|
|
|
123
115
|
### RUNNING TESTS
|
|
124
116
|
|
|
125
|
-
_Important_: Right after cloning this repository, please be sure to have
|
|
126
|
-
the `./init-tests-after-clone.sh`
|
|
127
|
-
you will encounter test failures.
|
|
117
|
+
_Important_: Right after cloning this repository, please be sure to have
|
|
118
|
+
executed `git fetch --tags` followed by the `./init-tests-after-clone.sh`
|
|
119
|
+
script in the repository root. Otherwise you will encounter test failures.
|
|
128
120
|
|
|
129
121
|
On _Windows_, make sure you have `git-daemon` in your PATH. For MINGW-git, the `git-daemon.exe`
|
|
130
122
|
exists in `Git\mingw64\libexec\git-core\`; CYGWIN has no daemon, but should get along fine
|
|
131
123
|
with MINGW's.
|
|
132
124
|
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
#### Install test dependencies
|
|
126
|
+
|
|
127
|
+
Ensure testing libraries are installed. This is taken care of already if you installed with:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
pip install -e ".[test]"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Otherwise, you can run:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
pip install -r test-requirements.txt
|
|
137
|
+
```
|
|
135
138
|
|
|
136
|
-
|
|
139
|
+
#### Test commands
|
|
137
140
|
|
|
138
|
-
To
|
|
141
|
+
To test, run:
|
|
139
142
|
|
|
140
|
-
|
|
143
|
+
```bash
|
|
144
|
+
pytest
|
|
145
|
+
```
|
|
141
146
|
|
|
142
|
-
|
|
147
|
+
To lint, run:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
pre-commit run --all-files
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
To typecheck, run:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
mypy -p git
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
For automatic code formatting, run:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
black git
|
|
163
|
+
```
|
|
143
164
|
|
|
144
|
-
Configuration for flake8 is in the
|
|
165
|
+
Configuration for flake8 is in the `./.flake8` file.
|
|
145
166
|
|
|
146
|
-
Configurations for mypy
|
|
167
|
+
Configurations for `mypy`, `pytest`, `coverage.py`, and `black` are in `./pyproject.toml`.
|
|
147
168
|
|
|
148
169
|
The same linting and testing will also be performed against different supported python versions
|
|
149
170
|
upon submitting a pull request (or on each push if you have a fork with a "main" branch and actions enabled).
|
|
@@ -167,13 +188,15 @@ Please have a look at the [contributions file][contributing].
|
|
|
167
188
|
|
|
168
189
|
### How to make a new release
|
|
169
190
|
|
|
170
|
-
- Update/verify the **version** in the `VERSION` file
|
|
171
|
-
- Update/verify that the `doc/source/changes.rst` changelog file was updated
|
|
172
|
-
- Commit everything
|
|
173
|
-
- Run `git tag -s <version>` to tag the version in Git
|
|
174
|
-
-
|
|
191
|
+
- Update/verify the **version** in the `VERSION` file.
|
|
192
|
+
- Update/verify that the `doc/source/changes.rst` changelog file was updated.
|
|
193
|
+
- Commit everything.
|
|
194
|
+
- Run `git tag -s <version>` to tag the version in Git.
|
|
195
|
+
- _Optionally_ create and activate a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) using `venv` or `virtualenv`.\
|
|
196
|
+
(When run in a virtual environment, the next step will automatically take care of installing `build` and `twine` in it.)
|
|
197
|
+
- Run `make release`.
|
|
175
198
|
- Close the milestone mentioned in the _changelog_ and create a new one. _Do not reuse milestones by renaming them_.
|
|
176
|
-
-
|
|
199
|
+
- Go to [GitHub Releases](https://github.com/gitpython-developers/GitPython/releases) and publish a new one with the recently pushed tag. Generate the changelog.
|
|
177
200
|
|
|
178
201
|
### How to verify a release (DEPRECATED)
|
|
179
202
|
|
GitPython-3.1.36/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.1.36
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
3.1.36
|
|
6
|
+
======
|
|
7
|
+
|
|
8
|
+
Note that this release should be a no-op, it's mainly for testing the changed release-process.
|
|
9
|
+
|
|
10
|
+
See the following for all changes.
|
|
11
|
+
https://github.com/gitpython-developers/gitpython/milestone/66?closed=1
|
|
12
|
+
|
|
13
|
+
3.1.35
|
|
14
|
+
======
|
|
15
|
+
|
|
16
|
+
See the following for all changes.
|
|
17
|
+
https://github.com/gitpython-developers/gitpython/milestone/65?closed=1
|
|
18
|
+
|
|
5
19
|
3.1.34
|
|
6
20
|
======
|
|
7
21
|
|
|
@@ -14,13 +14,13 @@ import os.path as osp
|
|
|
14
14
|
from typing import Optional
|
|
15
15
|
from git.types import PathLike
|
|
16
16
|
|
|
17
|
-
__version__ = '3.1.
|
|
17
|
+
__version__ = '3.1.36'
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
# { Initialization
|
|
21
21
|
def _init_externals() -> None:
|
|
22
22
|
"""Initialize external projects by putting them into the path"""
|
|
23
|
-
if __version__ == '3.1.
|
|
23
|
+
if __version__ == '3.1.36' and "PYOXIDIZER" not in os.environ:
|
|
24
24
|
sys.path.insert(1, osp.join(osp.dirname(__file__), "ext", "gitdb"))
|
|
25
25
|
|
|
26
26
|
try:
|
|
@@ -14,7 +14,6 @@ from subprocess import call, Popen, PIPE, DEVNULL
|
|
|
14
14
|
import subprocess
|
|
15
15
|
import threading
|
|
16
16
|
from textwrap import dedent
|
|
17
|
-
import unittest.mock
|
|
18
17
|
|
|
19
18
|
from git.compat import (
|
|
20
19
|
defenc,
|
|
@@ -24,7 +23,7 @@ from git.compat import (
|
|
|
24
23
|
is_win,
|
|
25
24
|
)
|
|
26
25
|
from git.exc import CommandError
|
|
27
|
-
from git.util import is_cygwin_git, cygpath, expand_path, remove_password_if_present
|
|
26
|
+
from git.util import is_cygwin_git, cygpath, expand_path, remove_password_if_present, patch_env
|
|
28
27
|
|
|
29
28
|
from .exc import GitCommandError, GitCommandNotFound, UnsafeOptionError, UnsafeProtocolError
|
|
30
29
|
from .util import (
|
|
@@ -965,10 +964,10 @@ class Git(LazyMixin):
|
|
|
965
964
|
'"kill_after_timeout" feature is not supported on Windows.',
|
|
966
965
|
)
|
|
967
966
|
# Only search PATH, not CWD. This must be in the *caller* environment. The "1" can be any value.
|
|
968
|
-
|
|
967
|
+
maybe_patch_caller_env = patch_env("NoDefaultCurrentDirectoryInExePath", "1")
|
|
969
968
|
else:
|
|
970
969
|
cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable
|
|
971
|
-
|
|
970
|
+
maybe_patch_caller_env = contextlib.nullcontext()
|
|
972
971
|
# end handle
|
|
973
972
|
|
|
974
973
|
stdout_sink = PIPE if with_stdout else getattr(subprocess, "DEVNULL", None) or open(os.devnull, "wb")
|
|
@@ -984,7 +983,7 @@ class Git(LazyMixin):
|
|
|
984
983
|
istream_ok,
|
|
985
984
|
)
|
|
986
985
|
try:
|
|
987
|
-
with
|
|
986
|
+
with maybe_patch_caller_env:
|
|
988
987
|
proc = Popen(
|
|
989
988
|
command,
|
|
990
989
|
env=env,
|
|
@@ -1402,6 +1402,10 @@ class Submodule(IndexObject, TraversableIterableObj):
|
|
|
1402
1402
|
# END handle keyerror
|
|
1403
1403
|
# END handle critical error
|
|
1404
1404
|
|
|
1405
|
+
# Make sure we are looking at a submodule object
|
|
1406
|
+
if type(sm) != git.objects.submodule.base.Submodule:
|
|
1407
|
+
continue
|
|
1408
|
+
|
|
1405
1409
|
# fill in remaining info - saves time as it doesn't have to be parsed again
|
|
1406
1410
|
sm._name = n
|
|
1407
1411
|
if pc != repo.commit():
|
|
@@ -168,6 +168,8 @@ class SymbolicReference(object):
|
|
|
168
168
|
"""Return: (str(sha), str(target_ref_path)) if available, the sha the file at
|
|
169
169
|
rela_path points to, or None. target_ref_path is the reference we
|
|
170
170
|
point to, or None"""
|
|
171
|
+
if ".." in str(ref_path):
|
|
172
|
+
raise ValueError(f"Invalid reference '{ref_path}'")
|
|
171
173
|
tokens: Union[None, List[str], Tuple[str, str]] = None
|
|
172
174
|
repodir = _git_dir(repo, ref_path)
|
|
173
175
|
try:
|
|
@@ -150,6 +150,7 @@ def unbare_repo(func: Callable[..., T]) -> Callable[..., T]:
|
|
|
150
150
|
|
|
151
151
|
@contextlib.contextmanager
|
|
152
152
|
def cwd(new_dir: PathLike) -> Generator[PathLike, None, None]:
|
|
153
|
+
"""Context manager to temporarily change directory. Not reentrant."""
|
|
153
154
|
old_dir = os.getcwd()
|
|
154
155
|
os.chdir(new_dir)
|
|
155
156
|
try:
|
|
@@ -158,6 +159,20 @@ def cwd(new_dir: PathLike) -> Generator[PathLike, None, None]:
|
|
|
158
159
|
os.chdir(old_dir)
|
|
159
160
|
|
|
160
161
|
|
|
162
|
+
@contextlib.contextmanager
|
|
163
|
+
def patch_env(name: str, value: str) -> Generator[None, None, None]:
|
|
164
|
+
"""Context manager to temporarily patch an environment variable."""
|
|
165
|
+
old_value = os.getenv(name)
|
|
166
|
+
os.environ[name] = value
|
|
167
|
+
try:
|
|
168
|
+
yield
|
|
169
|
+
finally:
|
|
170
|
+
if old_value is None:
|
|
171
|
+
del os.environ[name]
|
|
172
|
+
else:
|
|
173
|
+
os.environ[name] = old_value
|
|
174
|
+
|
|
175
|
+
|
|
161
176
|
def rmtree(path: PathLike) -> None:
|
|
162
177
|
"""Remove the given recursively.
|
|
163
178
|
|
|
@@ -935,7 +950,7 @@ class LockFile(object):
|
|
|
935
950
|
)
|
|
936
951
|
|
|
937
952
|
try:
|
|
938
|
-
with open(lock_file, mode=
|
|
953
|
+
with open(lock_file, mode="w"):
|
|
939
954
|
pass
|
|
940
955
|
except OSError as e:
|
|
941
956
|
raise IOError(str(e)) from e
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
1
3
|
from typing import Sequence
|
|
2
4
|
from setuptools import setup, find_packages
|
|
3
5
|
from setuptools.command.build_py import build_py as _build_py
|
|
@@ -6,8 +8,8 @@ import fnmatch
|
|
|
6
8
|
import os
|
|
7
9
|
import sys
|
|
8
10
|
|
|
9
|
-
with open(os.path.join(os.path.dirname(__file__), "VERSION")) as
|
|
10
|
-
VERSION =
|
|
11
|
+
with open(os.path.join(os.path.dirname(__file__), "VERSION")) as ver_file:
|
|
12
|
+
VERSION = ver_file.readline().strip()
|
|
11
13
|
|
|
12
14
|
with open("requirements.txt") as reqs_file:
|
|
13
15
|
requirements = reqs_file.read().splitlines()
|
|
@@ -47,7 +49,7 @@ def _stamp_version(filename: str) -> None:
|
|
|
47
49
|
with open(filename) as f:
|
|
48
50
|
for line in f:
|
|
49
51
|
if "__version__ =" in line:
|
|
50
|
-
line = line.replace("
|
|
52
|
+
line = line.replace('"git"', "'%s'" % VERSION)
|
|
51
53
|
found = True
|
|
52
54
|
out.append(line)
|
|
53
55
|
except OSError:
|
|
@@ -93,7 +95,7 @@ setup(
|
|
|
93
95
|
package_dir={"git": "git"},
|
|
94
96
|
python_requires=">=3.7",
|
|
95
97
|
install_requires=requirements,
|
|
96
|
-
|
|
98
|
+
extras_require={"test": test_requirements},
|
|
97
99
|
zip_safe=False,
|
|
98
100
|
long_description=long_description,
|
|
99
101
|
long_description_content_type="text/markdown",
|
|
@@ -122,5 +124,6 @@ setup(
|
|
|
122
124
|
"Programming Language :: Python :: 3.9",
|
|
123
125
|
"Programming Language :: Python :: 3.10",
|
|
124
126
|
"Programming Language :: Python :: 3.11",
|
|
127
|
+
"Programming Language :: Python :: 3.12",
|
|
125
128
|
],
|
|
126
129
|
)
|
GitPython-3.1.34/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.1.34
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|