From 4b644a136f7fcc74794780147339786f84eb6209 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sat, 23 May 2026 14:49:41 +0300 Subject: [PATCH 1/3] Don't pin setuptools < 82 anymore --- .github/workflows/publish-package.yml | 2 +- .github/workflows/testing.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 1577709..0e44709 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -27,6 +27,6 @@ jobs: TWINE_USERNAME: ${{ secrets.GEMFURY_USERNAME }} TWINE_PASSWORD: ${{ secrets.GEMFURY_PUSH_TOKEN }} run: | - pip install -U pip "setuptools<82" twine wheel + pip install -U pip setuptools twine wheel make upload diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 29642bc..3771fb2 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -28,7 +28,7 @@ jobs: - name: Build me run: | - pip install -U pip "setuptools<82" wheel twine + pip install -U pip setuptools wheel twine make package From 166fe5e1f5157985610ab406d8e4ead3f1ee8a86 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sat, 23 May 2026 14:51:57 +0300 Subject: [PATCH 2/3] Rework how we mock Kiwi TCMS plugins for testing purposes --- test_project/settings.py | 52 +++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/test_project/settings.py b/test_project/settings.py index 6f7a8e8..787f85d 100644 --- a/test_project/settings.py +++ b/test_project/settings.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023 Alexander Todorov +# Copyright (c) 2019-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -8,6 +8,35 @@ import os import sys +from importlib.metadata import Distribution, DistributionFinder + + +# pretend this is a plugin during testing & development +# IT NEEDS TO BE BEFORE the wildcard import below !!! +# .egg-info/ directory will mess up with this +class FakePluginFinder(DistributionFinder): + class FakeDistribution(Distribution): # pylint: disable=nested-class-found + def read_text(self, filename): + if filename == "METADATA": + return """Name: kiwitcms_github_app +Version: 0.1 +""" + if filename == "entry_points.txt": + return """ +[kiwitcms.plugins] +kiwitcms_github_app=tcms_github_app +""" + + return "" + + def locate_file(self, path): + raise RuntimeError("This distribution has no file system") + + def find_distributions(self, context=DistributionFinder.Context()): + yield self.FakeDistribution() + + +sys.meta_path.append(FakePluginFinder()) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -15,27 +44,16 @@ # so we can load multi_tenant.py first! home_dir = os.path.expanduser("~") removed_paths = [] -for path in sys.path: - if path.startswith(home_dir) and path.find('site-packages') == -1: - removed_paths.append(path) +for a_path in sys.path: + if a_path.startswith(home_dir) and a_path.find('site-packages') == -1: + removed_paths.append(a_path) -for path in removed_paths: - sys.path.remove(path) +for a_path in removed_paths: + sys.path.remove(a_path) # re add them again sys.path.extend(removed_paths) -import pkg_resources - -# pretend this is a plugin during testing & development -# IT NEEDS TO BE BEFORE the wildcard import below !!! -# .egg-info/ directory will mess up with this -dist = pkg_resources.Distribution(__file__) -entry_point = pkg_resources.EntryPoint.parse('kiwitcms_github_app = tcms_github_app', - dist=dist) -dist._ep_map = {'kiwitcms.plugins': {'kiwitcms_github_app': entry_point}} -pkg_resources.working_set.add(dist) - from tcms.settings.product import * # noqa: F403 # check for a clean devel environment From 12887e8244e11a94463107554fba129099ffd520 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sat, 23 May 2026 14:53:57 +0300 Subject: [PATCH 3/3] Changelog for v2.2.1 --- README.rst | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 10b1c37..4b93451 100644 --- a/README.rst +++ b/README.rst @@ -107,6 +107,13 @@ Then configure how the application interacts with GitHub: Changelog --------- +v2.2.1 (23 May 2026) +~~~~~~~~~~~~~~~~~~~~ + +- Make this code compatible with setuptools>=82 +- Pin multiple transitive dependencies + + v2.2.0 (16 Apr 2026) ~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index b1672f3..035a333 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_install_requires(path): setup( name='kiwitcms-github-app', - version='2.2.0', + version='2.2.1', description='GitHub App integration for Kiwi TCMS', long_description=get_long_description(), author='Kiwi TCMS',