python-semantic-release 9.8.8__py3-none-any.whl → 9.9.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.
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-semantic-release
3
+ Version: 9.9.0
4
+ Summary: Automatic Semantic Versioning for Python projects
5
+ Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
+ License: MIT
7
+ Project-URL: changelog, https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md
8
+ Project-URL: documentation, https://python-semantic-release.readthedocs.io
9
+ Project-URL: homepage, https://python-semantic-release.readthedocs.io
10
+ Project-URL: issues, https://github.com/python-semantic-release/python-semantic-release/issues
11
+ Project-URL: repository, http://github.com/python-semantic-release/python-semantic-release.git
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/x-rst
21
+ License-File: LICENSE
22
+ License-File: AUTHORS.rst
23
+ Requires-Dist: click~=8.0
24
+ Requires-Dist: click-option-group~=0.5
25
+ Requires-Dist: gitpython~=3.0
26
+ Requires-Dist: requests~=2.25
27
+ Requires-Dist: jinja2~=3.1
28
+ Requires-Dist: python-gitlab~=4.0
29
+ Requires-Dist: tomlkit~=0.11
30
+ Requires-Dist: dotty-dict~=1.3
31
+ Requires-Dist: importlib-resources~=6.0
32
+ Requires-Dist: pydantic~=2.0
33
+ Requires-Dist: rich~=13.0
34
+ Requires-Dist: shellingham~=1.5
35
+ Provides-Extra: build
36
+ Requires-Dist: build~=1.2; extra == "build"
37
+ Provides-Extra: dev
38
+ Requires-Dist: pre-commit~=3.5; extra == "dev"
39
+ Requires-Dist: tox~=4.11; extra == "dev"
40
+ Requires-Dist: ruff==0.6.1; extra == "dev"
41
+ Provides-Extra: docs
42
+ Requires-Dist: Sphinx~=6.0; extra == "docs"
43
+ Requires-Dist: sphinxcontrib-apidoc==0.5.0; extra == "docs"
44
+ Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
45
+ Requires-Dist: furo~=2024.1; extra == "docs"
46
+ Provides-Extra: mypy
47
+ Requires-Dist: mypy==1.11.2; extra == "mypy"
48
+ Requires-Dist: types-requests~=2.32.0; extra == "mypy"
49
+ Provides-Extra: test
50
+ Requires-Dist: coverage[toml]~=7.0; extra == "test"
51
+ Requires-Dist: pyyaml~=6.0; extra == "test"
52
+ Requires-Dist: pytest~=8.3; extra == "test"
53
+ Requires-Dist: pytest-env~=1.0; extra == "test"
54
+ Requires-Dist: pytest-xdist~=3.0; extra == "test"
55
+ Requires-Dist: pytest-mock~=3.0; extra == "test"
56
+ Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
57
+ Requires-Dist: pytest-cov~=5.0; extra == "test"
58
+ Requires-Dist: pytest-pretty~=1.2; extra == "test"
59
+ Requires-Dist: pytest-clarity~=1.0; extra == "test"
60
+ Requires-Dist: responses~=0.25.0; extra == "test"
61
+ Requires-Dist: requests-mock~=1.10; extra == "test"
62
+
63
+ Python Semantic Release
64
+ ***********************
65
+
66
+ *Automating Releases via SemVer and Commit Message Conventions*
67
+
68
+ ----
69
+
70
+ The official documentation for Python Semantic Release can be found at
71
+ `python-semantic-release.readthedocs.io`_.
72
+
73
+ GitHub Action
74
+ =============
75
+
76
+ When using the Python Semantic Release GitHub Action, it executes the command
77
+ ``semantic-release version`` using `python-semantic-release`_.
78
+
79
+ The usage information and examples for this GitHub Action is available under
80
+ the `GitHub Actions section`_ of `python-semantic-release.readthedocs.io`_.
81
+
82
+ .. _python-semantic-release: https://pypi.org/project/python-semantic-release/
83
+ .. _python-semantic-release.readthedocs.io: https://python-semantic-release.readthedocs.io/en/latest/
84
+ .. _GitHub Actions section: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
@@ -1,4 +1,4 @@
1
- semantic_release/__init__.py,sha256=OLC_2ndTRTpVvDlv0Ib9VbuVj9atXP68lcn6i0A3NWs,1228
1
+ semantic_release/__init__.py,sha256=7HrApLLeToDPOB2RQ_5Gl3Qy0WOAYS2AN9Itlv02fvk,1228
2
2
  semantic_release/__main__.py,sha256=blPn7CMpuSe4Z-GBIDv0QA0OEDTMGU-7edsLRkkhPR4,120
