Skip to content
Merged
25 changes: 16 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ref: https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
# and https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[build-system]
requires = ["setuptools >= 75.3.0, < 83.0.0", "wheel ~= 0.42"]
requires = ["setuptools >= 75.3.0, < 84.0.0", "wheel ~= 0.42"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -27,17 +27,23 @@ authors = [
{ name = "codejedi365", email = "codejedi365@gmail.com" },
]
dependencies = [
"click >= 8.1.0, < 9.0.0",
"click-option-group ~= 0.5",
"click ~= 8.1.0; python_version == '3.8'",
"click ~= 8.1.0; python_version == '3.9'",
"click ~= 8.1.0, < 8.5.0; python_version >= '3.10'",
"click-option-group ~= 0.5.0",
"gitpython ~= 3.0",
"requests ~= 2.25",
"jinja2 ~= 3.1",
"python-gitlab >= 4.0.0, < 9.0.0",
"tomlkit ~= 0.13.0",
"python-gitlab ~= 4.0; python_version == '3.8'",
"python-gitlab >= 4.0.0, < 7.0.0; python_version == '3.9'",
"python-gitlab >= 4.0.0, < 9.0.0; python_version >= '3.10'",
"tomlkit ~= 0.13.0; python_version == '3.8'",
"tomlkit ~= 0.15.0; python_version >= '3.9'",
"dotty-dict ~= 1.3",
"importlib-resources ~= 6.0",
"importlib-resources ~= 6.0; python_version == '3.8'", # add backport for Python 3.8
"pydantic ~= 2.0",
"rich ~= 14.0",
"rich ~= 14.0; python_version == '3.8'",
"rich ~= 15.0; python_version >= '3.9'",
"shellingham ~= 1.5",
"Deprecated ~= 1.2", # Backport of deprecated decorator for python 3.8
]
Expand All @@ -57,7 +63,8 @@ repository = "http://github.com/python-semantic-release/python-semantic-release.
[project.optional-dependencies]
build = [
"build ~= 1.2",
"tomlkit ~= 0.13.0",
"tomlkit ~= 0.13.0; python_version == '3.8'",
"tomlkit ~= 0.15.0; python_version >= '3.9'",
]
docs = [
"Sphinx ~= 7.4",
Expand Down Expand Up @@ -91,7 +98,7 @@ dev = [
mypy = [
"mypy >= 1.14.1, < 2.0.0",
"types-Deprecated ~= 1.2",
"types-requests ~= 2.32.0",
"types-requests >= 2.32.0, < 3.0.0",
"types-pyyaml ~= 6.0",
]

Expand Down
7 changes: 5 additions & 2 deletions src/semantic_release/cli/changelog_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
from pathlib import Path
from typing import TYPE_CHECKING

# NOTE: use backport with newer API than stdlib
from importlib_resources import files
try:
from importlib.resources import files # type: ignore[attr-defined]
except ImportError:
# NOTE: for 3.8, use backport with newer API than stdlib
from importlib_resources import files

import semantic_release
from semantic_release.changelog.context import (
Expand Down
7 changes: 5 additions & 2 deletions tests/fixtures/example_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
import pytest
import tomlkit

# NOTE: use backport with newer API
from importlib_resources import files
try:
from importlib.resources import files # type: ignore[attr-defined]
except ImportError:
# NOTE: for 3.8, use backport with newer API than stdlib
from importlib_resources import files

import semantic_release
from semantic_release.cli.config import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@

import pytest

# NOTE: use backport with newer API
from importlib_resources import files
try:
from importlib.resources import files # type: ignore[attr-defined]
except ImportError:
# NOTE: for 3.8, use backport with newer API than stdlib
from importlib_resources import files

import semantic_release
from semantic_release.changelog.context import ChangelogMode, make_changelog_context
Expand Down
7 changes: 5 additions & 2 deletions tests/unit/semantic_release/changelog/test_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@

import pytest

# NOTE: use backport with newer API to support 3.7
from importlib_resources import files
try:
from importlib.resources import files # type: ignore[attr-defined]
except ImportError:
# NOTE: for 3.8, use backport with newer API than stdlib
from importlib_resources import files

import semantic_release
from semantic_release.cli.changelog_writer import generate_release_notes
Expand Down
Loading