python-semantic-release 10.3.0__tar.gz → 10.3.2__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.
Files changed (214) hide show
  1. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/PKG-INFO +2 -2
  2. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/automatic-releases/github-actions.rst +15 -7
  3. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/configuration-guides/uv_integration.rst +1 -1
  4. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/pyproject.toml +2 -2
  5. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/commands/version.py +12 -5
  6. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/github_actions_output.py +21 -6
  7. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/algorithm.py +5 -18
  8. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/conftest.py +28 -5
  9. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_changelog/test_changelog.py +21 -10
  10. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +8 -2
  11. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_changelog/test_changelog_release_notes.py +18 -29
  12. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/conftest.py +25 -11
  13. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +26 -22
  14. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +26 -22
  15. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +26 -22
  16. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +26 -22
  17. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +26 -22
  18. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel_branch_update_merge.py +26 -22
  19. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +26 -22
  20. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +26 -22
  21. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +26 -22
  22. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +27 -22
  23. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +26 -22
  24. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_bump.py +42 -26
  25. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_changelog.py +37 -32
  26. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +11 -15
  27. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_github_actions.py +4 -11
  28. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_print.py +33 -23
  29. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_stamp.py +2 -1
  30. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/conftest.py +18 -9
  31. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/test_main.py +6 -3
  32. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/example_project.py +317 -61
  33. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/git_repo.py +426 -230
  34. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +342 -207
  35. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +305 -160
  36. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +327 -189
  37. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +328 -197
  38. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/github_flow/repo_w_default_release.py +74 -10
  39. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/github_flow/repo_w_default_release_w_branch_update_merge.py +184 -93
  40. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +123 -71
  41. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/repo_initial_commit.py +30 -2
  42. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +55 -11
  43. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +71 -15
  44. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +36 -3
  45. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +55 -11
  46. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +46 -7
  47. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/cli/test_util.py +17 -10
  48. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/util.py +10 -2
  49. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/LICENSE +0 -0
  50. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/MANIFEST.in +0 -0
  51. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/README.rst +0 -0
  52. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/Makefile +0 -0
  53. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/api/commands.rst +0 -0
  54. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/changelog_templates.rst +0 -0
  55. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/commit_parsing.rst +0 -0
  56. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/getting_started.rst +0 -0
  57. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/index.rst +0 -0
  58. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/installation.rst +0 -0
  59. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/multibranch_releases.rst +0 -0
  60. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/concepts/strict_mode.rst +0 -0
  61. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/conf.py +0 -0
  62. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/automatic-releases/cronjobs.rst +0 -0
  63. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/automatic-releases/index.rst +0 -0
  64. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/automatic-releases/travis.rst +0 -0
  65. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/configuration-guides/index.rst +0 -0
  66. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/configuration.rst +0 -0
  67. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/configuration/index.rst +0 -0
  68. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/contributing/contributing_guide.rst +0 -0
  69. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/contributing/index.rst +0 -0
  70. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/index.rst +0 -0
  71. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/make.bat +0 -0
  72. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/misc/psr_changelog.rst +0 -0
  73. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/misc/troubleshooting.rst +0 -0
  74. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/upgrading/08-upgrade.rst +0 -0
  75. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/upgrading/09-upgrade.rst +0 -0
  76. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/upgrading/10-upgrade.rst +0 -0
  77. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/docs/upgrading/index.rst +0 -0
  78. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/setup.cfg +0 -0
  79. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/python_semantic_release.egg-info/SOURCES.txt +0 -0
  80. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/__init__.py +0 -0
  81. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/__main__.py +0 -0
  82. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/changelog/__init__.py +0 -0
  83. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/changelog/context.py +0 -0
  84. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/changelog/release_history.py +0 -0
  85. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/changelog/template.py +0 -0
  86. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/__init__.py +0 -0
  87. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/changelog_writer.py +0 -0
  88. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/cli_context.py +0 -0
  89. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/commands/__init__.py +0 -0
  90. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/commands/changelog.py +0 -0
  91. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/commands/generate_config.py +0 -0
  92. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/commands/main.py +0 -0
  93. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/commands/publish.py +0 -0
  94. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/config.py +0 -0
  95. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/const.py +0 -0
  96. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/masking_filter.py +0 -0
  97. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/cli/util.py +0 -0
  98. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/__init__.py +0 -0
  99. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/_base.py +0 -0
  100. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/angular.py +0 -0
  101. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/conventional.py +0 -0
  102. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/emoji.py +0 -0
  103. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/scipy.py +0 -0
  104. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/tag.py +0 -0
  105. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/token.py +0 -0
  106. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/commit_parser/util.py +0 -0
  107. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/const.py +0 -0
  108. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/changelog_header.md.j2 +0 -0
  109. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/changelog_init.md.j2 +0 -0
  110. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/changelog_update.md.j2 +0 -0
  111. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/changes.md.j2 +0 -0
  112. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/first_release.md.j2 +0 -0
  113. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/macros.md.j2 +0 -0
  114. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/unreleased_changes.md.j2 +0 -0
  115. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.components/versioned_changes.md.j2 +0 -0
  116. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/.release_notes.md.j2 +0 -0
  117. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/md/CHANGELOG.md.j2 +0 -0
  118. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/changelog_header.rst.j2 +0 -0
  119. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/changelog_init.rst.j2 +0 -0
  120. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/changelog_update.rst.j2 +0 -0
  121. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/changes.rst.j2 +0 -0
  122. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/first_release.rst.j2 +0 -0
  123. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/macros.rst.j2 +0 -0
  124. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/unreleased_changes.rst.j2 +0 -0
  125. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/.components/versioned_changes.rst.j2 +0 -0
  126. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/data/templates/conventional/rst/CHANGELOG.rst.j2 +0 -0
  127. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/enums.py +0 -0
  128. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/errors.py +0 -0
  129. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/gitproject.py +0 -0
  130. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/globals.py +0 -0
  131. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/helpers.py +0 -0
  132. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/__init__.py +0 -0
  133. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/_base.py +0 -0
  134. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/bitbucket.py +0 -0
  135. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/gitea.py +0 -0
  136. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/github.py +0 -0
  137. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/gitlab.py +0 -0
  138. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  139. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/token_auth.py +0 -0
  140. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/hvcs/util.py +0 -0
  141. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/py.typed +0 -0
  142. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/__init__.py +0 -0
  143. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/declaration.py +0 -0
  144. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/declarations/__init__.py +0 -0
  145. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/declarations/enum.py +0 -0
  146. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/declarations/i_version_replacer.py +0 -0
  147. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/declarations/pattern.py +0 -0
  148. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/declarations/toml.py +0 -0
  149. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/translator.py +0 -0
  150. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/src/semantic_release/version/version.py +0 -0
  151. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/__init__.py +0 -0
  152. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/const.py +0 -0
  153. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/__init__.py +0 -0
  154. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_changelog/__init__.py +0 -0
  155. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_changelog/test_changelog_parsing.py +0 -0
  156. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_config/__init__.py +0 -0
  157. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  158. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_publish/__init__.py +0 -0
  159. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_publish/test_publish.py +0 -0
  160. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/__init__.py +0 -0
  161. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
  162. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
  163. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
  164. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
  165. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version.py +0 -0
  166. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_build.py +0 -0
  167. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
  168. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/cmd_version/test_version_strict.py +0 -0
  169. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/e2e/test_help.py +0 -0
  170. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/__init__.py +0 -0
  171. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/commit_parsers.py +0 -0
  172. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/__init__.py +0 -0
  173. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  174. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  175. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  176. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/fixtures/scipy.py +0 -0
  177. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/__init__.py +0 -0
  178. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/conftest.py +0 -0
  179. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/__init__.py +0 -0
  180. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  181. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/conftest.py +0 -0
  182. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
  183. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  184. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
  185. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
  186. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  187. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  188. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/cli/__init__.py +0 -0
  189. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/cli/test_config.py +0 -0
  190. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  191. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  192. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/cli/test_version.py +0 -0
  193. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  194. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/commit_parser/test_conventional.py +0 -0
  195. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  196. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  197. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  198. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  199. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  200. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  201. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  202. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  203. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  204. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  205. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  206. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  207. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/test_helpers.py +0 -0
  208. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/__init__.py +0 -0
  209. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/declarations/__init__.py +0 -0
  210. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py +0 -0
  211. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/declarations/test_toml_declaration.py +0 -0
  212. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  213. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/test_translator.py +0 -0
  214. {python_semantic_release-10.3.0 → python_semantic_release-10.3.2}/tests/unit/semantic_release/version/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-semantic-release