3
3
  semantic_release/const.py,sha256=Z1o2QNh60wSLeF-_1TemMBjU3ZXbV0XghnUFsbTVfOs,831
4
4
  semantic_release/enums.py,sha256=D5B_reQGGKQQT22HO5PUtvn2Bok3fkht6TfJtXkmAUg,1020
@@ -12,9 +12,9 @@ semantic_release/changelog/template.py,sha256=JqZcjdozM9-059Sa8PfiHxYNeyZFa0jxk_
12
12
  semantic_release/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  semantic_release/cli/changelog_writer.py,sha256=OVuRI7RTMsMGIaxyEN4kb8N4j08OHNvSyRyj6iBR_ME,5162
14
14
  semantic_release/cli/cli_context.py,sha256=23eyV6KWIpUckUSWILEd7t9dixp-QCY5-kGZnyucEYY,4114
15
- semantic_release/cli/config.py,sha256=WA3d0cidvCYbFLq1UdHQsnlz47hrth-Oc7NHltUPCpE,24223
15
+ semantic_release/cli/config.py,sha256=bI0v896k0mheNn6_yZpYp6D-q83hx0gcddqYkyJejdo,24845
16
16
  semantic_release/cli/const.py,sha256=S8oNNpSaKdZxcAs7PAKEjQHic0czoJBGd7XHo57FOzw,39
17
- semantic_release/cli/github_actions_output.py,sha256=Wy4jEIpSFgoMyJqq4FD7scIpgovivutFLZ7Fs4y2CUY,2110
17
+ semantic_release/cli/github_actions_output.py,sha256=VYIOb5x5h8eEJdSlXM_mkhT9xXtYi-RgxvnoM7iUn8s,2288
18
18
  semantic_release/cli/masking_filter.py,sha256=DxqjiJyABlzwwwZ1r8JGQpb6QrF00StJFm0-2-s5Fv0,3071
19
19
  semantic_release/cli/util.py,sha256=FyXaBkeL7nXKjy3X9rQLEwvn7p46xPekp2V8Z-5MVrk,3755
20
20
  semantic_release/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -22,7 +22,7 @@ semantic_release/cli/commands/changelog.py,sha256=bqnJwv0pgvEOroZEMixEa8IUby-cvg
22
22
  semantic_release/cli/commands/generate_config.py,sha256=2xZOu3NpyhBp0pWr7d8ugKl_kjqQgpSsSMHq5wHTfrE,1699
23
23
  semantic_release/cli/commands/main.py,sha256=kqO8bZw9Nv6T5QkIl53zzmH2rd4LuLoA8agweH0VYPY,4022
24
24
  semantic_release/cli/commands/publish.py,sha256=SZQlIewvqyIC14dkIIVVFetE0tPsKbO1cUyxnZsicrw,2845
25
- semantic_release/cli/commands/version.py,sha256=IAA4OlvTVPdN_82AZgLX6VIcygwyXPUkaMKI_C_Up90,24336
25
+ semantic_release/cli/commands/version.py,sha256=UjjBlv2IQs21LRQ3APeRUXwjZ20MXMBXBhykzGjj46c,24231
26
26
  semantic_release/commit_parser/__init__.py,sha256=cv5HFBdw7OJd4Laj4Ex8ZZ5Tml8GwXgQcXW6Pasr2Ao,615
