python-gitlab 7.1.0__py3-none-any.whl → 8.0.0__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.
- gitlab/_version.py +1 -1
- gitlab/cli.py +1 -1
- gitlab/client.py +2 -5
- gitlab/v4/objects/files.py +8 -1
- gitlab/v4/objects/projects.py +2 -0
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/METADATA +2 -2
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/RECORD +12 -12
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/WHEEL +1 -1
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/entry_points.txt +0 -0
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/licenses/AUTHORS +0 -0
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/licenses/COPYING +0 -0
- {python_gitlab-7.1.0.dist-info → python_gitlab-8.0.0.dist-info}/top_level.txt +0 -0
gitlab/_version.py
CHANGED
gitlab/cli.py
CHANGED
|
@@ -334,7 +334,7 @@ def main() -> None:
|
|
|
334
334
|
# This first parsing step is used to find the gitlab config to use, and
|
|
335
335
|
# load the propermodule (v3 or v4) accordingly. At that point we don't have
|
|
336
336
|
# any subparser setup
|
|
337
|
-
|
|
337
|
+
options, _ = parser.parse_known_args(sys.argv)
|
|
338
338
|
try:
|
|
339
339
|
config = gitlab.config.GitlabConfigParser(options.gitlab, options.config_file)
|
|
340
340
|
except gitlab.config.ConfigError as e:
|
gitlab/client.py
CHANGED
|
@@ -18,7 +18,6 @@ from gitlab import _backends, utils
|
|
|
18
18
|
try:
|
|
19
19
|
import gql
|
|
20
20
|
import gql.transport.exceptions
|
|
21
|
-
import graphql
|
|
22
21
|
import httpx
|
|
23
22
|
|
|
24
23
|
from ._backends.graphql import GitlabAsyncTransport, GitlabTransport
|
|
@@ -1350,7 +1349,7 @@ class GraphQL(_BaseGraphQL):
|
|
|
1350
1349
|
def __exit__(self, *args: Any) -> None:
|
|
1351
1350
|
self._http_client.close()
|
|
1352
1351
|
|
|
1353
|
-
def execute(self, request: str
|
|
1352
|
+
def execute(self, request: str, *args: Any, **kwargs: Any) -> Any:
|
|
1354
1353
|
parsed_document = self._gql(request)
|
|
1355
1354
|
retry = utils.Retry(
|
|
1356
1355
|
max_retries=self._max_retries,
|
|
@@ -1420,9 +1419,7 @@ class AsyncGraphQL(_BaseGraphQL):
|
|
|
1420
1419
|
async def __aexit__(self, *args: Any) -> None:
|
|
1421
1420
|
await self._http_client.aclose()
|
|
1422
1421
|
|
|
1423
|
-
async def execute(
|
|
1424
|
-
self, request: str | graphql.Source, *args: Any, **kwargs: Any
|
|
1425
|
-
) -> Any:
|
|
1422
|
+
async def execute(self, request: str, *args: Any, **kwargs: Any) -> Any:
|
|
1426
1423
|
parsed_document = self._gql(request)
|
|
1427
1424
|
retry = utils.Retry(
|
|
1428
1425
|
max_retries=self._max_retries,
|
gitlab/v4/objects/files.py
CHANGED
|
@@ -29,6 +29,7 @@ class ProjectFile(SaveMixin, ObjectDeleteMixin, RESTObject):
|
|
|
29
29
|
file_path: str
|
|
30
30
|
manager: ProjectFileManager
|
|
31
31
|
content: str # since the `decode()` method uses `self.content`
|
|
32
|
+
start_branch: str | None = None
|
|
32
33
|
|
|
33
34
|
def decode(self) -> bytes:
|
|
34
35
|
"""Returns the decoded content of the file.
|
|
@@ -41,7 +42,11 @@ class ProjectFile(SaveMixin, ObjectDeleteMixin, RESTObject):
|
|
|
41
42
|
# NOTE(jlvillal): Signature doesn't match SaveMixin.save() so ignore
|
|
42
43
|
# type error
|
|
43
44
|
def save( # type: ignore[override]
|
|
44
|
-
self,
|
|
45
|
+
self,
|
|
46
|
+
branch: str,
|
|
47
|
+
commit_message: str,
|
|
48
|
+
start_branch: str | None = None,
|
|
49
|
+
**kwargs: Any,
|
|
45
50
|
) -> None:
|
|
46
51
|
"""Save the changes made to the file to the server.
|
|
47
52
|
|
|
@@ -50,6 +55,7 @@ class ProjectFile(SaveMixin, ObjectDeleteMixin, RESTObject):
|
|
|
50
55
|
Args:
|
|
51
56
|
branch: Branch in which the file will be updated
|
|
52
57
|
commit_message: Message to send with the commit
|
|
58
|
+
start_branch: Name of the branch to start the new branch from
|
|
53
59
|
**kwargs: Extra options to send to the server (e.g. sudo)
|
|
54
60
|
|
|
55
61
|
Raises:
|
|
@@ -58,6 +64,7 @@ class ProjectFile(SaveMixin, ObjectDeleteMixin, RESTObject):
|
|
|
58
64
|
"""
|
|
59
65
|
self.branch = branch
|
|
60
66
|
self.commit_message = commit_message
|
|
67
|
+
self.start_branch = start_branch
|
|
61
68
|
self.file_path = utils.EncodedId(self.file_path)
|
|
62
69
|
super().save(**kwargs)
|
|
63
70
|
|
gitlab/v4/objects/projects.py
CHANGED
|
@@ -178,6 +178,8 @@ class Project(
|
|
|
178
178
|
_repr_attr = "path_with_namespace"
|
|
179
179
|
_upload_path = "/projects/{id}/uploads"
|
|
180
180
|
|
|
181
|
+
path_with_namespace: str
|
|
182
|
+
|
|
181
183
|
access_tokens: ProjectAccessTokenManager
|
|
182
184
|
accessrequests: ProjectAccessRequestManager
|
|
183
185
|
additionalstatistics: ProjectAdditionalStatisticsManager
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-gitlab
|
|
3
|
-
Version:
|
|
3
|
+
Version: 8.0.0
|
|
4
4
|
Summary: The python wrapper for the GitLab REST and GraphQL APIs.
|
|
5
5
|
Author-email: Gauvain Pocentek <gauvain@pocentek.net>
|
|
6
6
|
Maintainer-email: John Villalovos <john@sodarock.com>, Max Wittig <max.wittig@siemens.com>, Nejc Habjan <nejc.habjan@siemens.com>, Roger Meier <r.meier@siemens.com>
|
|
@@ -35,7 +35,7 @@ Requires-Dist: argcomplete<3,>=1.10.0; extra == "autocompletion"
|
|
|
35
35
|
Provides-Extra: yaml
|
|
36
36
|
Requires-Dist: PyYaml>=6.0.1; extra == "yaml"
|
|
37
37
|
Provides-Extra: graphql
|
|
38
|
-
Requires-Dist: gql[httpx]<
|
|
38
|
+
Requires-Dist: gql[httpx]<5,>=3.5.0; extra == "graphql"
|
|
39
39
|
Dynamic: license-file
|
|
40
40
|
|
|
41
41
|
python-gitlab
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
gitlab/__init__.py,sha256=pdbvZNyXeXLn0fGXSTsBqi_ic7QLY7-9FL3uA6tvfdI,1416
|
|
2
2
|
gitlab/__main__.py,sha256=HTesNl0UAU6mPb9EXWkTKMy6Q6pAUxGi3iPnDHTE2uE,68
|
|
3
|
-
gitlab/_version.py,sha256=
|
|
3
|
+
gitlab/_version.py,sha256=XPkEbYCcHOoGE7OT5IgIzRLRiX6RC1F_TmhzU09SKyE,249
|
|
4
4
|
gitlab/base.py,sha256=xynWUZcMIbxiWLO17nnvqCsbC-lBvsy0rvWtTJOpuug,13790
|
|
5
|
-
gitlab/cli.py,sha256=
|
|
6
|
-
gitlab/client.py,sha256=
|
|
5
|
+
gitlab/cli.py,sha256=Bnu7T2RgDHUdxYiORBdwM4Qj9hYxoMNtmV9DtNYbWCI,12353
|
|
6
|
+
gitlab/client.py,sha256=2l5FZGp4n0XqTq73moLNGfsZTaQB7KMCFDTg_7waMjo,54385
|
|
7
7
|
gitlab/config.py,sha256=knMTQZSepMI9Z0_3CTgzqg5Wsrk_f3FNfxUM5RoeVx4,9022
|
|
8
8
|
gitlab/const.py,sha256=IKpS-AQeRpAXIdT_KpzhDuTR8-KilbUudL-TQv4njFk,5179
|
|
9
9
|
gitlab/exceptions.py,sha256=9Ql-z8qGQAmd_1rx1IAXzLRYmQThDeNq6vqOpCxXAjQ,8391
|
|
@@ -45,7 +45,7 @@ gitlab/v4/objects/epics.py,sha256=4H3mHQRQPitFmiGjgEelrKkeqBvJs3iWBscavY2AKlw,40
|
|
|
45
45
|
gitlab/v4/objects/events.py,sha256=SsMI5btCfHVMFcrNE601-2rLEIVnyOpuFuKAYQftfh8,5009
|
|
46
46
|
gitlab/v4/objects/export_import.py,sha256=V0K4nOzDIm4NV1HB92kByvRjHojmfUP8m6KCR20opiI,1472
|
|
47
47
|
gitlab/v4/objects/features.py,sha256=ZwuvXWWOb5rrBOpMQ-B9oGGVbtyn-bjzW9K7BwJL3Rs,1955
|
|
48
|
-
gitlab/v4/objects/files.py,sha256=
|
|
48
|
+
gitlab/v4/objects/files.py,sha256=JWJ2FkyJLK2V5ATl6dhjVPv5JkDKuUSno6heJGIb4Ko,13148
|
|
49
49
|
gitlab/v4/objects/geo_nodes.py,sha256=ebCfIulBIbmwdp_CfLxANDzsUdeFoxQTjfshlz0t_-E,3511
|
|
50
50
|
gitlab/v4/objects/group_access_tokens.py,sha256=BdkboLhzav14FoiHIkPHrix5nsYqlcnC1l6Aa59LMcQ,845
|
|
51
51
|
gitlab/v4/objects/groups.py,sha256=ztzTC-9tXXHZG-BTPQpJd3us0KNEsXOMkpVjlJKMJ_0,15898
|
|
@@ -74,7 +74,7 @@ gitlab/v4/objects/pages.py,sha256=wUioc0uYDMIU_K9GpAiS9bG45WnS0NXC5874h6VUebk,15
|
|
|
74
74
|
gitlab/v4/objects/personal_access_tokens.py,sha256=bm-MawqOH1zH8PvVgxFpU9uQacUndhUCMMRQxBS8lSs,1147
|
|
75
75
|
gitlab/v4/objects/pipelines.py,sha256=01WpGWYU5JdkCvkA_UhYx94ukEbyOeMrE-Da_tTaLa8,10030
|
|
76
76
|
gitlab/v4/objects/project_access_tokens.py,sha256=FZMg0NIo5TpT_F_SBZ5nD76JjaYIBOL3RddfYTGwxt8,869
|
|
77
|
-
gitlab/v4/objects/projects.py,sha256
|
|
77
|
+
gitlab/v4/objects/projects.py,sha256=-UYTzcfoWW8_tT7VPuWhRb_QeGOluP3Me1PfMOeuUH4,49598
|
|
78
78
|
gitlab/v4/objects/push_rules.py,sha256=CWOCljZupz2K1Wd2A2WP648alD0ux2FJQBydxDsPZd4,2902
|
|
79
79
|
gitlab/v4/objects/registry_protection_repository_rules.py,sha256=T-8sO3Jg7ZL4KuI-paaQSrhx9gN22Hj3DD5Xa2FUAuw,1323
|
|
80
80
|
gitlab/v4/objects/registry_protection_rules.py,sha256=FkhVtR5ugFlpdu5UO0Xuiy3WKKbo0JzY6sSXOjU4DZ0,1121
|
|
@@ -98,10 +98,10 @@ gitlab/v4/objects/triggers.py,sha256=1iYdlP8qpqwEctr6kKJSDanRulaKEHYnVwYwVGainI4
|
|
|
98
98
|
gitlab/v4/objects/users.py,sha256=0-aCUflt2Wzl338H_eIaTJ_ElsXwbkgoh_SEw38u6m0,20987
|
|
99
99
|
gitlab/v4/objects/variables.py,sha256=B7XHDKPrRg-sboVpClO0vYbxe6egH9U1-SPgVHv6tPc,2051
|
|
100
100
|
gitlab/v4/objects/wikis.py,sha256=fR4QG4WIBeG10eBNfCN3CG-w3qlEBJIBVsJFxVVVhEs,1364
|
|
101
|
-
python_gitlab-
|
|
102
|
-
python_gitlab-
|
|
103
|
-
python_gitlab-
|
|
104
|
-
python_gitlab-
|
|
105
|
-
python_gitlab-
|
|
106
|
-
python_gitlab-
|
|
107
|
-
python_gitlab-
|
|
101
|
+
python_gitlab-8.0.0.dist-info/licenses/AUTHORS,sha256=Z0P61GJSVnp7iFbRcMezhx3f4zMyPkVmG--TWaRo768,526
|
|
102
|
+
python_gitlab-8.0.0.dist-info/licenses/COPYING,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
|
103
|
+
python_gitlab-8.0.0.dist-info/METADATA,sha256=mbEwIdItGKr4Lzg-7GQO_J7-WXfi2zsjf1jlFKBfxV0,8503
|
|
104
|
+
python_gitlab-8.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
105
|
+
python_gitlab-8.0.0.dist-info/entry_points.txt,sha256=nhpKLLP_uQPFByn8UtE9zsvQQwa402t52o_Cw9IFXMo,43
|
|
106
|
+
python_gitlab-8.0.0.dist-info/top_level.txt,sha256=MvIaP8p_Oaf4gO_hXmHkX-5y2deHLp1pe6tJR3ukQ6o,7
|
|
107
|
+
python_gitlab-8.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|