3
- Version: 10.3.0
3
+ Version: 10.3.2
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3.13
20
- Requires-Python: >=3.8
20
+ Requires-Python: ~=3.8
21
21
  Description-Content-Type: text/x-rst
22
22
  License-File: LICENSE
23
23
  Requires-Dist: click~=8.1.0
@@ -19,6 +19,14 @@ There are two official GitHub Actions for Python Semantic Release:
19
19
  It is used to upload files, such as distribution artifacts and other assets,
20
20
  to a GitHub release.
21
21
 
22
+ Included in this documentation are some recommended examples below if you want to get
23
+ started quickly. These examples are not exhaustive and you will need to adjust them
24
+ for your specific project needs especially if you are using a monorepo.
25
+
26
+ - :ref:`GitHub Actions Example Workflows <gh_actions-examples>`
27
+
28
+ - :ref:`GitHub Actions with Monorepos <gh_actions-monorepo>`
29
+
22
30
  .. note::
23
31
  These GitHub Actions are only simplified wrappers around the
24
32
  python-semantic-release CLI. Ultimately, they download and install the
@@ -925,14 +933,14 @@ to the GitHub Release Assets as well.
925
933
  - name: Action | Semantic Version Release
926
934
  id: release
927
935
  # Adjust tag with desired version if applicable.