27
27
  semantic_release/commit_parser/_base.py,sha256=t-Z9ALgAe7aZpYXz1mk3Fe-uAvipgKdNrq4Okg_WW9c,3026
28
28
  semantic_release/commit_parser/angular.py,sha256=ERWeTBTFNIBOaTIopY4Vff0KbeFwrSQWbADe3smVW-8,4579
@@ -36,21 +36,21 @@ semantic_release/data/templates/release_notes.md.j2,sha256=27uIHgG6iYmqdMaoWFP5L
36
36
  semantic_release/hvcs/__init__.py,sha256=JwoaLOF-12L-OBo_9-tOXXhdiHKeVungA9865to2oZk,494
37
37
  semantic_release/hvcs/_base.py,sha256=9-iTqTPSbiEevKbCBP9K2hq4c-2T4wPbeLWe-kAxBzo,2607
38
38
  semantic_release/hvcs/bitbucket.py,sha256=nqlOmeNda0sRSEBGWMluphy1KlpRTQrHV7itxf0IXE0,9266
39
- semantic_release/hvcs/gitea.py,sha256=XPwsjQ1XeSAdAsAjW7_QJdjxfTPJvW-Vnmoze7kCZP8,11919
39
+ semantic_release/hvcs/gitea.py,sha256=nJ1jdoOuNh_Xbcxc0R_vtLkeBmQ03FxewgBWx0kyUFI,11926
40
40
  semantic_release/hvcs/github.py,sha256=TVXlviaXn2N_DBH0GxvIhTH-SQdn5mxbkjgu8rvb1y0,19148
41
- semantic_release/hvcs/gitlab.py,sha256=ia8Gjfm8mIctlEu5xqMPa-6t7YGSZQUbzKhKzgRuC3Q,9683
41
+ semantic_release/hvcs/gitlab.py,sha256=f8mr9NoExphi4tZr4WSwwfkKxEmf356w_k_f2krACqQ,9234
42
42
  semantic_release/hvcs/remote_hvcs_base.py,sha256=2TaPPp1NzsQjUMOKa0NjqkjYTxJpX245qGm7-GCrnx8,6085
43
43
  semantic_release/hvcs/token_auth.py,sha256=ZjT56-NIPB4OKIt1qwHCu1TavXnrWFIBl9ARlg56hgU,663
44
- semantic_release/hvcs/util.py,sha256=PNKXApgL2np9lpnKjAbo77toRgElLPXrbS1q7621waI,2886
44
+ semantic_release/hvcs/util.py,sha256=Mgr1dExd6E3qOpeeF8vRX9joP52YV9e82S68z8xa4KM,2859
45
45
  semantic_release/version/__init__.py,sha256=CLhtGQry9dLIij5XyRa9ZevxU_1p8tjMTSQ-K_GMpWM,270
46
46
  semantic_release/version/algorithm.py,sha256=ofx_bIWq6ptJVr-ekI11IzxzDEctDKFiVwaSmmmgRlE,16870
47
47
  semantic_release/version/declaration.py,sha256=f6Ld7hIhrqvDrRBapJHr-KDimuyo-4IG8009Zu9BIgU,7357
48
48
  semantic_release/version/translator.py,sha256=P1noIsVBn8u6zNOFjG0xKYOWapxqf_PHSMvMeLJ9kXg,3050
49
49
  semantic_release/version/version.py,sha256=6PCtSbLP88U1daoxnCwHc--YguZo4waGNLqJ5JfeczE,14175
