File: python-no-six.patch

package info (click to toggle)
libmodulemd 2.15.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,180 kB
  • sloc: ansic: 37,927; python: 3,233; xml: 1,739; sh: 389; makefile: 42
file content (28 lines) | stat: -rw-r--r-- 780 bytes parent folder | download
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
Description: Drop the Python "six" dependency
 We only build a Python 3.x module, so there is no "other" text type
 besides `str`.
Bug-Debian: https://bugs.debian.org/1081759
Forwarded: not-needed
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2026-01-06

--- a/bindings/python/gi/overrides/Modulemd.py
+++ b/bindings/python/gi/overrides/Modulemd.py
@@ -16,7 +16,6 @@
 
 import functools
 
-from six import text_type
 from gi.repository import GLib
 
 import datetime
@@ -94,9 +93,6 @@
         if isinstance(obj, str):
             return ModulemdUtil.variant_str(obj)
 
-        elif isinstance(obj, text_type):
-            return ModulemdUtil.variant_str(obj.encode("utf-8"))
-
         elif isinstance(obj, bool):
             return ModulemdUtil.variant_bool(obj)