928
- uses: python-semantic-release/python-semantic-release@v10.3.0
936
+ uses: python-semantic-release/python-semantic-release@v10.3.2
929
937
  with:
930
938
  github_token: ${{ secrets.GITHUB_TOKEN }}
931
939
  git_committer_name: "github-actions"
932
940
  git_committer_email: "actions@users.noreply.github.com"
933
941
 
934
942
  - name: Publish | Upload to GitHub Release Assets
935
- uses: python-semantic-release/publish-action@v10.3.0
943
+ uses: python-semantic-release/publish-action@v10.3.2
936
944
  if: steps.release.outputs.released == 'true'
937
945
  with:
938
946
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -1031,7 +1039,7 @@ The equivalent GitHub Action configuration would be:
1031
1039
 
1032
1040
  - name: Action | Semantic Version Release
1033
1041
  # Adjust tag with desired version if applicable.
1034
- uses: python-semantic-release/python-semantic-release@v10.3.0
1042
+ uses: python-semantic-release/python-semantic-release@v10.3.2
1035
1043
  with:
1036
1044
  github_token: ${{ secrets.GITHUB_TOKEN }}
1037
1045
  force: patch
@@ -1090,14 +1098,14 @@ Publish Action.
1090
1098
 
1091
1099
  - name: Release submodule 1
1092
1100
  id: release-submod-1
1093
- uses: python-semantic-release/python-semantic-release@v10.3.0
1101
+ uses: python-semantic-release/python-semantic-release@v10.3.2
1094
1102
  with:
1095
1103
  directory: ${{ env.SUBMODULE_1_DIR }}
1096
1104
  github_token: ${{ secrets.GITHUB_TOKEN }}
1097
1105
 
1098
1106
  - name: Release submodule 2
1099
1107
  id: release-submod-2
1100
- uses: python-semantic-release/python-semantic-release@v10.3.0
1108
+ uses: python-semantic-release/python-semantic-release@v10.3.2
1101
1109
  with:
1102
1110
  directory: ${{ env.SUBMODULE_2_DIR }}
1103
1111
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -1109,7 +1117,7 @@ Publish Action.
1109
1117
  # ------------------------------------------------------------------- #
1110
1118
 
1111
1119
  - name: Publish | Upload package 1 to GitHub Release Assets
1112
- uses: python-semantic-release/publish-action@v10.3.0
1120
+ uses: python-semantic-release/publish-action@v10.3.2
1113
1121
  if: steps.release-submod-1.outputs.released == 'true'
1114
1122
  with:
1115
1123
  directory: ${{ env.SUBMODULE_1_DIR }}
@@ -1117,7 +1125,7 @@ Publish Action.
1117
1125
  tag: ${{ steps.release-submod-1.outputs.tag }}
1118
1126
 
1119
1127
  - name: Publish | Upload package 2 to GitHub Release Assets
1120
- uses: python-semantic-release/publish-action@v10.3.0
1128
+ uses: python-semantic-release/publish-action@v10.3.2
1121
1129
  if: steps.release-submod-2.outputs.released == 'true'
1122
1130
  with:
1123
1131
  directory: ${{ env.SUBMODULE_2_DIR }}
@@ -176,7 +176,7 @@ look like this:
176
176
  id: version
177
177
  env:
178
178
  GH_TOKEN: "none"
179
- run: uv run semantic-release -v version --no-commit --no-tag
179
+ run: uv run semantic-release -v version --no-changelog --no-commit --no-tag
180
180
 
181
181
  - name: Upload | Distribution Artifacts
182
182
  if: ${{ steps.version.outputs.released == 'true' }}
@@ -6,9 +6,9 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "10.3.0"
9
+ version = "10.3.2"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
- requires-python = ">=3.8"
11
+ requires-python = "~= 3.8"
12
12
  license = { text = "MIT" }