50
- python_semantic_release-9.8.8.dist-info/AUTHORS.rst,sha256=XOReVvpymEFUPsS2QPH97jlfJBVrxwS2eu8-jVAe4gk,230
51
- python_semantic_release-9.8.8.dist-info/LICENSE,sha256=NE85nszX252sdQdu0xgS9qwfYES0k8qS6gW3uO4jRGE,1083
52
- python_semantic_release-9.8.8.dist-info/METADATA,sha256=dsdO3Ul8f2a6M1m-nBB974OIhwaGmS4bd1PBaiAWESQ,5284
53
- python_semantic_release-9.8.8.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
54
- python_semantic_release-9.8.8.dist-info/entry_points.txt,sha256=6bS6euSagjerp7onDtfI9_ZpczWreZF3gjHfGAegkbo,123
55
- python_semantic_release-9.8.8.dist-info/top_level.txt,sha256=qYA24nyg3eP-ti5UW7Vuj2aXVmM0wqVHx4mREdRZNAA,17
56
- python_semantic_release-9.8.8.dist-info/RECORD,,
50
+ python_semantic_release-9.9.0.dist-info/AUTHORS.rst,sha256=XOReVvpymEFUPsS2QPH97jlfJBVrxwS2eu8-jVAe4gk,230
51
+ python_semantic_release-9.9.0.dist-info/LICENSE,sha256=NE85nszX252sdQdu0xgS9qwfYES0k8qS6gW3uO4jRGE,1083
52
+ python_semantic_release-9.9.0.dist-info/METADATA,sha256=Hz21ONNLpASUxwoTtHT3wiLWQm6Njzr72BaS9lP9cKc,3520
53
+ python_semantic_release-9.9.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
54
+ python_semantic_release-9.9.0.dist-info/entry_points.txt,sha256=6bS6euSagjerp7onDtfI9_ZpczWreZF3gjHfGAegkbo,123
55
+ python_semantic_release-9.9.0.dist-info/top_level.txt,sha256=qYA24nyg3eP-ti5UW7Vuj2aXVmM0wqVHx4mREdRZNAA,17
56
+ python_semantic_release-9.9.0.dist-info/RECORD,,
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.8.8"
27
+ __version__ = "9.9.0"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -219,19 +219,12 @@ def build_distributions(
219
219
  """
220
220
  Run the build command to build the distributions.
221
221
 
222
- Arguments:
223
- ---------
224
- build_command: str | None
225
- The build command to run
226
- build_command_env: Mapping[str, str] | None
227
- The environment variables to use when running the build command
228
- noop: bool
229
- Whether or not to run the build command
230
-
231
- Raises:
232
- ------
233
- BuildDistributionsError: if the build command fails
222
+ :param build_command: The build command to run.
223
+ :param build_command_env: The environment variables to use when running the
224
+ build command.
225
+ :param noop: Whether or not to run the build command.
234
226
 
227
+ :raises: BuildDistributionsError: if the build command fails
235
228
  """
236
229
  if not build_command:
237
230
  rprint("[green]No build command specified, skipping")
@@ -540,7 +540,18 @@ class RuntimeContext:
540
540
  try:
541
541
  path, variable = decl.split(":", maxsplit=1)
542
542
  # VersionDeclarationABC handles path existence check
543
- search_text = rf"(?x){variable}\s*(:=|[:=])\s*(?P<quote>['\"])(?P<version>{SEMVER_REGEX.pattern})(?P=quote)" # noqa: E501
543
+ search_text = str.join(
544
+ "",
545
+ [
546
+ # Supports optional matching quotations around variable name
547
+ # Negative lookbehind to ensure we don't match part of a variable name
548
+ f"""(?x)(?P<quote1>['"])?(?<![\\w.-]){variable}(?P=quote1)?""",
549
+ # Supports walrus, equals sign, or colon as assignment operator ignoring whitespace separation
550
+ r"\s*(:=|[:=])\s*",
551
+ # Supports optional matching quotations around version number of a SEMVER pattern
552
+ f"""(?P<quote2>['"])?(?P<version>{SEMVER_REGEX.pattern})(?P=quote2)?""",
553
+ ],
554
+ )
544
555
  pd = PatternVersionDeclaration(path, search_text)
545
556
  except ValueError as exc:
546
557
  log.exception("Invalid variable declaration %r", decl)
@@ -12,7 +12,9 @@ class VersionGitHubActionsOutput:
12
12
  OUTPUT_ENV_VAR = "GITHUB_OUTPUT"
13
13
 
14
14
  def __init__(
15
- self, released: bool | None = None, version: Version | None = None
15
+ self,
16
+ released: bool | None = None,
17
+ version: Version | None = None,
16
18
  ) -> None:
17
19
  self._released = released
18
20
  self._version = version
@@ -29,9 +31,7 @@ class VersionGitHubActionsOutput:
29
31
 
30
32
  @property
31
33
  def version(self) -> Version | None:
32
- if self._version is None:
33
- return None
34
- return self._version
34
+ return self._version if self._version is not None else None
35
35
 
36
36
  @version.setter
37
37
  def version(self, value: Version) -> None:
@@ -41,9 +41,11 @@ class VersionGitHubActionsOutput:
41
41
 
42
42
  @property
43
43
  def tag(self) -> str | None:
44
- if self._version is None:
45
- return None
46
- return self._version.as_tag()
44
+ return self.version.as_tag() if self.version is not None else None
45
+
46
+ @property
47
+ def is_prerelease(self) -> bool | None:
48
+ return self.version.is_prerelease if self.version is not None else None
47
49
 
48
50
  def to_output_text(self) -> str:
49
51
  missing = set()
@@ -61,6 +63,7 @@ class VersionGitHubActionsOutput:
61
63
  "released": str(self.released).lower(),
62
64
  "version": str(self.version),
63
65
  "tag": self.tag,
66
+ "is_prerelease": str(self.is_prerelease).lower(),
64
67
  }
