python-gitlab 5.1.0__py3-none-any.whl → 5.3.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/__init__.py +2 -1
- gitlab/_backends/graphql.py +21 -1
- gitlab/_version.py +1 -1
- gitlab/client.py +120 -16
- gitlab/v4/objects/__init__.py +1 -0
- gitlab/v4/objects/projects.py +19 -1
- gitlab/v4/objects/registry_repository_protection_rules.py +35 -0
- gitlab/v4/objects/templates.py +104 -0
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/METADATA +6 -4
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/RECORD +15 -14
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/AUTHORS +0 -0
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/COPYING +0 -0
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/WHEEL +0 -0
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/entry_points.txt +0 -0
- {python_gitlab-5.1.0.dist-info → python_gitlab-5.3.0.dist-info}/top_level.txt +0 -0
gitlab/__init__.py
CHANGED
@@ -27,7 +27,7 @@ from gitlab._version import ( # noqa: F401
|
|
27
27
|
__title__,
|
28
28
|
__version__,
|
29
29
|
)
|
30
|
-
from gitlab.client import Gitlab, GitlabList, GraphQL # noqa: F401
|
30
|
+
from gitlab.client import AsyncGraphQL, Gitlab, GitlabList, GraphQL # noqa: F401
|
31
31
|
from gitlab.exceptions import * # noqa: F401,F403
|
32
32
|
|
33
33
|
warnings.filterwarnings("default", category=DeprecationWarning, module="^gitlab")
|
@@ -42,6 +42,7 @@ __all__ = [
|
|
42
42
|
"__version__",
|
43
43
|
"Gitlab",
|
44
44
|
"GitlabList",
|
45
|
+
"AsyncGraphQL",
|
45
46
|
"GraphQL",
|
46
47
|
]
|
47
48
|
__all__.extend(gitlab.exceptions.__all__)
|
gitlab/_backends/graphql.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import Any
|
2
2
|
|
3
3
|
import httpx
|
4
|
-
from gql.transport.httpx import HTTPXTransport
|
4
|
+
from gql.transport.httpx import HTTPXAsyncTransport, HTTPXTransport
|
5
5
|
|
6
6
|
|
7
7
|
class GitlabTransport(HTTPXTransport):
|
@@ -22,3 +22,23 @@ class GitlabTransport(HTTPXTransport):
|
|
22
22
|
|
23
23
|
def close(self) -> None:
|
24
24
|
pass
|
25
|
+
|
26
|
+
|
27
|
+
class GitlabAsyncTransport(HTTPXAsyncTransport):
|
28
|
+
"""An async gql httpx transport that reuses an existing httpx.AsyncClient.
|
29
|
+
By default, gql's transports do not have a keep-alive session
|
30
|
+
and do not enable providing your own session that's kept open.
|
31
|
+
This transport lets us provide and close our session on our own
|
32
|
+
and provide additional auth.
|
33
|
+
For details, see https://github.com/graphql-python/gql/issues/91.
|
34
|
+
"""
|
35
|
+
|
36
|
+
def __init__(self, *args: Any, client: httpx.AsyncClient, **kwargs: Any):
|
37
|
+
super().__init__(*args, **kwargs)
|
38
|
+
self.client = client
|
39
|
+
|
40
|
+
async def connect(self) -> None:
|
41
|
+
pass
|
42
|
+
|
43
|
+
async def close(self) -> None:
|
44
|
+
pass
|
gitlab/_version.py
CHANGED
gitlab/client.py
CHANGED
@@ -32,7 +32,7 @@ try:
|
|
32
32
|
import graphql
|
33
33
|
import httpx
|
34
34
|
|
35
|
-
from ._backends.graphql import GitlabTransport
|
35
|
+
from ._backends.graphql import GitlabAsyncTransport, GitlabTransport
|
36
36
|
|
37
37
|
_GQL_INSTALLED = True
|
38
38
|
except ImportError: # pragma: no cover
|
@@ -1278,14 +1278,13 @@ class GitlabList:
|
|
1278
1278
|
raise StopIteration
|
1279
1279
|
|
1280
1280
|
|
1281
|
-
class
|
1281
|
+
class _BaseGraphQL:
|
1282
1282
|
def __init__(
|
1283
1283
|
self,
|
1284
1284
|
url: Optional[str] = None,
|
1285
1285
|
*,
|
1286
1286
|
token: Optional[str] = None,
|
1287
1287
|
ssl_verify: Union[bool, str] = True,
|
1288
|
-
client: Optional[httpx.Client] = None,
|
1289
1288
|
timeout: Optional[float] = None,
|
1290
1289
|
user_agent: str = gitlab.const.USER_AGENT,
|
1291
1290
|
fetch_schema_from_transport: bool = False,
|
@@ -1308,9 +1307,50 @@ class GraphQL:
|
|
1308
1307
|
self._max_retries = max_retries
|
1309
1308
|
self._obey_rate_limit = obey_rate_limit
|
1310
1309
|
self._retry_transient_errors = retry_transient_errors
|
1310
|
+
self._client_opts = self._get_client_opts()
|
1311
|
+
self._fetch_schema_from_transport = fetch_schema_from_transport
|
1312
|
+
|
1313
|
+
def _get_client_opts(self) -> Dict[str, Any]:
|
1314
|
+
headers = {"User-Agent": self._user_agent}
|
1315
|
+
|
1316
|
+
if self._token:
|
1317
|
+
headers["Authorization"] = f"Bearer {self._token}"
|
1318
|
+
|
1319
|
+
return {
|
1320
|
+
"headers": headers,
|
1321
|
+
"timeout": self._timeout,
|
1322
|
+
"verify": self._ssl_verify,
|
1323
|
+
}
|
1324
|
+
|
1311
1325
|
|
1312
|
-
|
1313
|
-
|
1326
|
+
class GraphQL(_BaseGraphQL):
|
1327
|
+
def __init__(
|
1328
|
+
self,
|
1329
|
+
url: Optional[str] = None,
|
1330
|
+
*,
|
1331
|
+
token: Optional[str] = None,
|
1332
|
+
ssl_verify: Union[bool, str] = True,
|
1333
|
+
client: Optional[httpx.Client] = None,
|
1334
|
+
timeout: Optional[float] = None,
|
1335
|
+
user_agent: str = gitlab.const.USER_AGENT,
|
1336
|
+
fetch_schema_from_transport: bool = False,
|
1337
|
+
max_retries: int = 10,
|
1338
|
+
obey_rate_limit: bool = True,
|
1339
|
+
retry_transient_errors: bool = False,
|
1340
|
+
) -> None:
|
1341
|
+
super().__init__(
|
1342
|
+
url=url,
|
1343
|
+
token=token,
|
1344
|
+
ssl_verify=ssl_verify,
|
1345
|
+
timeout=timeout,
|
1346
|
+
user_agent=user_agent,
|
1347
|
+
fetch_schema_from_transport=fetch_schema_from_transport,
|
1348
|
+
max_retries=max_retries,
|
1349
|
+
obey_rate_limit=obey_rate_limit,
|
1350
|
+
retry_transient_errors=retry_transient_errors,
|
1351
|
+
)
|
1352
|
+
|
1353
|
+
self._http_client = client or httpx.Client(**self._client_opts)
|
1314
1354
|
self._transport = GitlabTransport(self._url, client=self._http_client)
|
1315
1355
|
self._client = gql.Client(
|
1316
1356
|
transport=self._transport,
|
@@ -1324,19 +1364,81 @@ class GraphQL:
|
|
1324
1364
|
def __exit__(self, *args: Any) -> None:
|
1325
1365
|
self._http_client.close()
|
1326
1366
|
|
1327
|
-
def
|
1328
|
-
|
1367
|
+
def execute(
|
1368
|
+
self, request: Union[str, graphql.Source], *args: Any, **kwargs: Any
|
1369
|
+
) -> Any:
|
1370
|
+
parsed_document = self._gql(request)
|
1371
|
+
retry = utils.Retry(
|
1372
|
+
max_retries=self._max_retries,
|
1373
|
+
obey_rate_limit=self._obey_rate_limit,
|
1374
|
+
retry_transient_errors=self._retry_transient_errors,
|
1375
|
+
)
|
1329
1376
|
|
1330
|
-
|
1331
|
-
|
1377
|
+
while True:
|
1378
|
+
try:
|
1379
|
+
result = self._client.execute(parsed_document, *args, **kwargs)
|
1380
|
+
except gql.transport.exceptions.TransportServerError as e:
|
1381
|
+
if retry.handle_retry_on_status(
|
1382
|
+
status_code=e.code, headers=self._transport.response_headers
|
1383
|
+
):
|
1384
|
+
continue
|
1332
1385
|
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1386
|
+
if e.code == 401:
|
1387
|
+
raise gitlab.exceptions.GitlabAuthenticationError(
|
1388
|
+
response_code=e.code,
|
1389
|
+
error_message=str(e),
|
1390
|
+
)
|
1338
1391
|
|
1339
|
-
|
1392
|
+
raise gitlab.exceptions.GitlabHttpError(
|
1393
|
+
response_code=e.code,
|
1394
|
+
error_message=str(e),
|
1395
|
+
)
|
1396
|
+
|
1397
|
+
return result
|
1398
|
+
|
1399
|
+
|
1400
|
+
class AsyncGraphQL(_BaseGraphQL):
|
1401
|
+
def __init__(
|
1402
|
+
self,
|
1403
|
+
url: Optional[str] = None,
|
1404
|
+
*,
|
1405
|
+
token: Optional[str] = None,
|
1406
|
+
ssl_verify: Union[bool, str] = True,
|
1407
|
+
client: Optional[httpx.AsyncClient] = None,
|
1408
|
+
timeout: Optional[float] = None,
|
1409
|
+
user_agent: str = gitlab.const.USER_AGENT,
|
1410
|
+
fetch_schema_from_transport: bool = False,
|
1411
|
+
max_retries: int = 10,
|
1412
|
+
obey_rate_limit: bool = True,
|
1413
|
+
retry_transient_errors: bool = False,
|
1414
|
+
) -> None:
|
1415
|
+
super().__init__(
|
1416
|
+
url=url,
|
1417
|
+
token=token,
|
1418
|
+
ssl_verify=ssl_verify,
|
1419
|
+
timeout=timeout,
|
1420
|
+
user_agent=user_agent,
|
1421
|
+
fetch_schema_from_transport=fetch_schema_from_transport,
|
1422
|
+
max_retries=max_retries,
|
1423
|
+
obey_rate_limit=obey_rate_limit,
|
1424
|
+
retry_transient_errors=retry_transient_errors,
|
1425
|
+
)
|
1426
|
+
|
1427
|
+
self._http_client = client or httpx.AsyncClient(**self._client_opts)
|
1428
|
+
self._transport = GitlabAsyncTransport(self._url, client=self._http_client)
|
1429
|
+
self._client = gql.Client(
|
1430
|
+
transport=self._transport,
|
1431
|
+
fetch_schema_from_transport=fetch_schema_from_transport,
|
1432
|
+
)
|
1433
|
+
self._gql = gql.gql
|
1434
|
+
|
1435
|
+
async def __aenter__(self) -> "AsyncGraphQL":
|
1436
|
+
return self
|
1437
|
+
|
1438
|
+
async def __aexit__(self, *args: Any) -> None:
|
1439
|
+
await self._http_client.aclose()
|
1440
|
+
|
1441
|
+
async def execute(
|
1340
1442
|
self, request: Union[str, graphql.Source], *args: Any, **kwargs: Any
|
1341
1443
|
) -> Any:
|
1342
1444
|
parsed_document = self._gql(request)
|
@@ -1348,7 +1450,9 @@ class GraphQL:
|
|
1348
1450
|
|
1349
1451
|
while True:
|
1350
1452
|
try:
|
1351
|
-
result = self._client.
|
1453
|
+
result = await self._client.execute_async(
|
1454
|
+
parsed_document, *args, **kwargs
|
1455
|
+
)
|
1352
1456
|
except gql.transport.exceptions.TransportServerError as e:
|
1353
1457
|
if retry.handle_retry_on_status(
|
1354
1458
|
status_code=e.code, headers=self._transport.response_headers
|
gitlab/v4/objects/__init__.py
CHANGED
@@ -56,6 +56,7 @@ from .project_access_tokens import *
|
|
56
56
|
from .projects import *
|
57
57
|
from .push_rules import *
|
58
58
|
from .registry_protection_rules import *
|
59
|
+
from .registry_repository_protection_rules import *
|
59
60
|
from .releases import *
|
60
61
|
from .repositories import *
|
61
62
|
from .resource_groups import *
|
gitlab/v4/objects/projects.py
CHANGED
@@ -86,9 +86,12 @@ from .pipelines import ( # noqa: F401
|
|
86
86
|
)
|
87
87
|
from .project_access_tokens import ProjectAccessTokenManager # noqa: F401
|
88
88
|
from .push_rules import ProjectPushRulesManager # noqa: F401
|
89
|
-
from .registry_protection_rules import ( # noqa: F401
|
89
|
+
from .registry_protection_rules import ( # noqa: F401; deprecated
|
90
90
|
ProjectRegistryProtectionRuleManager,
|
91
91
|
)
|
92
|
+
from .registry_repository_protection_rules import ( # noqa: F401
|
93
|
+
ProjectRegistryRepositoryProtectionRuleManager,
|
94
|
+
)
|
92
95
|
from .releases import ProjectReleaseManager # noqa: F401
|
93
96
|
from .repositories import RepositoryMixin
|
94
97
|
from .resource_groups import ProjectResourceGroupManager
|
@@ -100,6 +103,14 @@ from .statistics import ( # noqa: F401
|
|
100
103
|
ProjectIssuesStatisticsManager,
|
101
104
|
)
|
102
105
|
from .tags import ProjectProtectedTagManager, ProjectTagManager # noqa: F401
|
106
|
+
from .templates import ( # noqa: F401
|
107
|
+
ProjectDockerfileTemplateManager,
|
108
|
+
ProjectGitignoreTemplateManager,
|
109
|
+
ProjectGitlabciymlTemplateManager,
|
110
|
+
ProjectIssueTemplateManager,
|
111
|
+
ProjectLicenseTemplateManager,
|
112
|
+
ProjectMergeRequestTemplateManager,
|
113
|
+
)
|
103
114
|
from .triggers import ProjectTriggerManager # noqa: F401
|
104
115
|
from .users import ProjectUserManager # noqa: F401
|
105
116
|
from .variables import ProjectVariableManager # noqa: F401
|
@@ -189,27 +200,33 @@ class Project(
|
|
189
200
|
customattributes: ProjectCustomAttributeManager
|
190
201
|
deployments: ProjectDeploymentManager
|
191
202
|
deploytokens: ProjectDeployTokenManager
|
203
|
+
dockerfile_templates: ProjectDockerfileTemplateManager
|
192
204
|
environments: ProjectEnvironmentManager
|
193
205
|
events: ProjectEventManager
|
194
206
|
exports: ProjectExportManager
|
195
207
|
files: ProjectFileManager
|
196
208
|
forks: "ProjectForkManager"
|
197
209
|
generic_packages: GenericPackageManager
|
210
|
+
gitignore_templates: ProjectGitignoreTemplateManager
|
211
|
+
gitlabciyml_templates: ProjectGitlabciymlTemplateManager
|
198
212
|
groups: ProjectGroupManager
|
199
213
|
hooks: ProjectHookManager
|
200
214
|
imports: ProjectImportManager
|
201
215
|
integrations: ProjectIntegrationManager
|
202
216
|
invitations: ProjectInvitationManager
|
203
217
|
issues: ProjectIssueManager
|
218
|
+
issue_templates: ProjectIssueTemplateManager
|
204
219
|
issues_statistics: ProjectIssuesStatisticsManager
|
205
220
|
iterations: ProjectIterationManager
|
206
221
|
jobs: ProjectJobManager
|
207
222
|
job_token_scope: ProjectJobTokenScopeManager
|
208
223
|
keys: ProjectKeyManager
|
209
224
|
labels: ProjectLabelManager
|
225
|
+
license_templates: ProjectLicenseTemplateManager
|
210
226
|
members: ProjectMemberManager
|
211
227
|
members_all: ProjectMemberAllManager
|
212
228
|
mergerequests: ProjectMergeRequestManager
|
229
|
+
merge_request_templates: ProjectMergeRequestTemplateManager
|
213
230
|
merge_trains: ProjectMergeTrainManager
|
214
231
|
milestones: ProjectMilestoneManager
|
215
232
|
notes: ProjectNoteManager
|
@@ -225,6 +242,7 @@ class Project(
|
|
225
242
|
protectedtags: ProjectProtectedTagManager
|
226
243
|
pushrules: ProjectPushRulesManager
|
227
244
|
registry_protection_rules: ProjectRegistryProtectionRuleManager
|
245
|
+
registry_repository_protection_rules: ProjectRegistryRepositoryProtectionRuleManager
|
228
246
|
releases: ProjectReleaseManager
|
229
247
|
resource_groups: ProjectResourceGroupManager
|
230
248
|
remote_mirrors: "ProjectRemoteMirrorManager"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
from gitlab.base import RESTManager, RESTObject
|
2
|
+
from gitlab.mixins import CreateMixin, ListMixin, SaveMixin, UpdateMethod, UpdateMixin
|
3
|
+
from gitlab.types import RequiredOptional
|
4
|
+
|
5
|
+
__all__ = [
|
6
|
+
"ProjectRegistryRepositoryProtectionRule",
|
7
|
+
"ProjectRegistryRepositoryProtectionRuleManager",
|
8
|
+
]
|
9
|
+
|
10
|
+
|
11
|
+
class ProjectRegistryRepositoryProtectionRule(SaveMixin, RESTObject):
|
12
|
+
_repr_attr = "repository_path_pattern"
|
13
|
+
|
14
|
+
|
15
|
+
class ProjectRegistryRepositoryProtectionRuleManager(
|
16
|
+
ListMixin, CreateMixin, UpdateMixin, RESTManager
|
17
|
+
):
|
18
|
+
_path = "/projects/{project_id}/registry/repository/protection/rules"
|
19
|
+
_obj_cls = ProjectRegistryRepositoryProtectionRule
|
20
|
+
_from_parent_attrs = {"project_id": "id"}
|
21
|
+
_create_attrs = RequiredOptional(
|
22
|
+
required=("repository_path_pattern",),
|
23
|
+
optional=(
|
24
|
+
"minimum_access_level_for_push",
|
25
|
+
"minimum_access_level_for_delete",
|
26
|
+
),
|
27
|
+
)
|
28
|
+
_update_attrs = RequiredOptional(
|
29
|
+
optional=(
|
30
|
+
"repository_path_pattern",
|
31
|
+
"minimum_access_level_for_push",
|
32
|
+
"minimum_access_level_for_delete",
|
33
|
+
),
|
34
|
+
)
|
35
|
+
_update_method = UpdateMethod.PATCH
|
gitlab/v4/objects/templates.py
CHANGED
@@ -12,6 +12,18 @@ __all__ = [
|
|
12
12
|
"GitlabciymlManager",
|
13
13
|
"License",
|
14
14
|
"LicenseManager",
|
15
|
+
"ProjectDockerfileTemplate",
|
16
|
+
"ProjectDockerfileTemplateManager",
|
17
|
+
"ProjectGitignoreTemplate",
|
18
|
+
"ProjectGitignoreTemplateManager",
|
19
|
+
"ProjectGitlabciymlTemplate",
|
20
|
+
"ProjectGitlabciymlTemplateManager",
|
21
|
+
"ProjectIssueTemplate",
|
22
|
+
"ProjectIssueTemplateManager",
|
23
|
+
"ProjectLicenseTemplate",
|
24
|
+
"ProjectLicenseTemplateManager",
|
25
|
+
"ProjectMergeRequestTemplate",
|
26
|
+
"ProjectMergeRequestTemplateManager",
|
15
27
|
]
|
16
28
|
|
17
29
|
|
@@ -65,3 +77,95 @@ class LicenseManager(RetrieveMixin, RESTManager):
|
|
65
77
|
|
66
78
|
def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> License:
|
67
79
|
return cast(License, super().get(id=id, lazy=lazy, **kwargs))
|
80
|
+
|
81
|
+
|
82
|
+
class ProjectDockerfileTemplate(RESTObject):
|
83
|
+
_id_attr = "name"
|
84
|
+
|
85
|
+
|
86
|
+
class ProjectDockerfileTemplateManager(RetrieveMixin, RESTManager):
|
87
|
+
_path = "/projects/{project_id}/templates/dockerfiles"
|
88
|
+
_obj_cls = ProjectDockerfileTemplate
|
89
|
+
_from_parent_attrs = {"project_id": "id"}
|
90
|
+
|
91
|
+
def get(
|
92
|
+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
|
93
|
+
) -> ProjectDockerfileTemplate:
|
94
|
+
return cast(ProjectDockerfileTemplate, super().get(id=id, lazy=lazy, **kwargs))
|
95
|
+
|
96
|
+
|
97
|
+
class ProjectGitignoreTemplate(RESTObject):
|
98
|
+
_id_attr = "name"
|
99
|
+
|
100
|
+
|
101
|
+
class ProjectGitignoreTemplateManager(RetrieveMixin, RESTManager):
|
102
|
+
_path = "/projects/{project_id}/templates/gitignores"
|
103
|
+
_obj_cls = ProjectGitignoreTemplate
|
104
|
+
_from_parent_attrs = {"project_id": "id"}
|
105
|
+
|
106
|
+
def get(
|
107
|
+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
|
108
|
+
) -> ProjectGitignoreTemplate:
|
109
|
+
return cast(ProjectGitignoreTemplate, super().get(id=id, lazy=lazy, **kwargs))
|
110
|
+
|
111
|
+
|
112
|
+
class ProjectGitlabciymlTemplate(RESTObject):
|
113
|
+
_id_attr = "name"
|
114
|
+
|
115
|
+
|
116
|
+
class ProjectGitlabciymlTemplateManager(RetrieveMixin, RESTManager):
|
117
|
+
_path = "/projects/{project_id}/templates/gitlab_ci_ymls"
|
118
|
+
_obj_cls = ProjectGitlabciymlTemplate
|
119
|
+
_from_parent_attrs = {"project_id": "id"}
|
120
|
+
|
121
|
+
def get(
|
122
|
+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
|
123
|
+
) -> ProjectGitlabciymlTemplate:
|
124
|
+
return cast(ProjectGitlabciymlTemplate, super().get(id=id, lazy=lazy, **kwargs))
|
125
|
+
|
126
|
+
|
127
|
+
class ProjectLicenseTemplate(RESTObject):
|
128
|
+
_id_attr = "key"
|
129
|
+
|
130
|
+
|
131
|
+
class ProjectLicenseTemplateManager(RetrieveMixin, RESTManager):
|
132
|
+
_path = "/projects/{project_id}/templates/licenses"
|
133
|
+
_obj_cls = ProjectLicenseTemplate
|
134
|
+
_from_parent_attrs = {"project_id": "id"}
|
135
|
+
|
136
|
+
def get(
|
137
|
+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
|
138
|
+
) -> ProjectLicenseTemplate:
|
139
|
+
return cast(ProjectLicenseTemplate, super().get(id=id, lazy=lazy, **kwargs))
|
140
|
+
|
141
|
+
|
142
|
+
class ProjectIssueTemplate(RESTObject):
|
143
|
+
_id_attr = "name"
|
144
|
+
|
145
|
+
|
146
|
+
class ProjectIssueTemplateManager(RetrieveMixin, RESTManager):
|
147
|
+
_path = "/projects/{project_id}/templates/issues"
|
148
|
+
_obj_cls = ProjectIssueTemplate
|
149
|
+
_from_parent_attrs = {"project_id": "id"}
|
150
|
+
|
151
|
+
def get(
|
152
|
+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
|
153
|
+
) -> ProjectIssueTemplate:
|
154
|
+
return cast(ProjectIssueTemplate, super().get(id=id, lazy=lazy, **kwargs))
|
155
|
+
|
156
|
+
|
157
|
+
class ProjectMergeRequestTemplate(RESTObject):
|
158
|
+
_id_attr = "name"
|
159
|
+
|
160
|
+
|
161
|
+
class ProjectMergeRequestTemplateManager(RetrieveMixin, RESTManager):
|
162
|
+
_path = "/projects/{project_id}/templates/merge_requests"
|
163
|
+
_obj_cls = ProjectMergeRequestTemplate
|
164
|
+
_from_parent_attrs = {"project_id": "id"}
|
165
|
+
|
166
|
+
def get(
|
167
|
+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
|
168
|
+
) -> ProjectMergeRequestTemplate:
|
169
|
+
return cast(
|
170
|
+
ProjectMergeRequestTemplate, super().get(id=id, lazy=lazy, **kwargs)
|
171
|
+
)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python-gitlab
|
3
|
-
Version: 5.
|
4
|
-
Summary:
|
3
|
+
Version: 5.3.0
|
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>
|
7
7
|
License: LGPL-3.0-or-later
|
@@ -64,9 +64,10 @@ python-gitlab
|
|
64
64
|
.. image:: https://img.shields.io/github/license/python-gitlab/python-gitlab
|
65
65
|
:target: https://github.com/python-gitlab/python-gitlab/blob/main/COPYING
|
66
66
|
|
67
|
-
``python-gitlab`` is a Python package providing access to the GitLab
|
67
|
+
``python-gitlab`` is a Python package providing access to the GitLab APIs.
|
68
68
|
|
69
|
-
It
|
69
|
+
It includes a client for GitLab's v4 REST API, synchronous and asynchronous GraphQL API
|
70
|
+
clients, as well as a CLI tool (``gitlab``) wrapping REST API endpoints.
|
70
71
|
|
71
72
|
.. _features:
|
72
73
|
|
@@ -78,6 +79,7 @@ Features
|
|
78
79
|
* write Pythonic code to manage your GitLab resources.
|
79
80
|
* pass arbitrary parameters to the GitLab API. Simply follow GitLab's docs
|
80
81
|
on what parameters are available.
|
82
|
+
* use a synchronous or asynchronous client when using the GraphQL API.
|
81
83
|
* access arbitrary endpoints as soon as they are available on GitLab, by using
|
82
84
|
lower-level API methods.
|
83
85
|
* use persistent requests sessions for authentication, proxy and certificate handling.
|
@@ -1,9 +1,9 @@
|
|
1
|
-
gitlab/__init__.py,sha256=
|
1
|
+
gitlab/__init__.py,sha256=UP73h54550MIXpRt5OCLJJ-oBHIx1iHSdxmGARfhbO4,1440
|
2
2
|
gitlab/__main__.py,sha256=HTesNl0UAU6mPb9EXWkTKMy6Q6pAUxGi3iPnDHTE2uE,68
|
3
|
-
gitlab/_version.py,sha256=
|
3
|
+
gitlab/_version.py,sha256=IlLSu5MBFtgm1x-7MWRcmWiS08XRZAvuGg9iod-SY0E,249
|
4
4
|
gitlab/base.py,sha256=-4DNPEWtOB1sGmETTivrJVyl-DWtbmWTUIDTHpenF9Y,13810
|
5
5
|
gitlab/cli.py,sha256=d3-LtZuA1Fgon5wZWn4c3E70fTIu4mM4Juyhh3F8EBs,12416
|
6
|
-
gitlab/client.py,sha256=
|
6
|
+
gitlab/client.py,sha256=RLJZ7QIyc_bprHYCt0yu81ltImd4dLOHmMB_PP2H9VE,54798
|
7
7
|
gitlab/config.py,sha256=T1DgUXD0-MN2qNszrv-SO5d4uy0FITnNN0vWJgOt2yo,9088
|
8
8
|
gitlab/const.py,sha256=CD9ahY-Tefhc6OHsmHG0lj5uPdH1DwU1xZmSQfho_ao,5374
|
9
9
|
gitlab/exceptions.py,sha256=VOQftPzEq5mpVj6vke7z6Xe4S7Yf_rDTab0lNHqf3AY,8390
|
@@ -12,12 +12,12 @@ gitlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
gitlab/types.py,sha256=lepiiI_YOr94B4koqIHuY70tszZC_X3YW4lDvbadbI8,3312
|
13
13
|
gitlab/utils.py,sha256=3OngV45Gb4UO2GR-6-kXax1Ghdw6bpyRdUC2cHpyCSw,9027
|
14
14
|
gitlab/_backends/__init__.py,sha256=WalQZRIDzw19FuNxraG7fvck6ddg4cdNd3bi53QKvZM,392
|
15
|
-
gitlab/_backends/graphql.py,sha256=
|
15
|
+
gitlab/_backends/graphql.py,sha256=wUEjrtz4KAFIFLc13cTj8D1757yeSeViX-xzoDy90Is,1450
|
16
16
|
gitlab/_backends/protocol.py,sha256=m5qSz1o3i0H4XJCWnqx0wIFilOIU9cKxzFsYxLL6Big,842
|
17
17
|
gitlab/_backends/requests_backend.py,sha256=CrSDTfkvi17dT4kTU8R3qQFBNCPJqEfBJq4gJ2GXleA,5534
|
18
18
|
gitlab/v4/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
gitlab/v4/cli.py,sha256=vVWbeOWUdIPagCRcR-myY6E5tPVmhomroT1y6r2HwsQ,22721
|
20
|
-
gitlab/v4/objects/__init__.py,sha256=
|
20
|
+
gitlab/v4/objects/__init__.py,sha256=nlSGSvKFK9b9o131iAzjT5aB2DfUldTpsSgVl1AjeHk,2153
|
21
21
|
gitlab/v4/objects/access_requests.py,sha256=pPYwB-b4fvKVdBoBRpzx2ensiMXbQwmBkN0XBh6ScaA,923
|
22
22
|
gitlab/v4/objects/appearance.py,sha256=uMt0bjo_KlxwKHItFzGMY9vXm5e489UG_o0EcFVJE8E,1932
|
23
23
|
gitlab/v4/objects/applications.py,sha256=FB1Se6Xa3CFLJlSeZ7lLoyAwY8cAF4DUDsuc59NGpcs,591
|
@@ -73,9 +73,10 @@ gitlab/v4/objects/pages.py,sha256=Z9x9Sd21daSLmapkBLoV3bKmxQu-JFtrHgJMBjfNbg8,18
|
|
73
73
|
gitlab/v4/objects/personal_access_tokens.py,sha256=vMsAytE5czai3fpyTCyV1sR3cZDZRhvI06u08L8O7mw,1315
|
74
74
|
gitlab/v4/objects/pipelines.py,sha256=nQrzNW6WCTcDCqz_nl8i7YYGpXfRaEVGGpeRdObjeW0,10664
|
75
75
|
gitlab/v4/objects/project_access_tokens.py,sha256=z_BCaBtXC7wzGVN6Ip0H72VwHID8XEBHDddCw0J8hO0,1043
|
76
|
-
gitlab/v4/objects/projects.py,sha256=
|
76
|
+
gitlab/v4/objects/projects.py,sha256=YBJjgTb6c38tR0fzvwe7dSiZXn0KHiVQAsFfE0KfyvY,45703
|
77
77
|
gitlab/v4/objects/push_rules.py,sha256=0dKMWEzF5h1zATh0_j_SvjQ7HKx9_5M7J9hzDGB66Rc,3041
|
78
78
|
gitlab/v4/objects/registry_protection_rules.py,sha256=bZsUAjoxwQEHOfr4Bxz6FQA2MGHZpWOFz00o99hcfI4,1092
|
79
|
+
gitlab/v4/objects/registry_repository_protection_rules.py,sha256=wM34rOsgH-CD0d5FtLI5V4u60_cZUXMCUA4RvMETe7A,1153
|
79
80
|
gitlab/v4/objects/releases.py,sha256=j4_45oOj2yaA2XZ3fwBcKhFJ6li4vQy_zyr013LKfvY,1972
|
80
81
|
gitlab/v4/objects/repositories.py,sha256=RfOzuEvq_dBY1t6KaHG939tfsto9PiyMi-y_ikXSqkU,11221
|
81
82
|
gitlab/v4/objects/resource_groups.py,sha256=fYYnA2YO9CSTzxwImVCVPSiPkIeNpKRrPj7dpzwati4,1427
|
@@ -88,17 +89,17 @@ gitlab/v4/objects/sidekiq.py,sha256=kIMgglIBJkbA_io9MXwkCEUs8mZPte6sFQYoWH1TXI4,
|
|
88
89
|
gitlab/v4/objects/snippets.py,sha256=Tq_-9thqcFWN0AqfYOROxwbXfKqlY0zLqbVcp7nww3w,8176
|
89
90
|
gitlab/v4/objects/statistics.py,sha256=NPN8WpCwFJeWeLcn5zahwAgzpJl-Q6bJyoi5ff8XCRQ,2638
|
90
91
|
gitlab/v4/objects/tags.py,sha256=LCvSzI44a1NlrUVi5A_2eOwFSOJjVBSkWe71QdXH_68,1453
|
91
|
-
gitlab/v4/objects/templates.py,sha256=
|
92
|
+
gitlab/v4/objects/templates.py,sha256=IBu46OdUsYwAvozGwPoFLoQf61jdp3_VGcIPbL3ni6c,5092
|
92
93
|
gitlab/v4/objects/todos.py,sha256=HMqvK9CDyxj2jwSQKjnaTLmMztDhqIL_62CHh6Rh4lk,1846
|
93
94
|
gitlab/v4/objects/topics.py,sha256=rJU4q2gH8caaJXgBV81x9docr5XobZBaI-9vPmgCvXQ,2208
|
94
95
|
gitlab/v4/objects/triggers.py,sha256=UAERq_C-QdPBbBQPHLh5IfhpkdDeIxdnVGPHfu9Qy5Y,824
|
95
96
|
gitlab/v4/objects/users.py,sha256=_gGrTwcE17jeoXIPgfFSv54jtF1_9C1R0Y0hhssTvXY,21381
|
96
97
|
gitlab/v4/objects/variables.py,sha256=S0Vz32jEpUbo4J2js8gMPPTVpcy1ge5FYVHLiPz9c-A,2627
|
97
98
|
gitlab/v4/objects/wikis.py,sha256=JtI1cQqZV1_PRfKVlQRMh4LZjdxEfi9T2VuFYv6PrV8,1775
|
98
|
-
python_gitlab-5.
|
99
|
-
python_gitlab-5.
|
100
|
-
python_gitlab-5.
|
101
|
-
python_gitlab-5.
|
102
|
-
python_gitlab-5.
|
103
|
-
python_gitlab-5.
|
104
|
-
python_gitlab-5.
|
99
|
+
python_gitlab-5.3.0.dist-info/AUTHORS,sha256=Z0P61GJSVnp7iFbRcMezhx3f4zMyPkVmG--TWaRo768,526
|
100
|
+
python_gitlab-5.3.0.dist-info/COPYING,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
101
|
+
python_gitlab-5.3.0.dist-info/METADATA,sha256=BgQ3nNUcVKVi0Pgef8ExSANM5RgQJ3zYofF1NP1iKy0,8478
|
102
|
+
python_gitlab-5.3.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
103
|
+
python_gitlab-5.3.0.dist-info/entry_points.txt,sha256=nhpKLLP_uQPFByn8UtE9zsvQQwa402t52o_Cw9IFXMo,43
|
104
|
+
python_gitlab-5.3.0.dist-info/top_level.txt,sha256=MvIaP8p_Oaf4gO_hXmHkX-5y2deHLp1pe6tJR3ukQ6o,7
|
105
|
+
python_gitlab-5.3.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|