Package: git-buildpackage Version: 0.9.9 Severity: normal Hello Guido,
I was trying to use 'gbp create-remote-repo' again after a long time but this was failing with a import error due the line 'import urllib' in create_remote_repo.py. $ gbp create-remote-repo --remote-url-pattern="[email protected]:my-team/%(pkg)s" --remote-name=myrepo Traceback (most recent call last): File "/usr/bin/gbp", line 149, in <module> sys.exit(supercommand()) File "/usr/bin/gbp", line 145, in supercommand return module.main(args) File "/usr/lib/python3/dist-packages/gbp/scripts/create_remote_repo.py", line 395, in main retval = do_create(options) File "/usr/lib/python3/dist-packages/gbp/scripts/create_remote_repo.py", line 317, in do_create options.bare) File "/usr/lib/python3/dist-packages/gbp/scripts/create_remote_repo.py", line 77, in parse_url frags = urllib.parse.urlparse(remote_url) AttributeError: module 'urllib' has no attribute 'parse' This happen because pyhton3-urllib3 is providing the parse submodul not automatically anymore and you need to import this submodul specifically. The added patch should correct the wanted behavior at least the create command is working then again. Regards Carsten -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.16.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages git-buildpackage depends on: ii devscripts 2.18.3 ii git 1:2.17.1-1 ii man-db 2.8.3-2 ii python3 3.6.5-3 ii python3-dateutil 2.6.1-1 ii python3-pkg-resources 39.1.0-1 Versions of packages git-buildpackage recommends: ii cowbuilder 0.87+b1 ii pbuilder 0.229.2 ii pristine-tar 1.44 ii python3-requests 2.18.4-2 Versions of packages git-buildpackage suggests: pn python3-notify2 <none> ii sudo 1.8.23-1 ii unzip 6.0-21 -- no debconf information
>From 91c88c99a908e5c67bcdf028a0cd9e5bbf9a4919 Mon Sep 17 00:00:00 2001 From: Carsten Schoenert <[email protected]> Date: Sun, 10 Jun 2018 07:03:01 +0200 Subject: [PATCH] create_remote_repo: import urllib.parse Pyhon3 modul After the switch of git-buildpackage to Python3 the import of urllib (from python3-urllib3) is not automatic including the parse submodul anymore. Ipmorting the submodul directly is providing the needed functions now. --- gbp/scripts/create_remote_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py index b744c255..6c1ff7a0 100644 --- a/gbp/scripts/create_remote_repo.py +++ b/gbp/scripts/create_remote_repo.py @@ -20,7 +20,7 @@ import sys import os -import urllib +import urllib.parse import subprocess import tty import termios -- 2.17.1