65
68
 
66
69
  return str.join("", [f"{key}={value!s}\n" for key, value in outputs.items()])
@@ -95,11 +95,9 @@ class Gitea(RemoteHvcsBase):
95
95
  Ref: https://gitea.com/api/swagger#/repository/repoCreateRelease
96
96
 
97
97
  :param tag: Tag to create release for
98
-
99
98
  :param release_notes: The release notes for this version
100
-
101
99
  :param prerelease: Whether or not this release should be specified as a
102
- prerelease
100
+ prerelease
103
101
 
104
102
  :return: Whether the request succeeded
105
103
  """
@@ -181,6 +179,7 @@ class Gitea(RemoteHvcsBase):
181
179
  Get a release by its tag name
182
180
  https://gitea.com/api/swagger#/repository/repoGetReleaseByTag
183
181
  :param tag: Tag to get release for
182
+
184
183
  :return: ID of found release
185
184
  """
186
185
  tag_endpoint = self.create_api_url(
@@ -206,6 +205,7 @@ class Gitea(RemoteHvcsBase):
206
205
  https://gitea.com/api/swagger#/repository/repoEditRelease
207
206
  :param id: ID of release to update
208
207
  :param release_notes: The release notes for this version
208
+
209
209
  :return: The ID of the release that was edited
210
210
  """
211
211
  log.info("Updating release %s", release_id)
@@ -231,6 +231,7 @@ class Gitea(RemoteHvcsBase):
231
231
  Post release changelog
232
232
  :param version: The version number
233
233
  :param changelog: The release notes for this version
234
+
234
235
  :return: The status of the request
235
236
  """
236
237
  log.info("Creating release for %s", tag)
@@ -274,6 +275,7 @@ class Gitea(RemoteHvcsBase):
274
275
  :param release_id: ID of the release to upload to
275
276
  :param file: Path of the file to upload
276
277
  :param label: this parameter has no effect
278
+
277
279
  :return: The status of the request
278
280
  """
279
281
  url = self.asset_upload_url(release_id)
@@ -312,6 +314,7 @@ class Gitea(RemoteHvcsBase):
312
314
  Upload distributions to a release
313
315
  :param tag: Tag to upload for
314
316
  :param path: Path to the dist directory
317
+
315
318
  :return: The number of distributions successfully uploaded
316
319
  """
317
320
  # Find the release corresponding to this tag
@@ -106,23 +106,16 @@ class Gitlab(RemoteHvcsBase):
106
106
  """
107
107
  Create a release in a remote VCS, adding any release notes and assets to it
108
108
 
109
- Arguments:
110
- ---------
111
- tag(str): The tag to create the release for
112
- release_notes(str): The changelog description for this version only
113
- prerelease(bool): This parameter has no effect in GitLab
114
- assets(list[str]): A list of paths to files to upload as assets (TODO: not implemented)
115
- noop(bool): If True, do not perform any actions, only log intents
116
-
117
- Returns:
118
- -------
119
- str: The tag of the release
120
-
121
- Raises:
122
- ------
123
- GitlabAuthenticationError: If authentication is not correct
124
- GitlabCreateError: If the server cannot perform the request
109
+ :param tag: The tag to create the release for
110
+ :param release_notes: The changelog description for this version only
111
+ :param prerelease: This parameter has no effect in GitLab
112
+ :param assets: A list of paths to files to upload as assets (TODO: not implemented)
113
+ :param noop: If True, do not perform any actions, only log intents
125
114
 
115
+ :return: The tag of the release
116
+
117
+ :raises: GitlabAuthenticationError: If authentication is not correct
118
+ :raises: GitlabCreateError: If the server cannot perform the request
126
119
  """
127
120
  if noop:
128
121
  noop_report(f"would have created a release for tag {tag}")
@@ -145,20 +138,13 @@ class Gitlab(RemoteHvcsBase):
145
138
  @suppress_not_found
146
139
  def get_release_by_tag(self, tag: str) -> gitlab.v4.objects.ProjectRelease | None:
147
140
  """
148
- Get a release by its tag name
149
-
150
- Arguments:
151
- ---------
152
- tag(str): The tag name to get the release for
141
+ Get a release by its tag name.
153
142
 
154
- Returns:
155
- -------
156
- gitlab.v4.objects.ProjectRelease | None: The release object or None if not found
143
+ :param tag: The tag name to get the release for
157
144
 
158
- Raises:
159
- ------
160
- gitlab.exceptions.GitlabAuthenticationError: If the user is not authenticated
145
+ :return: gitlab.v4.objects.ProjectRelease or None if not found
161
146
 
147
+ :raises: gitlab.exceptions.GitlabAuthenticationError: If the user is not authenticated
162
148
  """
163
149
  try:
164
150
  return self.project.releases.get(tag)
@@ -175,21 +161,15 @@ class Gitlab(RemoteHvcsBase):
175
161
  release_notes: str,
176
162
  ) -> str:
