public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
To: git-commits@fedoraproject.org
Subject: [rpms/sugar-toolkit-gtk3] rawhide: Add patch
Date: Thu, 22 Oct 2026 12:35:42 GMT	[thread overview]
Message-ID: <179267254222.1.9043275536784083403.rpms-sugar-toolkit-gtk3-055c2fc1aa17@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/sugar-toolkit-gtk3
            Branch : rawhide
            Commit : 055c2fc1aa17f4918e797513faa20d8fd916823a
            Author : Chihurumnaya Ibiam <ibiam@sugarlabs.org>
            Date   : 2026-10-22T13:35:18+01:00
            Stats  : +670/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/sugar-toolkit-gtk3/c/055c2fc1aa17f4918e797513faa20d8fd916823a?branch=rawhide

            Log:
            Add patch

Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>

---
diff --git a/Drop-use-of-six.patch b/Drop-use-of-six.patch
new file mode 100644
index 0000000..26940e6
--- /dev/null
+++ b/Drop-use-of-six.patch
@@ -0,0 +1,670 @@
+From 8aaeeb2286483e23b74e7368f2b9d501248aec21 Mon Sep 17 00:00:00 2001
+From: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
+Date: Thu, 22 Oct 2026 08:11:28 -0400
+Subject: [PATCH] Drop use of six
+
+It's deprecated and we don't need to be using it anymore.
+
+Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
+---
+ .github/workflows/docs.yml              |  2 +-
+ src/sugar3/activity/activity.py         |  9 +++----
+ src/sugar3/activity/activityinstance.py |  7 -----
+ src/sugar3/activity/bundlebuilder.py    | 10 +++-----
+ src/sugar3/bundle/activitybundle.py     | 13 +++-------
+ src/sugar3/bundle/bundle.py             |  4 +--
+ src/sugar3/bundle/contentbundle.py      |  4 +--
+ src/sugar3/datastore/datastore.py       | 21 +++++++--------
+ src/sugar3/dispatch/dispatcher.py       | 11 ++------
+ src/sugar3/dispatch/saferef.py          | 22 ++++------------
+ src/sugar3/graphics/icon.py             |  9 +++----
+ src/sugar3/graphics/iconentry.py        |  2 +-
+ src/sugar3/graphics/objectchooser.py    |  4 +--
+ src/sugar3/graphics/xocolor.py          |  3 +--
+ src/sugar3/logger.py                    |  5 +---
+ src/sugar3/network.py                   |  6 ++---
+ src/sugar3/presence/activity.py         | 31 +++++++---------------
+ src/sugar3/presence/buddy.py            | 34 ++++++++-----------------
+ src/sugar3/presence/tubeconn.py         |  3 +--
+ src/sugar3/profile.py                   |  2 +-
+ src/sugar3/util.py                      | 15 ++++-------
+ 21 files changed, 69 insertions(+), 148 deletions(-)
+
+diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
+index 774d48db0..b6e68ef01 100644
+--- a/.github/workflows/docs.yml
++++ b/.github/workflows/docs.yml
+@@ -27,7 +27,7 @@ jobs:
+           sudo apt install -y libgirepository1.0-dev linux-libc-dev gir1.2-sugarext-1.0
+ 
+           # install python3 dependencies
+-          sudo apt install -y gir1.2-webkit2-4.1 python3-six python3-decorator
++          sudo apt install -y gir1.2-webkit2-4.1 python3-decorator
+           sudo apt install -y python3-dateutil python3-gi-cairo gir1.2-telepathyglib-0.12
+ 
+       - uses: actions/checkout@v4
+diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py
+index 4f7c9a222..e59f2af69 100644
+--- a/src/sugar3/activity/activity.py
++++ b/src/sugar3/activity/activity.py
+@@ -158,7 +158,7 @@ Hint: A good and simple activity to learn from is the Read activity.
+ You may copy it and use it as a template.
+ '''
+ 
+-import six
++import io
+ import gettext
+ import logging
+ import os
+@@ -908,7 +908,7 @@ class Activity(Window, Gtk.Container):
+         cr.set_source_surface(screenshot_surface)
+         cr.paint()
+ 
+-        preview_str = six.BytesIO()
++        preview_str = io.BytesIO()
+         preview_surface.write_to_png(preview_str)
+         return preview_str.getvalue()
+ 
+@@ -917,10 +917,7 @@ class Activity(Window, Gtk.Container):
+             buddies = {}
+             for buddy in self.shared_activity.get_joined_buddies():
+                 if not buddy.props.owner:
+-                    if six.PY2:
+-                        buddy_id = sha1(buddy.props.key).hexdigest()
+-                    else:
+-                        buddy_id = sha1((buddy.props.key).encode('utf-8')).hexdigest()
++                    buddy_id = sha1((buddy.props.key).encode('utf-8')).hexdigest()
+                     buddies[buddy_id] = [buddy.props.nick, buddy.props.color]
+             return buddies
+         else:
+diff --git a/src/sugar3/activity/activityinstance.py b/src/sugar3/activity/activityinstance.py
+index 7723e7fb3..e703d8670 100644
+--- a/src/sugar3/activity/activityinstance.py
++++ b/src/sugar3/activity/activityinstance.py
+@@ -16,15 +16,8 @@
+ 
+ import os
+ import sys
+-import six
+ import logging
+ 
+-# Change the default encoding to avoid UnicodeDecodeError
+-# http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038928.html
+-if six.PY2:
+-    reload(sys)
+-    sys.setdefaultencoding('utf-8')
+-
+ import gettext
+ from argparse import ArgumentParser
+ 
+diff --git a/src/sugar3/activity/bundlebuilder.py b/src/sugar3/activity/bundlebuilder.py
+index 51ccf8ea0..c6bb6b7b8 100644
+--- a/src/sugar3/activity/bundlebuilder.py
++++ b/src/sugar3/activity/bundlebuilder.py
+@@ -26,7 +26,6 @@ is setup by creating a `setup.py` file in the project with the following::
+     bundlebuilder.start()
+ '''
+ 
+-import six
+ import argparse
+ import operator
+ import os
+@@ -41,13 +40,13 @@ import gettext
+ import logging
+ from glob import glob
+ from fnmatch import fnmatch
+-from six.moves.configparser import ConfigParser
++from configparser import ConfigParser
+ import xml.etree.ElementTree as ET
+-from six.moves.html_parser import HTMLParser
++from html.parser import HTMLParser
+ 
+ from sugar3 import env
+ from sugar3.bundle.activitybundle import ActivityBundle
+-from six.moves import reduce
++from functools import reduce
+ 
+ 
+ IGNORE_DIRS = ['dist', '.git', 'screenshots']
+@@ -583,8 +582,7 @@ def cmd_genpot(config, options):
+     args = ['xgettext', '--join-existing', '--language=Python',
+             '--keyword=_', '--add-comments=TRANS:',
+             '--output=%s' % pot_file]
+-    if six.PY3:
+-        args.insert(5, '--from-code=UTF-8')
++    args.insert(5, '--from-code=UTF-8')
+ 
+     args += python_files
+     retcode = subprocess.call(args)
+diff --git a/src/sugar3/bundle/activitybundle.py b/src/sugar3/bundle/activitybundle.py
+index 87aa79c71..9e1c952ba 100644
+--- a/src/sugar3/bundle/activitybundle.py
++++ b/src/sugar3/bundle/activitybundle.py
+@@ -20,8 +20,7 @@
+ UNSTABLE.
+ """
+ 
+-from six.moves.configparser import ConfigParser, ParsingError
+-import six
++from configparser import ConfigParser, ParsingError
+ from locale import normalize
+ import os
+ import shutil
+@@ -130,10 +129,7 @@ class ActivityBundle(Bundle):
+ 
+     def _parse_info(self, info_file):
+         cp = ConfigParser()
+-        if six.PY2:
+-            cp.readfp(info_file)
+-        else:
+-            cp.read_string(info_file.read().decode())
++        cp.read_string(info_file.read().decode())
+ 
+         section = 'Activity'
+ 
+@@ -255,10 +251,7 @@ class ActivityBundle(Bundle):
+     def _parse_linfo(self, linfo_file):
+         cp = ConfigParser()
+         try:
+-            if six.PY2:
+-                cp.readfp(linfo_file)
+-            else:
+-                cp.read_string(linfo_file.read().decode())
++            cp.read_string(linfo_file.read().decode())
+         except ParsingError as e:
+             logging.exception('Exception reading linfo file: %s', e)
+             return
+diff --git a/src/sugar3/bundle/bundle.py b/src/sugar3/bundle/bundle.py
+index 988e4295d..d46c7df13 100644
+--- a/src/sugar3/bundle/bundle.py
++++ b/src/sugar3/bundle/bundle.py
+@@ -20,7 +20,7 @@
+ UNSTABLE.
+ """
+ 
+-import six
++import io
+ import os
+ import logging
+ import shutil
+@@ -124,7 +124,7 @@ class Bundle(object):
+             path = os.path.join(self._zip_root_dir, filename)
+             try:
+                 data = self._zip_file.read(path)
+-                f = six.BytesIO(data)
++                f = io.BytesIO(data)
+             except KeyError:
+                 logging.debug('%s not found in zip %s.' % (filename, path))
+                 return None
+diff --git a/src/sugar3/bundle/contentbundle.py b/src/sugar3/bundle/contentbundle.py
+index 6cd8eedb0..d398162c3 100644
+--- a/src/sugar3/bundle/contentbundle.py
++++ b/src/sugar3/bundle/contentbundle.py
+@@ -21,8 +21,8 @@
+ UNSTABLE.
+ """
+ 
+-from six.moves import urllib
+-from six.moves.configparser import ConfigParser
++import urllib
++from configparser import ConfigParser
+ 
+ import tempfile
+ import os
+diff --git a/src/sugar3/datastore/datastore.py b/src/sugar3/datastore/datastore.py
+index fd6c56c30..d7d96d049 100644
+--- a/src/sugar3/datastore/datastore.py
++++ b/src/sugar3/datastore/datastore.py
+@@ -20,7 +20,6 @@
+ STABLE
+ """
+ 
+-import six
+ import logging
+ import time
+ from datetime import datetime
+@@ -87,12 +86,11 @@ class DSMetadata(GObject.GObject):
+         if not properties:
+             self._properties = {}
+         else:
+-            if six.PY3:
+-                for x, y in list(properties.items()):
+-                    try:
+-                        properties[x] = y.decode()
+-                    except BaseException:
+-                        pass
++            for x, y in list(properties.items()):
++                try:
++                    properties[x] = y.decode()
++                except BaseException:
++                    pass
+             self._properties = properties
+ 
+         default_keys = ['activity', 'activity_id',
+@@ -105,11 +103,10 @@ class DSMetadata(GObject.GObject):
+         return self._properties[key]
+ 
+     def __setitem__(self, key, value):
+-        if six.PY3:
+-            try:
+-                value = value.decode()
+-            except BaseException:
+-                pass
++        try:
++            value = value.decode()
++        except BaseException:
++            pass
+         if key not in self._properties or self._properties[key] != value:
+             self._properties[key] = value
+             self.emit('updated')
+diff --git a/src/sugar3/dispatch/dispatcher.py b/src/sugar3/dispatch/dispatcher.py
+index e2a65866b..9c959adf8 100644
+--- a/src/sugar3/dispatch/dispatcher.py
++++ b/src/sugar3/dispatch/dispatcher.py
+@@ -1,5 +1,4 @@
+ import weakref
+-import six
+ 
+ from sugar3.dispatch import saferef
+ 
+@@ -195,14 +194,8 @@ class Signal(object):
+ 
+ 
+ def im_self(func):
+-    if six.PY2:
+-        return func.im_self
+-    elif six.PY3:
+-        return func.__self__
++    return func.__self__
+ 
+ 
+ def im_func(func):
+-    if six.PY2:
+-        return func.im_func
+-    elif six.PY3:
+-        return func.__func__
++    return func.__func__
+diff --git a/src/sugar3/dispatch/saferef.py b/src/sugar3/dispatch/saferef.py
+index b3f8d7692..fd08ed49c 100644
+--- a/src/sugar3/dispatch/saferef.py
++++ b/src/sugar3/dispatch/saferef.py
+@@ -5,7 +5,6 @@ Provides a way to safely weakref any function, including bound methods (which
+ aren't handled by the core weakref module).
+ """
+ 
+-import six
+ import weakref
+ import traceback
+ 
+@@ -25,14 +24,9 @@ def safeRef(target, onDelete=None):
+         if im_self(target) is not None:
+             # Turn a bound method into a BoundMethodWeakref instance.
+             # Keep track of these instances for lookup by disconnect().
+-            if six.PY2:
+-                assert hasattr(target, 'im_func'), \
+-                    "safeRef target %r has im_self, but no im_func, " \
+-                    "don't know how to create reference" % (target,)
+-            else:
+-                assert hasattr(target, '__func__'), \
+-                    "safeRef target %r has __self__, but no __func__, " \
+-                    "don't know how to create reference" % (target,)
++            assert hasattr(target, '__func__'), \
++                "safeRef target %r has __self__, but no __func__, " \
++                "don't know how to create reference" % (target,)
+ 
+             reference = get_bound_method_weakref(
+                 target=target,
+@@ -271,14 +265,8 @@ def get_bound_method_weakref(target, onDelete):
+ 
+ 
+ def im_self(func):
+-    if six.PY2:
+-        return func.im_self
+-    elif six.PY3:
+-        return func.__self__
++    return func.__self__
+ 
+ 
+ def im_func(func):
+-    if six.PY2:
+-        return func.im_func
+-    elif six.PY3:
+-        return func.__func__
++    return func.__func__
+diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
+index fc0984104..fd94b4570 100644
+--- a/src/sugar3/graphics/icon.py
++++ b/src/sugar3/graphics/icon.py
+@@ -87,13 +87,12 @@ In this example, the badge will be centered at 97.0% on the X axis,
+ and 85.0% on the Y axis.
+ '''
+ 
+-import six
+ import re
+ import math
+ import logging
+ import os
+ 
+-from six.moves.configparser import ConfigParser
++from configparser import ConfigParser
+ 
+ import gi
+ gi.require_version('Rsvg', '2.0')
+@@ -129,8 +128,8 @@ class _SVGLoader(object):
+             if cache:
+                 self._cache[file_name] = icon
+ 
+-        for entity, value in list(entities.items()):
+-            if isinstance(value, six.string_types):
++        for entity, value in entities.items():
++            if isinstance(value, str):
+                 xml = '<!ENTITY %s "%s">' % (entity, value)
+                 icon = re.sub('<!ENTITY %s .*>' % entity, xml, icon)
+             else:
+@@ -804,7 +803,7 @@ class EventIcon(Gtk.EventBox):
+         # for example, after a touch palette invocation
+         self.connect_after('button-release-event',
+                            self.__button_release_event_cb)
+-        for key, value in six.iteritems(kwargs):
++        for key, value in kwargs.items():
+             self.set_property(key, value)
+ 
+         from sugar3.graphics.palette import CursorInvoker
+diff --git a/src/sugar3/graphics/iconentry.py b/src/sugar3/graphics/iconentry.py
+index 8bc4badfc..17a25204d 100644
+--- a/src/sugar3/graphics/iconentry.py
++++ b/src/sugar3/graphics/iconentry.py
+@@ -54,7 +54,7 @@ class IconEntry(Gtk.Entry):
+             entities = {'fill_color': style.COLOR_TOOLBAR_GREY.get_svg(),
+                         'stroke_color': style.COLOR_TOOLBAR_GREY.get_svg()}
+             handle = loader.load(icon_info.get_filename(), entities, None)
+-            pixbuf = handle.render_pixbuf()
++            pixbuf = handle.get_pixbuf_and_error()
+         else:
+             pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon_info.get_filename())
+         del icon_info
+diff --git a/src/sugar3/graphics/objectchooser.py b/src/sugar3/graphics/objectchooser.py
+index bd367e02b..20690c40a 100644
+--- a/src/sugar3/graphics/objectchooser.py
++++ b/src/sugar3/graphics/objectchooser.py
+@@ -19,7 +19,7 @@
+ STABLE.
+ """
+ 
+-import six
++import io
+ import logging
+ import cairo
+ 
+@@ -84,7 +84,7 @@ def get_preview_pixbuf(preview_data, width=-1, height=-1):
+             import base64
+             preview_data = base64.b64decode(preview_data)
+ 
+-        png_file = six.BytesIO(preview_data)
++        png_file = io.BytesIO(preview_data)
+         try:
+             # Load image and scale to dimensions
+             surface = cairo.ImageSurface.create_from_png(png_file)
+diff --git a/src/sugar3/graphics/xocolor.py b/src/sugar3/graphics/xocolor.py
+index 78525c5df..dc15ae3f5 100644
+--- a/src/sugar3/graphics/xocolor.py
++++ b/src/sugar3/graphics/xocolor.py
+@@ -20,7 +20,6 @@ This class represents all of the colors that the XO can take on.
+ Each pair of colors represents the fill color and the stroke color
+ '''
+ 
+-import six
+ import random
+ import logging
+ 
+@@ -216,7 +215,7 @@ def _parse_string(color_string):
+     Args:
+         color_string (string): two html format strings separated by a comma
+     '''
+-    if not isinstance(color_string, (six.text_type, six.binary_type)):
++    if not isinstance(color_string, (str, bytes)):
+         logging.error('Invalid color string: %r', color_string)
+         return None
+ 
+diff --git a/src/sugar3/logger.py b/src/sugar3/logger.py
+index 2d2fa9aa9..2e2566ea1 100644
+--- a/src/sugar3/logger.py
++++ b/src/sugar3/logger.py
+@@ -20,7 +20,6 @@
+ STABLE.
+ """
+ 
+-import six
+ import array
+ import collections
+ import errno
+@@ -30,7 +29,7 @@ import os
+ import decorator
+ import time
+ 
+-from six.moves import reprlib as repr_
++import reprlib as repr_
+ from sugar3 import env
+ 
+ # Let's keep this module self contained so that it can be easily
+@@ -175,8 +174,6 @@ class TraceRepr(repr_.Repr):
+     # better handling of subclasses of basic types, e.g. for DBus
+     _TYPES = [int, bool, tuple, list, array.array, set, frozenset,
+               collections.deque, dict, str]
+-    if six.PY2:
+-        _TYPES.append(long)
+ 
+     def repr1(self, x, level):
+         for t in self._TYPES:
+diff --git a/src/sugar3/network.py b/src/sugar3/network.py
+index 6afa4f8a8..592bd7fbb 100644
+--- a/src/sugar3/network.py
++++ b/src/sugar3/network.py
+@@ -21,14 +21,14 @@ STABLE.
+ 
+ import os
+ import threading
+-from six.moves import urllib
++import urllib
+ import fcntl
+ import tempfile
+ 
+ from gi.repository import GObject
+ from gi.repository import GLib
+-from six.moves import SimpleHTTPServer
+-from six.moves import socketserver
++from http.server import SimpleHTTPServer
++import socketserver
+ 
+ 
+ __authinfos = {}
+diff --git a/src/sugar3/presence/activity.py b/src/sugar3/presence/activity.py
+index 5a9c3f515..425fd268b 100644
+--- a/src/sugar3/presence/activity.py
++++ b/src/sugar3/presence/activity.py
+@@ -21,7 +21,6 @@
+ STABLE.
+ """
+ 
+-import six
+ import logging
+ from functools import partial
+ 
+@@ -130,27 +129,15 @@ class Activity(GObject.GObject):
+ 
+     def _start_tracking_properties(self):
+         bus = dbus.SessionBus()
+-        if six.PY2:
+-            self._get_properties_call = bus.call_async(
+-                self.telepathy_conn.requested_bus_name,
+-                self.telepathy_conn.object_path,
+-                CONN_INTERFACE_ACTIVITY_PROPERTIES,
+-                'GetProperties',
+-                'u',
+-                (self.room_handle,),
+-                reply_handler=self.__got_properties_cb,
+-                error_handler=self.__error_handler_cb,
+-                utf8_strings=True)
+-        else:
+-            self._get_properties_call = bus.call_async(
+-                self.telepathy_conn.requested_bus_name,
+-                self.telepathy_conn.object_path,
+-                CONN_INTERFACE_ACTIVITY_PROPERTIES,
+-                'GetProperties',
+-                'u',
+-                (self.room_handle,),
+-                reply_handler=self.__got_properties_cb,
+-                error_handler=self.__error_handler_cb)
++        self._get_properties_call = bus.call_async(
++            self.telepathy_conn.requested_bus_name,
++            self.telepathy_conn.object_path,
++            CONN_INTERFACE_ACTIVITY_PROPERTIES,
++            'GetProperties',
++            'u',
++            (self.room_handle,),
++            reply_handler=self.__got_properties_cb,
++            error_handler=self.__error_handler_cb)
+ 
+         # As only one Activity instance is needed per activity process,
+         # we can afford listening to ActivityPropertiesChanged like this.
+diff --git a/src/sugar3/presence/buddy.py b/src/sugar3/presence/buddy.py
+index c50d32fb7..0ba7f4e1c 100644
+--- a/src/sugar3/presence/buddy.py
++++ b/src/sugar3/presence/buddy.py
+@@ -23,7 +23,6 @@ STABLE.
+ 
+ import logging
+ 
+-import six
+ import gi
+ gi.require_version('TelepathyGLib', '0.12')
+ from gi.repository import GObject
+@@ -172,29 +171,16 @@ class Buddy(BaseBuddy):
+                                      dbus_interface=CONNECTION)
+         self.contact_handle = handles[0]
+ 
+-        if six.PY2:
+-            self._get_properties_call = bus.call_async(
+-                connection_name,
+-                connection.object_path,
+-                CONN_INTERFACE_BUDDY_INFO,
+-                'GetProperties',
+-                'u',
+-                (self.contact_handle,),
+-                reply_handler=self.__got_properties_cb,
+-                error_handler=self.__error_handler_cb,
+-                utf8_strings=True,
+-                byte_arrays=True)
+-        else:
+-            self._get_properties_call = bus.call_async(
+-                connection_name,
+-                connection.object_path,
+-                CONN_INTERFACE_BUDDY_INFO,
+-                'GetProperties',
+-                'u',
+-                (self.contact_handle,),
+-                reply_handler=self.__got_properties_cb,
+-                error_handler=self.__error_handler_cb,
+-                byte_arrays=True)
++        self._get_properties_call = bus.call_async(
++            connection_name,
++            connection.object_path,
++            CONN_INTERFACE_BUDDY_INFO,
++            'GetProperties',
++            'u',
++            (self.contact_handle,),
++            reply_handler=self.__got_properties_cb,
++            error_handler=self.__error_handler_cb,
++            byte_arrays=True)
+ 
+         self._get_attributes_call = bus.call_async(
+             connection_name,
+diff --git a/src/sugar3/presence/tubeconn.py b/src/sugar3/presence/tubeconn.py
+index 8b1e2ff92..f4b5511a4 100644
+--- a/src/sugar3/presence/tubeconn.py
++++ b/src/sugar3/presence/tubeconn.py
+@@ -24,7 +24,6 @@ __all__ = ('TubeConnection', )
+ __docformat__ = 'reStructuredText'
+ 
+ 
+-import six
+ import logging
+ 
+ from dbus.connection import Connection
+@@ -114,6 +113,6 @@ class TubeConnection(Connection):
+             # GetDBusNames already returned: fake a participant add event
+             # immediately
+             added = []
+-            for k, v in six.iteritems(self.participants):
++            for k, v in self.participants.items():
+                 added.append((k, v))
+             callback(added, [])
+diff --git a/src/sugar3/profile.py b/src/sugar3/profile.py
+index 21eb2b8d7..136083080 100644
+--- a/src/sugar3/profile.py
++++ b/src/sugar3/profile.py
+@@ -22,7 +22,7 @@ from gi.repository import Gio
+ import os
+ import logging
+ 
+-from six.moves.configparser import ConfigParser
++from configparser import ConfigParser
+ 
+ from sugar3 import env
+ from sugar3 import util
+diff --git a/src/sugar3/util.py b/src/sugar3/util.py
+index bf603693c..0a8378bea 100644
+--- a/src/sugar3/util.py
++++ b/src/sugar3/util.py
+@@ -20,7 +20,6 @@
+ UNSTABLE. We have been adding helpers randomly to this module.
+ """
+ 
+-import six
+ import os
+ import time
+ import hashlib
+@@ -40,19 +39,15 @@ def printable_hash(in_hash):
+     """Convert binary hash data into printable characters."""
+     printable = ""
+     for char in in_hash:
+-        if six.PY3:
+-            char = bytes([char])
+-            printable = printable + binascii.b2a_hex(char).decode()
+-        else:
+-            printable = printable + binascii.b2a_hex(char)
++        char = bytes([char])
++        printable = printable + binascii.b2a_hex(char).decode()
+     return printable
+ 
+ 
+ def sha_data(data):
+     """sha1 hash some bytes."""
+     sha_hash = hashlib.sha1()
+-    if six.PY3:
+-        data = data.encode('utf-8')
++    data = data.encode('utf-8')
+     sha_hash.update(data)
+     return sha_hash.digest()
+ 
+@@ -89,7 +84,7 @@ def is_hex(s):
+ 
+ def validate_activity_id(actid):
+     """Validate an activity ID."""
+-    if not isinstance(actid, (six.binary_type, six.text_type)):
++    if not isinstance(actid, (bytes, str)):
+         return False
+     if len(actid) != ACTIVITY_ID_LEN:
+         return False
+@@ -210,7 +205,7 @@ class LRU:
+         return iter(self.d)
+ 
+     def itervalues(self):
+-        for i_, j in six.iteritems(self):
++        for i_, j in self.d.items():
+             yield j
+ 
+     def keys(self):
+-- 
+2.47.3
+

             reply	other threads:[~2026-10-22 12:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 12:35 Chihurumnaya Ibiam [this message]
2026-10-24 14:42 [rpms/sugar-toolkit-gtk3] rawhide: Add patch Chihurumnaya Ibiam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179267254222.1.9043275536784083403.rpms-sugar-toolkit-gtk3-055c2fc1aa17@fedoraproject.org \
    --to=ibiam@sugarlabs.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox