Package: gitsome Version: 0.8.0+ds-6 Severity: important Tags: patch upstream X-Debbugs-Cc: f...@debian.org
/usr/bin/gh provided by gitsome (as of 0.8.0+ds-6) fails to run with python3.10 which has become the default Python 3 in Debian sid: ======================================================================== $ gh Traceback (most recent call last): File "/usr/bin/gh", line 34, in <module> sys.exit(load_entry_point('gitsome==0.8.0', 'console_scripts', 'gh')()) File "/usr/bin/gh", line 26, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3/dist-packages/gitsome/main_cli.py", line 20, in <module> from .githubcli import GitHubCli File "/usr/lib/python3/dist-packages/gitsome/githubcli.py", line 21, in <module> from .github import GitHub File "/usr/lib/python3/dist-packages/gitsome/github.py", line 25, in <module> from .lib.github3 import null File "/usr/lib/python3/dist-packages/gitsome/lib/github3/__init__.py", line 18, in <module> from .api import ( File "/usr/lib/python3/dist-packages/gitsome/lib/github3/api.py", line 11, in <module> from .github import GitHub, GitHubEnterprise File "/usr/lib/python3/dist-packages/gitsome/lib/github3/github.py", line 13, in <module> from .auths import Authorization File "/usr/lib/python3/dist-packages/gitsome/lib/github3/auths.py", line 12, in <module> from .models import GitHubCore File "/usr/lib/python3/dist-packages/gitsome/lib/github3/models.py", line 19, in <module> from .session import GitHubSession File "/usr/lib/python3/dist-packages/gitsome/lib/github3/session.py", line 4, in <module> from collections import Callable ImportError: cannot import name 'Callable' from 'collections' (/usr/lib/python3.10/collections/__init__.py) ======================================================================== This bug was reported to and fixed in Ubuntu on 2022-01-28 by Alexandre Ghiti <alexandre.gh...@canonical.com>; see https://bugs.launchpad.net/ubuntu/+source/gitsome/+bug/1959377 You may consider downloading his patch from https://bugs.launchpad.net/ubuntu/+source/gitsome/+bug/1959377/+attachment/5557913/+files/debdiff_python3.10.patch The whole Ubuntu patch with other unrelated changes is available at https://patches.ubuntu.com/g/gitsome/gitsome_0.8.0+ds-6ubuntu1.patch Alexandre Ghiti has also forwarded his patch upstream as PR #191: https://github.com/donnemartin/gitsome/pull/191 Add support for python 3.10" at Use 'collections.abc' instead of 'collections' since python 3.10 does not accept this syntax anymore, it has been deprecated since python 3.3. Cheers, Anthony -- System Information: Debian Release: bookworm/sid APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'oldoldstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.16.0-6-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gitsome depends on: ii python3 3.10.4-1 ii python3-click 8.0.3-1 ii python3-colorama 0.4.4-1 ii python3-docopt 0.6.2-4 ii python3-feedparser 6.0.8-1 ii python3-numpydoc 1.2.1-1 ii python3-ply 3.11-5 ii python3-prompt-toolkit 3.0.28-1 ii python3-pygments 2.11.2+dfsg-2 ii python3-requests 2.27.1+dfsg-1 ii python3-sigmavirus24-urltemplate 4.1.1-1 ii python3-tz 2022.1-1 ii xonsh 0.11.0+dfsg-1 gitsome recommends no packages. gitsome suggests no packages. -- no debconf information
diff -Nru gitsome-0.8.0+ds/debian/changelog gitsome-0.8.0+ds/debian/changelog --- gitsome-0.8.0+ds/debian/changelog 2021-11-06 17:24:54.000000000 +0100 +++ gitsome-0.8.0+ds/debian/changelog 2022-01-28 10:43:07.000000000 +0100 @@ -1,3 +1,10 @@ +gitsome (0.8.0+ds-6ubuntu1) jammy; urgency=medium + + * d/patches: + - Add support for python3.10 + + -- Alexandre Ghiti <alexandre.gh...@canonical.com> Fri, 28 Jan 2022 10:43:07 +0100 + gitsome (0.8.0+ds-6) unstable; urgency=medium * Fix FTBFS issue (Closes: #997316) diff -Nru gitsome-0.8.0+ds/debian/patches/python3.10-support.patch gitsome-0.8.0+ds/debian/patches/python3.10-support.patch --- gitsome-0.8.0+ds/debian/patches/python3.10-support.patch 1970-01-01 01:00:00.000000000 +0100 +++ gitsome-0.8.0+ds/debian/patches/python3.10-support.patch 2022-01-28 10:41:59.000000000 +0100 @@ -0,0 +1,56 @@ +Description: Add support for python 3.10 +Use 'collections.abc' instead of 'collections' since python 3.10 does not accept +this syntax anymore, it has been deprecated since python 3.3. +Author: Alexandre Ghiti <alexandre.gh...@canonical.com> +Origin: vendor +Last-Update: 2022-01-28 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/gitsome/lib/github3/session.py ++++ b/gitsome/lib/github3/session.py +@@ -1,7 +1,7 @@ + # -*- coding: utf-8 -*- + import requests + +-from collections import Callable ++from collections.abc import Callable + from . import __version__ + from logging import getLogger + from contextlib import contextmanager +--- a/gitsome/lib/github3/structs.py ++++ b/gitsome/lib/github3/structs.py +@@ -1,5 +1,5 @@ + # -*- coding: utf-8 -*- +-import collections ++import collections.abc + import functools + + from requests.compat import urlparse, urlencode +@@ -8,7 +8,7 @@ + from . import models + + +-class GitHubIterator(models.GitHubCore, collections.Iterator): ++class GitHubIterator(models.GitHubCore, collections.abc.Iterator): + """The :class:`GitHubIterator` class powers all of the iter_* methods.""" + def __init__(self, count, url, cls, session, params=None, etag=None, + headers=None): +--- a/gitsome/lib/github3/utils.py ++++ b/gitsome/lib/github3/utils.py +@@ -1,6 +1,6 @@ + # -*- coding: utf-8 -*- + """A collection of useful utilities.""" +-import collections ++import collections.abc + import datetime + import re + +@@ -81,7 +81,7 @@ + fd = None + filename = None + if path: +- if isinstance(getattr(path, 'write', None), collections.Callable): ++ if isinstance(getattr(path, 'write', None), collections.abc.Callable): + pre_opened = True + fd = path + filename = getattr(fd, 'name', None) diff -Nru gitsome-0.8.0+ds/debian/patches/series gitsome-0.8.0+ds/debian/patches/series --- gitsome-0.8.0+ds/debian/patches/series 2021-11-06 16:17:05.000000000 +0100 +++ gitsome-0.8.0+ds/debian/patches/series 2022-01-28 10:42:26.000000000 +0100 @@ -1,2 +1,3 @@ Remove-windows-batch-setting.patch Remove-obsoleted-argument-to-fix-the-FTBFS-issue.patch +python3.10-support.patch
diff -Nru gitsome-0.8.0+ds/debian/changelog gitsome-0.8.0+ds/debian/changelog --- gitsome-0.8.0+ds/debian/changelog 2021-11-06 17:24:54.000000000 +0100 +++ gitsome-0.8.0+ds/debian/changelog 2022-01-28 10:43:07.000000000 +0100 @@ -1,3 +1,10 @@ +gitsome (0.8.0+ds-6ubuntu1) jammy; urgency=medium + + * d/patches: + - Add support for python3.10 + + -- Alexandre Ghiti <alexandre.gh...@canonical.com> Fri, 28 Jan 2022 10:43:07 +0100 + gitsome (0.8.0+ds-6) unstable; urgency=medium * Fix FTBFS issue (Closes: #997316) diff -Nru gitsome-0.8.0+ds/debian/patches/python3.10-support.patch gitsome-0.8.0+ds/debian/patches/python3.10-support.patch --- gitsome-0.8.0+ds/debian/patches/python3.10-support.patch 1970-01-01 01:00:00.000000000 +0100 +++ gitsome-0.8.0+ds/debian/patches/python3.10-support.patch 2022-01-28 10:41:59.000000000 +0100 @@ -0,0 +1,56 @@ +Description: Add support for python 3.10 +Use 'collections.abc' instead of 'collections' since python 3.10 does not accept +this syntax anymore, it has been deprecated since python 3.3. +Author: Alexandre Ghiti <alexandre.gh...@canonical.com> +Origin: vendor +Last-Update: 2022-01-28 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/gitsome/lib/github3/session.py ++++ b/gitsome/lib/github3/session.py +@@ -1,7 +1,7 @@ + # -*- coding: utf-8 -*- + import requests + +-from collections import Callable ++from collections.abc import Callable + from . import __version__ + from logging import getLogger + from contextlib import contextmanager +--- a/gitsome/lib/github3/structs.py ++++ b/gitsome/lib/github3/structs.py +@@ -1,5 +1,5 @@ + # -*- coding: utf-8 -*- +-import collections ++import collections.abc + import functools + + from requests.compat import urlparse, urlencode +@@ -8,7 +8,7 @@ + from . import models + + +-class GitHubIterator(models.GitHubCore, collections.Iterator): ++class GitHubIterator(models.GitHubCore, collections.abc.Iterator): + """The :class:`GitHubIterator` class powers all of the iter_* methods.""" + def __init__(self, count, url, cls, session, params=None, etag=None, + headers=None): +--- a/gitsome/lib/github3/utils.py ++++ b/gitsome/lib/github3/utils.py +@@ -1,6 +1,6 @@ + # -*- coding: utf-8 -*- + """A collection of useful utilities.""" +-import collections ++import collections.abc + import datetime + import re + +@@ -81,7 +81,7 @@ + fd = None + filename = None + if path: +- if isinstance(getattr(path, 'write', None), collections.Callable): ++ if isinstance(getattr(path, 'write', None), collections.abc.Callable): + pre_opened = True + fd = path + filename = getattr(fd, 'name', None) diff -Nru gitsome-0.8.0+ds/debian/patches/series gitsome-0.8.0+ds/debian/patches/series --- gitsome-0.8.0+ds/debian/patches/series 2021-11-06 16:17:05.000000000 +0100 +++ gitsome-0.8.0+ds/debian/patches/series 2022-01-28 10:42:26.000000000 +0100 @@ -1,2 +1,3 @@ Remove-windows-batch-setting.patch Remove-obsoleted-argument-to-fix-the-FTBFS-issue.patch +python3.10-support.patch
diff -Nru gitsome-0.8.0+ds/debian/changelog gitsome-0.8.0+ds/debian/changelog --- gitsome-0.8.0+ds/debian/changelog 2021-11-06 17:24:54.000000000 +0100 +++ gitsome-0.8.0+ds/debian/changelog 2022-01-28 10:43:07.000000000 +0100 @@ -1,3 +1,10 @@ +gitsome (0.8.0+ds-6ubuntu1) jammy; urgency=medium + + * d/patches: + - Add support for python3.10 + + -- Alexandre Ghiti <alexandre.gh...@canonical.com> Fri, 28 Jan 2022 10:43:07 +0100 + gitsome (0.8.0+ds-6) unstable; urgency=medium * Fix FTBFS issue (Closes: #997316) diff -Nru gitsome-0.8.0+ds/debian/patches/python3.10-support.patch gitsome-0.8.0+ds/debian/patches/python3.10-support.patch --- gitsome-0.8.0+ds/debian/patches/python3.10-support.patch 1970-01-01 01:00:00.000000000 +0100 +++ gitsome-0.8.0+ds/debian/patches/python3.10-support.patch 2022-01-28 10:41:59.000000000 +0100 @@ -0,0 +1,56 @@ +Description: Add support for python 3.10 +Use 'collections.abc' instead of 'collections' since python 3.10 does not accept +this syntax anymore, it has been deprecated since python 3.3. +Author: Alexandre Ghiti <alexandre.gh...@canonical.com> +Origin: vendor +Last-Update: 2022-01-28 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/gitsome/lib/github3/session.py ++++ b/gitsome/lib/github3/session.py +@@ -1,7 +1,7 @@ + # -*- coding: utf-8 -*- + import requests + +-from collections import Callable ++from collections.abc import Callable + from . import __version__ + from logging import getLogger + from contextlib import contextmanager +--- a/gitsome/lib/github3/structs.py ++++ b/gitsome/lib/github3/structs.py +@@ -1,5 +1,5 @@ + # -*- coding: utf-8 -*- +-import collections ++import collections.abc + import functools + + from requests.compat import urlparse, urlencode +@@ -8,7 +8,7 @@ + from . import models + + +-class GitHubIterator(models.GitHubCore, collections.Iterator): ++class GitHubIterator(models.GitHubCore, collections.abc.Iterator): + """The :class:`GitHubIterator` class powers all of the iter_* methods.""" + def __init__(self, count, url, cls, session, params=None, etag=None, + headers=None): +--- a/gitsome/lib/github3/utils.py ++++ b/gitsome/lib/github3/utils.py +@@ -1,6 +1,6 @@ + # -*- coding: utf-8 -*- + """A collection of useful utilities.""" +-import collections ++import collections.abc + import datetime + import re + +@@ -81,7 +81,7 @@ + fd = None + filename = None + if path: +- if isinstance(getattr(path, 'write', None), collections.Callable): ++ if isinstance(getattr(path, 'write', None), collections.abc.Callable): + pre_opened = True + fd = path + filename = getattr(fd, 'name', None) diff -Nru gitsome-0.8.0+ds/debian/patches/series gitsome-0.8.0+ds/debian/patches/series --- gitsome-0.8.0+ds/debian/patches/series 2021-11-06 16:17:05.000000000 +0100 +++ gitsome-0.8.0+ds/debian/patches/series 2022-01-28 10:42:26.000000000 +0100 @@ -1,2 +1,3 @@ Remove-windows-batch-setting.patch Remove-obsoleted-argument-to-fix-the-FTBFS-issue.patch +python3.10-support.patch