Package: cmake-format
Version: 0.6.13-6
Severity: normal
Dear Maintainer,
It seems Merge Requests are disabled for the Salsa project.
I cannot guess if it's intentional.
So here's an old fashioned patch.
https://salsa.debian.org/detiste-guest/cmake_format/-/compare/master...master?from_project_id=47175
Usage of the old "six" shim is slowly removed from Debian.
https://wiki.debian.org/Python3-six-removal
Upstream does not seems active, that's the reason I submit a patch here first.
I would submit a MR if asked.
Greetings
Alexandre Detiste
-- System Information:
Debian Release: 13.0
APT prefers testing
APT policy: (501, 'testing'), (450, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.38+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8),
LANGUAGE=fr_BE:fr
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages cmake-format depends on:
ii python3 3.13.5-1
ii python3-six 1.17.0-1
ii python3-yaml 6.0.2-1+b2
Versions of packages cmake-format recommends:
ii python3-argcomplete 3.6.2-1
ii python3-jinja2 3.1.6-1
cmake-format suggests no packages.
-- no debconf information
diff --git a/debian/control b/debian/control
index 06d8b94..c26de06 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,6 @@ Build-Depends: debhelper-compat (= 12),
cmake,
python3,
python3-setuptools,
- python3-six,
python3-argparse-manpage
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/debian/cmake_format
diff --git a/debian/patches/0007-patch-out-usage-of-six.patch
b/debian/patches/0007-patch-out-usage-of-six.patch
new file mode 100644
index 0000000..50d06da
--- /dev/null
+++ b/debian/patches/0007-patch-out-usage-of-six.patch
@@ -0,0 +1,52 @@
+From: Alexandre Detiste <[email protected]>
+Subject: remove usage of Python2+3 "six" shim
+
+--- a/cmakelang/command_tests/__init__.py
++++ b/cmakelang/command_tests/__init__.py
+@@ -12,7 +12,6 @@
+ import sys
+ import unittest
+
+-import six
+
+ from cmakelang.format import __main__
+ from cmakelang import configuration
+@@ -339,7 +338,7 @@
+ return test_fun
+
+
+-class TestBase(six.with_metaclass(SidecarMeta, unittest.TestCase)):
++class TestBase(unittest.TestCase, metaclass=SidecarMeta):
+ """
+ Given a bunch of example usages of a particular command, ensure that they
+ lex, parse, layout, and format the same as expected.
+--- a/cmakelang/config_util.py
++++ b/cmakelang/config_util.py
+@@ -8,7 +8,6 @@
+ import sys
+ import textwrap
+
+-import six
+
+ logger = logging.getLogger(__name__)
+
+@@ -309,7 +308,7 @@
+ "\n ".join(unused))
+
+
+-class ConfigObject(six.with_metaclass(ConfigMeta)):
++class ConfigObject(metaclass=ConfigMeta):
+ """
+ Base class for encapsulationg options/parameters
+ """
+--- a/cmakelang/pypi/setup.py
++++ b/cmakelang/pypi/setup.py
+@@ -61,7 +61,7 @@
+ "YAML": ["pyyaml>=5.3"],
+ "html-gen": ["jinja2==2.10.3"]
+ },
+- install_requires=["six>=1.13.0"]
++ install_requires=[]
+ )
+
+ setup(
diff --git a/debian/patches/series b/debian/patches/series
index fd01e5d..75a8c6a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
0004-Compatibility-with-argparse-manpage.patch
0005-Correct-misspellings-in-command-line-option-descript.patch
0006-Update-TestConfigInclude._test_passed-to-support-Pyt.patch
+0007-patch-out-usage-of-six.patch