File: drop-distutils.patch

package info (click to toggle)
hamster-time-tracker 3.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,340 kB
  • sloc: python: 35,215; xml: 30; makefile: 29; sh: 23
file content (48 lines) | stat: -rw-r--r-- 1,879 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Project Hamster Team <team+project-hamster@tracker.debian.org>
Date: Fri, 14 Mar 2025 15:57:17 +0100
Subject: drop-distutils

Drop check for ancient dbus versions

This check warned against using a very old dbus version that caused
breakage. However, the check used the `distutils` package for version
comparison, but that package is deprecated and will be removed in an
upcoming python version. Since there does not seem to be a direct
alternative for version comparisons in the core Python libraries and
this check is about a 4-year old dbus version anyway, just remove the
check rather than adding an extra dependency just for this.

Origin: upstream, https://github.com/projecthamster/hamster/commit/f14e4276d11c5d69fb6da844735cffc7a718f1f1
---
 src/hamster/client.py | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/hamster/client.py b/src/hamster/client.py
index 8a0c297..ab3d3ba 100644
--- a/src/hamster/client.py
+++ b/src/hamster/client.py
@@ -25,7 +25,6 @@ logger = logging.getLogger(__name__)   # noqa: E402
 import sys
 
 from calendar import timegm
-from distutils.version import LooseVersion
 from gi.repository import GObject as gobject
 from textwrap import dedent
 
@@ -42,16 +41,6 @@ from hamster.lib.fact import Fact, FactError
 from hamster.lib import datetime as dt
 
 
-# bug fixed in dbus-python 1.2.14 (released on 2019-11-25)
-assert not (
-    sys.version_info >= (3, 8)
-    and LooseVersion(dbus.__version__) < LooseVersion("1.2.14")
-    ), """python3.8 changed str(<dbus integers>).
-       That broke hamster (https://github.com/projecthamster/hamster/issues/477).
-       Please upgrade to dbus-python >= 1.2.14.
-    """
-
-
 class Storage(gobject.GObject):
     """Hamster client class, communicating to hamster storage daemon via d-bus.
        Subscribe to the `tags-changed`, `facts-changed` and `activities-changed`