13
13
  classifiers = [
14
14
  "Programming Language :: Python",
@@ -18,7 +18,10 @@ from semantic_release.cli.changelog_writer import (
18
18
  generate_release_notes,
19
19
  write_changelog_files,
20
20
  )
21
- from semantic_release.cli.github_actions_output import VersionGitHubActionsOutput
21
+ from semantic_release.cli.github_actions_output import (
22
+ PersistenceMode,
23
+ VersionGitHubActionsOutput,
24
+ )
22
25
  from semantic_release.cli.util import noop_report, rprint
23
26
  from semantic_release.const import DEFAULT_SHELL, DEFAULT_VERSION
24
27
  from semantic_release.enums import LevelBump
@@ -468,9 +471,12 @@ def version( # noqa: C901
468
471
  no_verify = runtime.no_git_verify
469
472
  opts = runtime.global_cli_options
470
473
  gha_output = VersionGitHubActionsOutput(
471
- hvcs_client
472
- if isinstance(hvcs_client, Github)
473
- else Github(hvcs_client.remote_url(use_token=False)),
474
+ gh_client=hvcs_client if isinstance(hvcs_client, Github) else None,
475
+ mode=(
476
+ PersistenceMode.TEMPORARY
477
+ if opts.noop or (not commit_changes and not create_tag)
478
+ else PersistenceMode.PERMANENT
479
+ ),
474
480
  released=False,
475
481
  )
476
482
 
@@ -543,7 +549,8 @@ def version( # noqa: C901
543
549
 
544
550
  # Update GitHub Actions output value with new version & set delayed write
545
551
  gha_output.version = new_version
546
- ctx.call_on_close(gha_output.write_if_possible)
552
+ if isinstance(hvcs_client, Github):
553
+ ctx.call_on_close(gha_output.write_if_possible)
547
554
 
548
555
  # Make string variant of version or appropriate tag as necessary
549
556
  version_to_print = str(new_version) if not print_only_tag else new_version.as_tag()
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import os
4
+ from enum import Enum
4
5
  from re import compile as regexp
5
6
  from typing import TYPE_CHECKING
6
7
 
@@ -13,12 +14,18 @@ if TYPE_CHECKING:
13
14
  from semantic_release.hvcs.github import Github
14
15
 
15
16
 
17
+ class PersistenceMode(Enum):
18
+ TEMPORARY = "temporary"
19
+ PERMANENT = "permanent"
20
+
21
+
16
22
  class VersionGitHubActionsOutput:
17
23
  OUTPUT_ENV_VAR = "GITHUB_OUTPUT"
18
24
 
19
25
  def __init__(
20
26
  self,
21
- gh_client: Github,
27
+ gh_client: Github | None = None,
28
+ mode: PersistenceMode = PersistenceMode.PERMANENT,
22
29
  released: bool | None = None,
23
30
  version: Version | None = None,
24
31
  commit_sha: str | None = None,
@@ -26,6 +33,7 @@ class VersionGitHubActionsOutput:
26
33
  prev_version: Version | None = None,
27
34
  ) -> None:
28
35
  self._gh_client = gh_client
36
+ self._mode = mode
29
37
  self._released = released
30
38
  self._version = version
31
39
  self._commit_sha = commit_sha
@@ -98,16 +106,23 @@ class VersionGitHubActionsOutput:
98
106
  raise TypeError("output 'prev_version' should be a Version")
99
107
  self._prev_version = value
100
108
 
109
+ @property
110
+ def gh_client(self) -> Github:
111
+ if not self._gh_client:
112
+ raise ValueError("GitHub client not set, cannot create links")
113
+ return self._gh_client
114
+
101
115
  def to_output_text(self) -> str:
102
116
  missing: set[str] = set()
103
117
  if self.version is None:
104
118
  missing.add("version")
105
119
  if self.released is None:
106
120
  missing.add("released")
107
- if self.released and self.commit_sha is None:
108
- missing.add("commit_sha")
109
- if self.released and self.release_notes is None:
110
- missing.add("release_notes")
121
+ if self.released:
122
+ if self.release_notes is None:
123
+ missing.add("release_notes")
124
+ if self._mode is PersistenceMode.PERMANENT and self.commit_sha is None:
125
+ missing.add("commit_sha")
111
126
 
112
127
  if missing:
113
128
  raise ValueError(
@@ -119,7 +134,7 @@ class VersionGitHubActionsOutput:
119
134
  "version": str(self.version),
120
135
  "tag": self.tag,
121
136
  "is_prerelease": str(self.is_prerelease).lower(),
122
- "link": self._gh_client.create_release_url(self.tag) if self.tag else "",
137
+ "link": self.gh_client.create_release_url(self.tag) if self.tag else "",
123
138
  "previous_version": str(self.prev_version) if self.prev_version else "",
124
139
  "commit_sha": self.commit_sha if self.commit_sha else "",
125
140
  }
@@ -346,24 +346,7 @@ def next_version(
346
346
  # Step 5. apply the parser to each commit in the history (could return multiple results per commit)
347
347
  parsed_results = list(map(commit_parser.parse, commits_since_last_release))
348
348
 
349
- # Step 5A. Validation type check for the parser results (important because of possible custom parsers)
350
- for parsed_result in parsed_results:
351
- if not any(
352
- (
353
- isinstance(parsed_result, (ParseError, ParsedCommit)),
354
- type(parsed_result) == list
355
- and validate_types_in_sequence(
356
- parsed_result, (ParseError, ParsedCommit)
357
- ),
358
- type(parsed_result) == tuple
359
- and validate_types_in_sequence(
360
- parsed_result, (ParseError, ParsedCommit)
361
- ),
362
- )
363
- ):
364
- raise TypeError("Unexpected type returned from commit_parser.parse")
365
-
366
- # Step 5B. Accumulate all parsed results into a single list accounting for possible multiple results per commit
349
+ # Step 5A. Accumulate all parsed results into a single list accounting for possible multiple results per commit
367
350
  consolidated_results: list[ParseResult] = reduce(
368
351
  lambda accumulated_results, p_results: [
369
352
  *accumulated_results,
@@ -378,6 +361,10 @@ def next_version(
378
361
  [],
379
362
  )
380
363
 
364
+ # Step 5B. Validation type check for the parser results (important because of possible custom parsers)
365
+ if not validate_types_in_sequence(consolidated_results, (ParseError, ParsedCommit)):
366
+ raise TypeError("Unexpected type returned from commit_parser.parse")
367
+
381
368
  # Step 5C. Parse the commits to determine the bump level that should be applied
382
369
  parsed_levels: set[LevelBump] = {
383
370
  parsed_result.bump # type: ignore[union-attr] # too complex for type checkers
@@ -1,4 +1,4 @@
1
- """Note: fixtures are stored in the tests/fixtures directory for better organisation"""
1
+ """Note: fixtures are stored in the tests/fixtures directory for better organization"""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -9,7 +9,7 @@ from datetime import datetime, timedelta, timezone
9
9
  from hashlib import md5
10
10
  from pathlib import Path
11
11
  from tempfile import NamedTemporaryFile
12
- from typing import TYPE_CHECKING
12
+ from typing import TYPE_CHECKING, cast
13
13
  from unittest import mock
14
14
 
15
15
  import pytest
@@ -17,13 +17,15 @@ from click.testing import CliRunner
17
17
  from filelock import FileLock
18
18
  from git import Commit, Repo
19
19
 
20
+ from semantic_release.version.version import Version
21
+
20
22
  from tests.const import PROJ_DIR
21
23
  from tests.fixtures import *
22
24
  from tests.util import copy_dir_tree, remove_dir_tree
23
25
 
24
26
  if TYPE_CHECKING:
25
27
  from tempfile import _TemporaryFileWrapper
26
- from typing import Any, Callable, Generator, Protocol, Sequence, TypedDict
28
+ from typing import Any, Callable, Generator, Optional, Protocol, Sequence, TypedDict
27
29
 
28
30
  from click.testing import Result
29
31
  from filelock import AcquireReturnProxy
@@ -325,7 +327,7 @@ def get_authorization_to_build_repo_cache(
325
327
  def get_cached_repo_data(request: pytest.FixtureRequest) -> GetCachedRepoDataFn:
326
328
  def _get_cached_repo_data(proj_dirname: str) -> RepoData | None:
327
329
  cache_key = f"psr/repos/{proj_dirname}"
328
- return request.config.cache.get(cache_key, None)
330
+ return cast("Optional[RepoData]", request.config.cache.get(cache_key, None))
329
331
 
330
332
  return _get_cached_repo_data
331
333
 
@@ -335,6 +337,10 @@ def set_cached_repo_data(request: pytest.FixtureRequest) -> SetCachedRepoDataFn:
335
337
  def magic_serializer(obj: Any) -> Any:
336
338
  if isinstance(obj, Path):
337
339
  return obj.__fspath__()
340
+
341
+ if isinstance(obj, Version):
342
+ return obj.__dict__
343
+
338
344
  return obj
339
345
 
340
346
  def _set_cached_repo_data(proj_dirname: str, data: RepoData) -> None:
@@ -386,13 +392,30 @@ def build_repo_or_copy_cache(
386
392
  with log_file_lock, log_file.open(mode="a") as afd:
387
393
  afd.write(f"{stable_now_date().isoformat()}: {build_msg}...\n")
388
394
 
395
+ try:
396
+ # Try to build repository but catch any errors so that it doesn't cascade through all tests
397
+ # do to an unreleased lock
398
+ build_definition = build_repo_func(cached_repo_path)
399
+ except Exception:
400
+ remove_dir_tree(cached_repo_path, force=True)
401
+
402
+ if filelock:
403
+ filelock.lock.release()
404
+
405
+ with log_file_lock, log_file.open(mode="a") as afd:
406
+ afd.write(
407
+ f"{stable_now_date().isoformat()}: {build_msg}...FAILED\n"
408
+ )
409
+
410
+ raise
411
+
389
412
  # Marks the date when the cached repo was created
390
413
  set_cached_repo_data(
391
414
  repo_name,
392
415
  {
393
416
  "build_date": today_date_str,
394
417
  "build_spec_hash": build_spec_hash,
395
- "build_definition": build_repo_func(cached_repo_path),
418
+ "build_definition": build_definition,
396
419
  },
397
420
  )
398
421
 
@@ -14,7 +14,6 @@ import semantic_release.hvcs.github
14
14
  from semantic_release.changelog.context import ChangelogMode
15
15
  from semantic_release.cli.config import ChangelogOutputFormat
16
16
  from semantic_release.hvcs.github import Github
17
- from semantic_release.version.version import Version
18
17
 
19
18
  from tests.const import (
20
19
  CHANGELOG_SUBCMD,
@@ -77,6 +76,12 @@ if TYPE_CHECKING:
77
76
 
78
77
  from requests_mock import Mocker
79
78
 
79
+ from semantic_release.commit_parser.conventional import (
80
+ ConventionalCommitParser,
81
+ )
82
+ from semantic_release.commit_parser.emoji import EmojiCommitParser
83
+ from semantic_release.commit_parser.scipy import ScipyCommitParser
84
+
80
85
  from tests.conftest import RunCliFn
81
86
  from tests.e2e.conftest import RetrieveRuntimeContextFn
82
87
  from tests.fixtures.example_project import (
@@ -867,9 +872,12 @@ def test_changelog_update_mode_unreleased_n_released(
867
872
  commit_n_rtn_changelog_entry: CommitNReturnChangelogEntryFn,
868
873
  changelog_file: Path,
869
874
  insertion_flag: str,
870
- get_commit_def_of_conventional_commit: GetCommitDefFn,
871
- get_commit_def_of_emoji_commit: GetCommitDefFn,
872
- get_commit_def_of_scipy_commit: GetCommitDefFn,
875
+ get_commit_def_of_conventional_commit: GetCommitDefFn[ConventionalCommitParser],
876
+ get_commit_def_of_emoji_commit: GetCommitDefFn[EmojiCommitParser],
877
+ get_commit_def_of_scipy_commit: GetCommitDefFn[ScipyCommitParser],
878
+ default_conventional_parser: ConventionalCommitParser,
879
+ default_emoji_parser: EmojiCommitParser,
880
+ default_scipy_parser: ScipyCommitParser,
873
881
  ):
874
882
  """
875
883
  Given there are unreleased changes and a previous release in the changelog,
@@ -890,18 +898,23 @@ def test_changelog_update_mode_unreleased_n_released(
890
898
  commit_n_section: Commit2Section = {
891
899
  "conventional": {
892
900
  "commit": get_commit_def_of_conventional_commit(
893
- "perf: improve the performance of the application"
901
+ "perf: improve the performance of the application",
902
+ parser=default_conventional_parser,
894
903
  ),
895
904
  "section": "Performance Improvements",
896
905
  },
897
906
  "emoji": {
898
907
  "commit": get_commit_def_of_emoji_commit(
899
- ":zap: improve the performance of the application"
908
+ ":zap: improve the performance of the application",
909
+ parser=default_emoji_parser,
900
910
  ),
901
911
  "section": ":zap:",
902
912
  },
903
913
  "scipy": {
904
- "commit": get_commit_def_of_scipy_commit("MAINT: fix an issue"),
914
+ "commit": get_commit_def_of_scipy_commit(
915
+ "MAINT: fix an issue",
916
+ parser=default_scipy_parser,
917
+ ),
905
918
  "section": "Fix",
906
919
  },
907
920
  }
@@ -1095,9 +1108,7 @@ def test_custom_release_notes_template(
1095
1108
  ) -> None:
1096
1109
  """Verify the template `.release_notes.md.j2` from `template_dir` is used."""
1097
1110
  expected_call_count = 1
1098
- version = Version.parse(
1099
- get_versions_from_repo_build_def(repo_result["definition"])[-1]
1100
- )
1111
+ version = get_versions_from_repo_build_def(repo_result["definition"])[-1]
1101
1112
 
1102
1113
  # Setup
1103
1114
  use_release_notes_template()
@@ -18,6 +18,10 @@ from tests.util import (
18
18
  if TYPE_CHECKING:
19
19
  from pathlib import Path
20
20
 
21
+ from semantic_release.commit_parser.conventional import (
22
+ ConventionalCommitParser,
23
+ )
24
+
21
25
  from tests.conftest import RunCliFn
22
26
  from tests.fixtures.example_project import UpdatePyprojectTomlFn, UseCustomParserFn
23
27
  from tests.fixtures.git_repo import BuiltRepoResult, GetCommitDefFn
@@ -31,9 +35,10 @@ def test_changelog_custom_parser_remove_from_changelog(
31
35
  run_cli: RunCliFn,
32
36
  update_pyproject_toml: UpdatePyprojectTomlFn,
33
37
  use_custom_parser: UseCustomParserFn,
34
- get_commit_def_of_conventional_commit: GetCommitDefFn,
38
+ get_commit_def_of_conventional_commit: GetCommitDefFn[ConventionalCommitParser],
35
39
  changelog_md_file: Path,
36
40
  default_md_changelog_insertion_flag: str,
41
+ default_conventional_parser: ConventionalCommitParser,
37
42
  ):
38
43
  """
39
44
  Given when a changelog filtering custom parser is configured
@@ -41,7 +46,8 @@ def test_changelog_custom_parser_remove_from_changelog(
41
46
  Then the commit message is not included in the resulting changelog
42
47
  """
43
48
  ignored_commit_def = get_commit_def_of_conventional_commit(
44
- "chore: do not include me in the changelog"
49
+ "chore: do not include me in the changelog",
50
+ parser=default_conventional_parser,
45
51
  )
46
52
 
47
53
  # Because we are in init mode, the insertion flag is not present in the changelog
@@ -6,8 +6,6 @@ from typing import TYPE_CHECKING
6
6
  import pytest
7
7
  from pytest_lazy_fixtures import lf as lazy_fixture
8
8
 
9
- from semantic_release.version.version import Version
10
-
11
9
  from tests.const import CHANGELOG_SUBCMD, EXAMPLE_PROJECT_LICENSE, MAIN_PROG_NAME
12
10
  from tests.fixtures.repos import (
13
11
  repo_w_github_flow_w_default_release_channel_conventional_commits,
@@ -21,7 +19,7 @@ from tests.util import assert_successful_exit_code
21
19
  if TYPE_CHECKING:
22
20
  from requests_mock import Mocker
23
21
 
24
- from tests.conftest import GetStableDateNowFn, RunCliFn
22
+ from tests.conftest import GetCachedRepoDataFn, GetStableDateNowFn, RunCliFn
25
23
  from tests.fixtures.example_project import UpdatePyprojectTomlFn
26
24
  from tests.fixtures.git_repo import (
27
25
  BuiltRepoResult,
@@ -56,19 +54,16 @@ def test_changelog_latest_release_notes(
56
54
  repo_def = repo_result["definition"]
57
55
  tag_format_str: str = get_cfg_value_from_def(repo_def, "tag_format_str") # type: ignore[assignment]
58
56
  repo_actions_per_version = split_repo_actions_by_release_tags(
59
- repo_definition=repo_def,
60
- tag_format_str=tag_format_str,
57
+ repo_definition=repo_def
61
58
  )
62
59
  all_versions = get_versions_from_repo_build_def(repo_def)
63
60
  latest_release_version = all_versions[-1]
64
61
  release_tag = tag_format_str.format(version=latest_release_version)
65
62
 
66
63
  expected_release_notes = generate_default_release_notes_from_def(
67
- version_actions=repo_actions_per_version[release_tag],
64
+ version_actions=repo_actions_per_version[latest_release_version],
68
65
  hvcs=get_hvcs_client_from_repo_def(repo_def),
69
- previous_version=(
70
- Version.parse(all_versions[-2]) if len(all_versions) > 1 else None
71
- ),
66
+ previous_version=(all_versions[-2] if len(all_versions) > 1 else None),
72
67
  license_name=EXAMPLE_PROJECT_LICENSE,
73
68
  mask_initial_release=get_cfg_value_from_def(repo_def, "mask_initial_release"),
74
69
  )
@@ -130,8 +125,7 @@ def test_changelog_previous_release_notes(
130
125
  repo_def = repo_result["definition"]
131
126
  tag_format_str: str = get_cfg_value_from_def(repo_def, "tag_format_str") # type: ignore[assignment]
132
127
  repo_actions_per_version = split_repo_actions_by_release_tags(
133
- repo_definition=repo_def,
134
- tag_format_str=tag_format_str,
128
+ repo_definition=repo_def
135
129
  )
136
130
  # Extract all versions except for the latest one
137
131
  all_prev_versions = get_versions_from_repo_build_def(repo_def)[:-1]
@@ -139,10 +133,10 @@ def test_changelog_previous_release_notes(
139
133
  release_tag = tag_format_str.format(version=latest_release_version)
140
134
 
141
135
  expected_release_notes = generate_default_release_notes_from_def(
142
- version_actions=repo_actions_per_version[release_tag],
136
+ version_actions=repo_actions_per_version[latest_release_version],
143
137
  hvcs=get_hvcs_client_from_repo_def(repo_def),
144
138
  previous_version=(
145
- Version.parse(all_prev_versions[-2]) if len(all_prev_versions) > 1 else None
139
+ all_prev_versions[-2] if len(all_prev_versions) > 1 else None
146
140
  ),
147
141
  license_name=EXAMPLE_PROJECT_LICENSE,
148
142
  mask_initial_release=mask_initial_release,
@@ -170,17 +164,17 @@ def test_changelog_previous_release_notes(
170
164
 
171
165
 
172
166
  @pytest.mark.parametrize(
173
- "repo_result, cache_key, mask_initial_release, license_name",
167
+ "repo_result, repo_fixture_name, mask_initial_release, license_name",
174
168
  [
175
169
  (
176
170
  lazy_fixture(repo_w_trunk_only_conventional_commits.__name__),
177
- f"psr/repos/{repo_w_trunk_only_conventional_commits.__name__}",
171
+ repo_w_trunk_only_conventional_commits.__name__,
178
172
  True,
179
173
  "BSD-3-Clause",
180
174
  ),
181
175
  pytest.param(
182
176
  lazy_fixture(repo_w_trunk_only_conventional_commits.__name__),
183
- f"psr/repos/{repo_w_trunk_only_conventional_commits.__name__}",
177
+ repo_w_trunk_only_conventional_commits.__name__,
184
178
  False,
185
179
  "BSD-3-Clause",
186
180
  marks=pytest.mark.comprehensive,
@@ -188,7 +182,7 @@ def test_changelog_previous_release_notes(
188
182
  *[
189
183
  pytest.param(
190
184
  lazy_fixture(repo_fixture_name),
191
- f"psr/repos/{repo_fixture_name}",
185
+ repo_fixture_name,
192
186
  mask_initial_release,
193
187
  "BSD-3-Clause",
194
188
  marks=pytest.mark.comprehensive,
@@ -216,15 +210,15 @@ def test_changelog_release_notes_license_change(
216
210
  split_repo_actions_by_release_tags: SplitRepoActionsByReleaseTagsFn,
217
211
  generate_default_release_notes_from_def: GenerateDefaultReleaseNotesFromDefFn,
218
212
  update_pyproject_toml: UpdatePyprojectTomlFn,
219
- cache: pytest.Cache,
220
- cache_key: str,
213
+ repo_fixture_name: str,
221
214
  stable_now_date: GetStableDateNowFn,
215
+ get_cached_repo_data: GetCachedRepoDataFn,
222
216
  ):
223
217
  # Setup
224
218
  repo_def = repo_result["definition"]
225
219
  tag_format_str: str = get_cfg_value_from_def(repo_def, "tag_format_str") # type: ignore[assignment]
226
220
 
227
- if not (repo_build_data := cache.get(cache_key, None)):
221
+ if not (repo_build_data := get_cached_repo_data(repo_fixture_name)):
228
222
  pytest.fail("Repo build date not found in cache")
229
223
 
230
224
  repo_build_datetime = datetime.strptime(repo_build_data["build_date"], "%Y-%m-%d")
@@ -236,7 +230,6 @@ def test_changelog_release_notes_license_change(
236
230
 
237
231
  repo_actions_per_version = split_repo_actions_by_release_tags(
238
232
  repo_definition=repo_def,
239
- tag_format_str=tag_format_str,
240
233
  )
241
234
  # Extract all versions
242
235
  all_versions = get_versions_from_repo_build_def(repo_def)
@@ -247,21 +240,17 @@ def test_changelog_release_notes_license_change(
247
240
  prev_release_tag = tag_format_str.format(version=previous_release_version)
248
241
 
249
242
  expected_release_notes = generate_default_release_notes_from_def(
250
- version_actions=repo_actions_per_version[latest_release_tag],
243
+ version_actions=repo_actions_per_version[latest_release_version],
251
244
  hvcs=get_hvcs_client_from_repo_def(repo_def),
252
- previous_version=(
253
- Version.parse(previous_release_version) if len(all_versions) > 1 else None
254
- ),
245
+ previous_version=(previous_release_version if len(all_versions) > 1 else None),
255
246
  license_name=license_name,
256
247
  mask_initial_release=mask_initial_release,
257
248
  )
258
249
 
259
250
  expected_prev_release_notes = generate_default_release_notes_from_def(
260
- version_actions=repo_actions_per_version[prev_release_tag],
251
+ version_actions=repo_actions_per_version[previous_release_version],
261
252
  hvcs=get_hvcs_client_from_repo_def(repo_def),
262
- previous_version=(
263
- Version.parse(all_versions[-3]) if len(all_versions) > 2 else None
264
- ),
253
+ previous_version=(all_versions[-3] if len(all_versions) > 2 else None),
265
254
  license_name=EXAMPLE_PROJECT_LICENSE,
266
255
  mask_initial_release=mask_initial_release,
267
256
  )