From 327b9742dbe64e481220b0ebe1e9f88f233eccb6 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 1 Apr 2026 11:58:16 +0100 Subject: [PATCH 1/3] Drop dependency on python-six In Ubuntu and Debian we no longer ship Python 2.7, so the translation module is an unnecessary dependency. In Python 3 the text type is always 'str', so it is not needed. Simply set the value to 'unicode' on Python2, and 'str' on Python3. --- bindings/python/gi/overrides/Modulemd.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/python/gi/overrides/Modulemd.py b/bindings/python/gi/overrides/Modulemd.py index 23d5218cb..8abdc9a78 100644 --- a/bindings/python/gi/overrides/Modulemd.py +++ b/bindings/python/gi/overrides/Modulemd.py @@ -16,10 +16,15 @@ import functools -from six import text_type from gi.repository import GLib import datetime +import sys + +if sys.version_info[0] >= 3: + text_type = str +else: + text_type = unicode # noqa: F821 Modulemd = get_introspection_module("Modulemd") From 4f0bee5b2142f30800c0c998e8a7a2b60eff7c01 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 1 Apr 2026 14:31:44 +0100 Subject: [PATCH 2/3] spec: drop dependency on python-six --- fedora/libmodulemd.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fedora/libmodulemd.spec b/fedora/libmodulemd.spec index c8062b845..0f6ef4d13 100644 --- a/fedora/libmodulemd.spec +++ b/fedora/libmodulemd.spec @@ -56,7 +56,6 @@ more details. Summary: Python 2 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python-gobject-base -Requires: python-six %description -n python2-%{name} Python 2 bindings for %{name} @@ -68,13 +67,6 @@ Summary: Python 3 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python%{python3_pkgversion}-gobject-base -%if (0%{?rhel} && 0%{?rhel} <= 7) -# The py3_dist macro on EPEL 7 doesn't work right at the moment -Requires: python3.6dist(six) -%else -Requires: %{py3_dist six} -%endif - %description -n python%{python3_pkgversion}-%{name} Python %{python3_pkgversion} bindings for %{name} From e27e0a28cd639a8f5aaeb65a4547123f64fede36 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 1 Apr 2026 14:33:03 +0100 Subject: [PATCH 3/3] CI: drop dependency on python-six No longer used --- .ci/archlinux/Dockerfile.deps.tmpl | 1 - .ci/centos/Dockerfile.deps.tmpl | 2 -- .ci/mageia/Dockerfile.deps.tmpl | 1 - .github/workflows/ci.yaml | 3 +-- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.ci/archlinux/Dockerfile.deps.tmpl b/.ci/archlinux/Dockerfile.deps.tmpl index 772ed63fa..be5826b92 100644 --- a/.ci/archlinux/Dockerfile.deps.tmpl +++ b/.ci/archlinux/Dockerfile.deps.tmpl @@ -13,7 +13,6 @@ RUN pacman -Syu --needed --noconfirm \ libyaml \ meson \ python-gobject \ - python-six \ && pacman -Scc --noconfirm RUN ln -sf /builddir/bindings/python/gi/overrides/Modulemd.py $(python3 -c "import gi; import os; os.makedirs(gi._overridesdir, exist_ok=True); print(gi._overridesdir)")/Modulemd.py diff --git a/.ci/centos/Dockerfile.deps.tmpl b/.ci/centos/Dockerfile.deps.tmpl index 7ce37385d..822624e4a 100644 --- a/.ci/centos/Dockerfile.deps.tmpl +++ b/.ci/centos/Dockerfile.deps.tmpl @@ -31,11 +31,9 @@ ifelse(eval(cosrelease == 8), 1, `dnl pkgconfig \ ifelse(eval(cosrelease < 9), 1, `dnl python2-devel \ - python2-six \ python36-devel \ ',`dnl python3-devel \ - python3-six \ ')dnl ifelse(eval(cosrelease < 8), 1, `dnl python-gobject-base \ diff --git a/.ci/mageia/Dockerfile.deps.tmpl b/.ci/mageia/Dockerfile.deps.tmpl index ca8fe73d9..93b1e39c9 100755 --- a/.ci/mageia/Dockerfile.deps.tmpl +++ b/.ci/mageia/Dockerfile.deps.tmpl @@ -22,7 +22,6 @@ RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags='' install \ openssl \ pkgconf \ popt-devel \ - python3-six \ python3-autopep8 \ python3-devel \ python3-gitpython \ diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f6ebb695e..b7c6769c9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -237,7 +237,7 @@ jobs: run: sed -i -e '\| usr/share/gtk-doc/|d' -e '\| usr/share/doc/|d' /etc/pacman.conf - name: Install dependencies - run: pacman -Syu --needed --noconfirm base-devel file git glib2 glib2-devel glib2-docs gobject-introspection gtk-doc jq libyaml meson python-gobject python-six valgrind + run: pacman -Syu --needed --noconfirm base-devel file git glib2 glib2-devel glib2-docs gobject-introspection gtk-doc jq libyaml meson python-gobject valgrind - name: Checkout code uses: actions/checkout@v4 @@ -300,7 +300,6 @@ jobs: openssl pkgconf popt-devel - python3-six python3-autopep8 python3-devel python3-gitpython