python-gitlab 4.12.2__py3-none-any.whl → 5.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 CHANGED
@@ -3,4 +3,4 @@ __copyright__ = "Copyright 2013-2019 Gauvain Pocentek, 2019-2023 python-gitlab t
3
3
  __email__ = "gauvainpocentek@gmail.com"
4
4
  __license__ = "LGPL3"
5
5
  __title__ = "python-gitlab"
6
- __version__ = "4.12.2"
6
+ __version__ = "5.0.0"
gitlab/base.py CHANGED
@@ -201,12 +201,12 @@ class RESTObject:
201
201
  # NOTE(jlvillal): We are creating our managers by looking at the class
202
202
  # annotations. If an attribute is annotated as being a *Manager type
203
203
  # then we create the manager and assign it to the attribute.
204
- for attr, annotation in sorted(self.__annotations__.items()):
204
+ for attr, annotation in sorted(self.__class__.__annotations__.items()):
205
205
  # We ignore creating a manager for the 'manager' attribute as that
206
206
  # is done in the self.__init__() method
207
207
  if attr in ("manager",):
208
208
  continue
209
- if not isinstance(annotation, (type, str)):
209
+ if not isinstance(annotation, (type, str)): # pragma: no cover
210
210
  continue
211
211
  if isinstance(annotation, type):
212
212
  cls_name = annotation.__name__
@@ -54,6 +54,7 @@ class ProjectApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
54
54
 
55
55
  class ProjectApprovalRule(SaveMixin, ObjectDeleteMixin, RESTObject):
56
56
  _id_attr = "id"
57
+ _repr_attr = "name"
57
58
 
58
59
 
