1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
From: Alexandre Detiste <tchet@debian.org>
Date: Wed, 1 Oct 2025 12:46:31 +0100
Subject: Patch out usage of importlib_resources backport
---
pyproject.toml | 1 -
src/semantic_release/cli/changelog_writer.py | 3 +--
tests/fixtures/example_project.py | 3 +--
tests/unit/semantic_release/changelog/test_default_changelog.py | 3 +--
tests/unit/semantic_release/changelog/test_release_notes.py | 3 +--
5 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index dd3ef56..4f5a72b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,7 +31,6 @@ dependencies = [
"python-gitlab >= 4.0.0, < 7.0.0",
"tomlkit ~= 0.11",
"dotty-dict ~= 1.3",
- "importlib-resources ~= 6.0",
"pydantic ~= 2.0",
"rich ~= 14.0",
"shellingham ~= 1.5",
diff --git a/src/semantic_release/cli/changelog_writer.py b/src/semantic_release/cli/changelog_writer.py
index 65e3878..d082908 100644
--- a/src/semantic_release/cli/changelog_writer.py
+++ b/src/semantic_release/cli/changelog_writer.py
@@ -5,8 +5,7 @@ from contextlib import suppress
from pathlib import Path
from typing import TYPE_CHECKING
-# NOTE: use backport with newer API than stdlib
-from importlib_resources import files
+from importlib.resources import files
import semantic_release
from semantic_release.changelog.context import (
diff --git a/tests/fixtures/example_project.py b/tests/fixtures/example_project.py
index 41664f7..4b681aa 100644
--- a/tests/fixtures/example_project.py
+++ b/tests/fixtures/example_project.py
@@ -9,8 +9,7 @@ from unittest import mock
import pytest
import tomlkit
-# NOTE: use backport with newer API
-from importlib_resources import files
+from importlib.resources import files
import semantic_release
from semantic_release.cli.config import (
diff --git a/tests/unit/semantic_release/changelog/test_default_changelog.py b/tests/unit/semantic_release/changelog/test_default_changelog.py
index 6e42f7f..c44fdd3 100644
--- a/tests/unit/semantic_release/changelog/test_default_changelog.py
+++ b/tests/unit/semantic_release/changelog/test_default_changelog.py
@@ -5,8 +5,7 @@ from typing import TYPE_CHECKING
import pytest
-# NOTE: use backport with newer API
-from importlib_resources import files
+from importlib.resources import files
import semantic_release
from semantic_release.changelog.context import ChangelogMode, make_changelog_context
diff --git a/tests/unit/semantic_release/changelog/test_release_notes.py b/tests/unit/semantic_release/changelog/test_release_notes.py
index 02f217b..0674696 100644
--- a/tests/unit/semantic_release/changelog/test_release_notes.py
+++ b/tests/unit/semantic_release/changelog/test_release_notes.py
@@ -8,8 +8,7 @@ from unittest import mock
import pytest
-# NOTE: use backport with newer API to support 3.7
-from importlib_resources import files
+from importlib.resources import files
import semantic_release
from semantic_release.cli.changelog_writer import generate_release_notes
|