177
163
  """
178
- Update the release notes for a given release
164
+ Update the release notes for a given release.
179
165
 
180
- Arguments:
181
- ---------
182
- release(gitlab.v4.objects.ProjectRelease): The release object to update
183
- release_notes(str): The new release notes
166
+ :param release: The release object to update
167
+ :param release_notes: The new release notes
184
168
 
185
- Returns:
186
- -------
187
- str: The release id
169
+ :return: The release id
188
170
 
189
- Raises:
190
- ------
191
- GitlabAuthenticationError: If authentication is not correct
192
- GitlabUpdateError: If the server cannot perform the request
171
+ :raises: GitlabAuthenticationError: If authentication is not correct
172
+ :raises: GitlabUpdateError: If the server cannot perform the request
193
173
 
194
174
  """
195
175
  log.info(
@@ -206,24 +186,17 @@ class Gitlab(RemoteHvcsBase):
206
186
  self, tag: str, release_notes: str, prerelease: bool = False
207
187
  ) -> str:
208
188
  """
209
- Create or update a release for the given tag in a remote VCS
210
-
211
- Arguments:
212
- ---------
213
- tag(str): The tag to create or update the release for
214
- release_notes(str): The changelog description for this version only
215
- prerelease(bool): This parameter has no effect in GitLab
189
+ Create or update a release for the given tag in a remote VCS.
216
190
 
217
- Returns:
218
- -------
219
- str: The release id
191
+ :param tag: The tag to create or update the release for
192
+ :param release_notes: The changelog description for this version only
193
+ :param prerelease: This parameter has no effect in GitLab
220
194
 
221
- Raises:
222
- ------
223
- ValueError: If the release could not be created or updated
224
- gitlab.exceptions.GitlabAuthenticationError: If the user is not authenticated
225
- GitlabUpdateError: If the server cannot perform the request
195
+ :return: The release id
226
196
 
197
+ :raises ValueError: If the release could not be created or updated
198
+ :raises gitlab.exceptions.GitlabAuthenticationError: If the user is not authenticated
199
+ :raises GitlabUpdateError: If the server cannot perform the request
227
200
  """