59
60
  class ProjectApprovalRuleManager(
@@ -1,7 +1,17 @@
1
1
  from typing import Any, cast, Union
2
2
 
3
3
  from gitlab.base import RESTManager, RESTObject
4
- from gitlab.mixins import CRUDMixin, ListMixin, ObjectDeleteMixin, SaveMixin
4
+ from gitlab.mixins import (
5
+ CRUDMixin,
6
+ DeleteMixin,
7
+ GetWithoutIdMixin,
8
+ ListMixin,
9
+ ObjectDeleteMixin,
10
+ RefreshMixin,
11
+ SaveMixin,
12
+ UpdateMethod,
13
+ UpdateMixin,
14
+ )
5
15
  from gitlab.types import RequiredOptional
6
16
 
7
17
  __all__ = [
@@ -9,6 +19,8 @@ __all__ = [
9
19
  "PagesDomainManager",
10
20
  "ProjectPagesDomain",
11
21
  "ProjectPagesDomainManager",
22
+ "ProjectPages",
23
+ "ProjectPagesManager",
12
24
  ]
13
25
 
14
26
 
@@ -38,3 +50,20 @@ class ProjectPagesDomainManager(CRUDMixin, RESTManager):
38
50
  self, id: Union[str, int], lazy: bool = False, **kwargs: Any
39
51
  ) -> ProjectPagesDomain:
40
52
  return cast(ProjectPagesDomain, super().get(id=id, lazy=lazy, **kwargs))
53
+
54
+
55
+ class ProjectPages(ObjectDeleteMixin, RefreshMixin, RESTObject):
56
+ _id_attr = None
57
+
58
+
59
+ class ProjectPagesManager(DeleteMixin, UpdateMixin, GetWithoutIdMixin, RESTManager):
60
+ _path = "/projects/{project_id}/pages"
61
+ _obj_cls = ProjectPages
62
+ _from_parent_attrs = {"project_id": "id"}
63
+ _update_attrs = RequiredOptional(
64
+ optional=("pages_unique_domain_enabled", "pages_https_only")
65
+ )
66
+ _update_method: UpdateMethod = UpdateMethod.PATCH
67
+
68
+ def get(self, **kwargs: Any) -> ProjectPages:
69
+ return cast(ProjectPages, super().get(**kwargs))
@@ -78,7 +78,7 @@ from .notes import ProjectNoteManager # noqa: F401
78
78
  from .notification_settings import ProjectNotificationSettingsManager # noqa: F401
79
79
  from .package_protection_rules import ProjectPackageProtectionRuleManager
80
80
  from .packages import GenericPackageManager, ProjectPackageManager # noqa: F401
81
- from .pages import ProjectPagesDomainManager # noqa: F401
81
+ from .pages import ProjectPagesDomainManager, ProjectPagesManager # noqa: F401
82
82
  from .pipelines import ( # noqa: F401
83
83
  ProjectPipeline,
84
84
  ProjectPipelineManager,
@@ -216,6 +216,7 @@ class Project(
216
216
  notificationsettings: ProjectNotificationSettingsManager
217
217
  packages: ProjectPackageManager
218
218
  package_protection_rules: ProjectPackageProtectionRuleManager
219
+ pages: ProjectPagesManager
219
220
  pagesdomains: ProjectPagesDomainManager
220
221
  pipelines: ProjectPipelineManager
221
222
  pipelineschedules: ProjectPipelineScheduleManager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-gitlab
3
- Version: 4.12.2
3
+ Version: 5.0.0
4
4
  Summary: A python wrapper for the GitLab API
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>
@@ -19,12 +19,12 @@ Classifier: Operating System :: POSIX
19
19
  Classifier: Operating System :: Microsoft :: Windows
20
20
  Classifier: Programming Language :: Python
21
21
  Classifier: Programming Language :: Python :: 3
22
- Classifier: Programming Language :: Python :: 3.8
23
22
  Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
25
24
  Classifier: Programming Language :: Python :: 3.11
26
25
  Classifier: Programming Language :: Python :: 3.12
27
- Requires-Python: >=3.8.0
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Requires-Python: >=3.9.0
28
28
  Description-Content-Type: text/x-rst
29
29
  License-File: COPYING
30
30
  License-File: AUTHORS
@@ -90,7 +90,7 @@ Features
90
90
  Installation
91
91
  ------------
92
92
 
93
- As of 4.0.0, ``python-gitlab`` is compatible with Python 3.8+.
93
+ As of 5.0.0, ``python-gitlab`` is compatible with Python 3.9+.
94
94
 
95
95
  Use ``pip`` to install the latest stable version of ``python-gitlab``:
96
96
 
@@ -1,7 +1,7 @@
1
1
  gitlab/__init__.py,sha256=DlY_IEbIbeTJnMfkcl4866XbJ_50UiaE4yI0PwOq36E,1406
2
2
  gitlab/__main__.py,sha256=HTesNl0UAU6mPb9EXWkTKMy6Q6pAUxGi3iPnDHTE2uE,68
3
- gitlab/_version.py,sha256=SjNFbrDkUxHkuiTFwBVJBRUlBxRBAmC7p0HnmwGphm8,250
4
- gitlab/base.py,sha256=5cotawlHD01Vw88aN4o7wNIhDyk_bmcwubX4mbOpnVo,13780
3
+ gitlab/_version.py,sha256=MBbDq4BnGsPrCgp7VE3oatn4XZAZ4SsFUnCQLXDTMyU,249
4
+ gitlab/base.py,sha256=-4DNPEWtOB1sGmETTivrJVyl-DWtbmWTUIDTHpenF9Y,13810
5
5
  gitlab/cli.py,sha256=d3-LtZuA1Fgon5wZWn4c3E70fTIu4mM4Juyhh3F8EBs,12416
6
6
  gitlab/client.py,sha256=WK13AV69dJg-5dWIcYV51_ylExuZolrCGXSLHT1vDkU,51217
7
7
  gitlab/config.py,sha256=T1DgUXD0-MN2qNszrv-SO5d4uy0FITnNN0vWJgOt2yo,9088
@@ -60,7 +60,7 @@ gitlab/v4/objects/keys.py,sha256=IclYGSzcVEZPIhDdIz-p16rvb68FnBTgAf1cWCXWjkY,882
60
60
  gitlab/v4/objects/labels.py,sha256=JvOciJ6V76pF9HuJp5OT_Ykq8oqaa6ItxvpKf3hiEzs,4736
61
61
  gitlab/v4/objects/ldap.py,sha256=adpkdfk7VBjshuh8SpCsc77Pax4QgqCx1N12CuzitDE,1662
62
62
  gitlab/v4/objects/members.py,sha256=YJO9MaqlCSUnozHIlI7MfSlcWTju4xRmW8QIlEiBmok,3902
63
- gitlab/v4/objects/merge_request_approvals.py,sha256=oPZFd4AUtrAVhBTa0iM4krNkk2UTNOTw_MWlEWo2HAQ,6400
63
+ gitlab/v4/objects/merge_request_approvals.py,sha256=A_ZtuRsAsWXHb4QYwL9jZg5Xim8YSmRitXy9MO5tDEY,6424
64
64
  gitlab/v4/objects/merge_requests.py,sha256=GftA_42h4zyS7LG7-lmf4wG5gJPHkYqQwPXFB-Sywxs,18532
65
65
  gitlab/v4/objects/merge_trains.py,sha256=e0Gp2Ri75elcG_r9w8qxdrcWW_YiebPRwUYIH5od8kc,422
66
66
  gitlab/v4/objects/milestones.py,sha256=LHAGYJlTm2ed3eqv4mTO-QZ7vRbwGXRFpre_G4gHdKY,7073
@@ -69,11 +69,11 @@ gitlab/v4/objects/notes.py,sha256=Y0wrSD2pwvzX1RfyzyeXMMBy0_jOsWsaIUpa6CYWprg,85
69
69
  gitlab/v4/objects/notification_settings.py,sha256=zhltGjuu1HiqdON2v9-uKu7Z6TOOBOgQ3GdWgfEAJ64,2061
70
70
  gitlab/v4/objects/package_protection_rules.py,sha256=OVO9R_ePWjNFKK8LCuycGpCds6Yj6ZFtirZRSlzKa7Q,1129
71
71
  gitlab/v4/objects/packages.py,sha256=4tEocanjw1GlFvfOncCY0Z-jJfjiFLhZeUiBIjLz9_g,7225
72
- gitlab/v4/objects/pages.py,sha256=o6EHYJa-4qo8-IolppZk5Y5o64CAIlLceW2LPNR3nM4,1141
72
+ gitlab/v4/objects/pages.py,sha256=Z9x9Sd21daSLmapkBLoV3bKmxQu-JFtrHgJMBjfNbg8,1868
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=nak5EdNhUFSXznSddbMZZ3kBTeOyidOTMX7nFSO0MZg,44824
76
+ gitlab/v4/objects/projects.py,sha256=SsUh4mNcKrHqoFhgxGvj9Q2tnuZg7zHaSkidfxoWQSM,44876
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
79
  gitlab/v4/objects/releases.py,sha256=j4_45oOj2yaA2XZ3fwBcKhFJ6li4vQy_zyr013LKfvY,1972
@@ -95,10 +95,10 @@ gitlab/v4/objects/triggers.py,sha256=UAERq_C-QdPBbBQPHLh5IfhpkdDeIxdnVGPHfu9Qy5Y
95
95
  gitlab/v4/objects/users.py,sha256=_gGrTwcE17jeoXIPgfFSv54jtF1_9C1R0Y0hhssTvXY,21381
96
96
  gitlab/v4/objects/variables.py,sha256=S0Vz32jEpUbo4J2js8gMPPTVpcy1ge5FYVHLiPz9c-A,2627
97
97
  gitlab/v4/objects/wikis.py,sha256=JtI1cQqZV1_PRfKVlQRMh4LZjdxEfi9T2VuFYv6PrV8,1775
98
- python_gitlab-4.12.2.dist-info/AUTHORS,sha256=Z0P61GJSVnp7iFbRcMezhx3f4zMyPkVmG--TWaRo768,526
99
- python_gitlab-4.12.2.dist-info/COPYING,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
100
- python_gitlab-4.12.2.dist-info/METADATA,sha256=_wrnXhZ_6bvybS6wetD9T52i6MXk87DSKOx-pI0pxn0,8311
101
- python_gitlab-4.12.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
102
- python_gitlab-4.12.2.dist-info/entry_points.txt,sha256=nhpKLLP_uQPFByn8UtE9zsvQQwa402t52o_Cw9IFXMo,43
103
- python_gitlab-4.12.2.dist-info/top_level.txt,sha256=MvIaP8p_Oaf4gO_hXmHkX-5y2deHLp1pe6tJR3ukQ6o,7
104
- python_gitlab-4.12.2.dist-info/RECORD,,
98
+ python_gitlab-5.0.0.dist-info/AUTHORS,sha256=Z0P61GJSVnp7iFbRcMezhx3f4zMyPkVmG--TWaRo768,526
99
+ python_gitlab-5.0.0.dist-info/COPYING,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
100
+ python_gitlab-5.0.0.dist-info/METADATA,sha256=hUYF5V2r9hxIyoJMPP0QD7Lrq0mFwZ2JjLYgJgAJRWE,8311
101
+ python_gitlab-5.0.0.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
102
+ python_gitlab-5.0.0.dist-info/entry_points.txt,sha256=nhpKLLP_uQPFByn8UtE9zsvQQwa402t52o_Cw9IFXMo,43
103
+ python_gitlab-5.0.0.dist-info/top_level.txt,sha256=MvIaP8p_Oaf4gO_hXmHkX-5y2deHLp1pe6tJR3ukQ6o,7
104
+ python_gitlab-5.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5