228
201
  try:
229
202
  return self.create_release(
@@ -21,12 +21,14 @@ def build_requests_session(
21
21
  ) -> Session:
22
22
  """
23
23
  Create a requests session.
24
+
24
25
  :param raise_for_status: If True, a hook to invoke raise_for_status be installed
25
26
  :param retry: If true, it will use default Retry configuration. if an integer, it
26
- will use default Retry configuration with given integer as total retry
27
- count. if Retry instance, it will use this instance.
27
+ will use default Retry configuration with given integer as total retry
28
+ count. if Retry instance, it will use this instance.
28
29
  :param auth: Optional TokenAuth instance to be used to provide the Authorization
29
- header to the session
30
+ header to the session
31
+
30
32
  :return: configured requests Session
31
33
  """
32
34
  session = Session()
@@ -1,111 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: python-semantic-release
3
- Version: 9.8.8
4
- Summary: Automatic Semantic Versioning for Python projects
5
- Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
- License: MIT
7
- Project-URL: changelog, https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md
8
- Project-URL: documentation, https://python-semantic-release.readthedocs.io
9
- Project-URL: homepage, https://python-semantic-release.readthedocs.io
10
- Project-URL: issues, https://github.com/python-semantic-release/python-semantic-release/issues
11
- Project-URL: repository, http://github.com/python-semantic-release/python-semantic-release.git
12
- Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Requires-Python: >=3.8
20
- Description-Content-Type: text/x-rst
21
- License-File: LICENSE
22
- License-File: AUTHORS.rst
23
- Requires-Dist: click~=8.0
24
- Requires-Dist: click-option-group~=0.5
25
- Requires-Dist: gitpython~=3.0
26
- Requires-Dist: requests~=2.25
27
- Requires-Dist: jinja2~=3.1
28
- Requires-Dist: python-gitlab~=4.0
29
- Requires-Dist: tomlkit~=0.11
30
- Requires-Dist: dotty-dict~=1.3
31
- Requires-Dist: importlib-resources~=6.0
32
- Requires-Dist: pydantic~=2.0
33
- Requires-Dist: rich~=13.0
34
- Requires-Dist: shellingham~=1.5
35
- Provides-Extra: build
36
- Requires-Dist: build~=1.2; extra == "build"
37
- Provides-Extra: dev
38
- Requires-Dist: pre-commit~=3.5; extra == "dev"
39
- Requires-Dist: tox~=4.11; extra == "dev"
40
- Requires-Dist: ruff==0.5.0; extra == "dev"
41
- Provides-Extra: docs
42
- Requires-Dist: Sphinx~=6.0; extra == "docs"
43
- Requires-Dist: sphinxcontrib-apidoc==0.5.0; extra == "docs"
44
- Requires-Dist: sphinx-autobuild==2024.2.4; extra == "docs"
45
- Requires-Dist: furo~=2024.1; extra == "docs"
46
- Provides-Extra: mypy
47
- Requires-Dist: mypy==1.10.1; extra == "mypy"
48
- Requires-Dist: types-requests~=2.32.0; extra == "mypy"
49
- Provides-Extra: test
50
- Requires-Dist: coverage[toml]~=7.0; extra == "test"
51
- Requires-Dist: pytest~=8.3; extra == "test"
52
- Requires-Dist: pytest-env~=1.0; extra == "test"
53
- Requires-Dist: pytest-xdist~=3.0; extra == "test"
54
- Requires-Dist: pytest-mock~=3.0; extra == "test"
55
- Requires-Dist: pytest-lazy-fixtures~=1.1.1; extra == "test"
56
- Requires-Dist: pytest-cov~=5.0; extra == "test"
57
- Requires-Dist: pytest-pretty~=1.2; extra == "test"
58
- Requires-Dist: pytest-clarity~=1.0; extra == "test"
59
- Requires-Dist: responses~=0.25.0; extra == "test"
60
- Requires-Dist: requests-mock~=1.10; extra == "test"
61
-
62
- Python Semantic Release
63
- ***********************
64
-
65
- |Ruff| |Test Status| |PyPI Version| |conda-forge version| |Read the Docs Status| |Pre-Commit Enabled|
66
-
67
- Automatic Semantic Versioning for Python projects. This is a Python
68
- implementation of `semantic-release`_ for JS by Stephan Bönnemann. If
69
- you find this topic interesting you should check out his `talk from
70
- JSConf Budapest`_.
71
-
72
- The general idea is to be able to detect what the next version of the
73
- project should be based on the commits. This tool will use that to
74
- automate the whole release, upload to an artifact repository and post changelogs to
75
- GitHub. You can run the tool on a CI service, or just run it locally.
76
-
77
- Installation
78
- ============
79
-
80
- ::
81
-
82
- python3 -m pip install python-semantic-release
83
- semantic-release --help
84
-
85
- Python Semantic Release is also available from `conda-forge`_ or as a `GitHub Action`_.
86
- Read more about the setup and configuration in our `getting started guide`_.
87
-
88
- .. _semantic-release: https://github.com/semantic-release/semantic-release
89
- .. _talk from JSConf Budapest: https://www.youtube.com/watch?v=tc2UgG5L7WM
90
- .. _getting started guide: https://python-semantic-release.readthedocs.io/en/latest/#getting-started
91
- .. _GitHub Action: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
92
- .. _conda-forge: https://anaconda.org/conda-forge/python-semantic-release
93
-
94
- .. |Test Status| image:: https://img.shields.io/github/actions/workflow/status/python-semantic-release/python-semantic-release/main.yml?branch=master&label=Test%20Status&logo=github
95
- :target: https://github.com/python-semantic-release/python-semantic-release/actions/workflows/main.yml
96
- :alt: test-status
97
- .. |PyPI Version| image:: https://img.shields.io/pypi/v/python-semantic-release?label=PyPI&logo=pypi
98
- :target: https://pypi.org/project/python-semantic-release/
99
- :alt: pypi
100
- .. |conda-forge Version| image:: https://img.shields.io/conda/vn/conda-forge/python-semantic-release?logo=anaconda
101
- :target: https://anaconda.org/conda-forge/python-semantic-release
102
- :alt: conda-forge
103
- .. |Read the Docs Status| image:: https://img.shields.io/readthedocs/python-semantic-release?label=Read%20the%20Docs&logo=Read%20the%20Docs
104
- :target: https://python-semantic-release.readthedocs.io/en/latest/
105
- :alt: docs
106
- .. |Pre-Commit Enabled| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
107
- :target: https://github.com/pre-commit/pre-commit
108
- :alt: pre-commit
109
- .. |Ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
110
- :target: https://github.com/astral-sh/ruff
111
- :alt: Ruff