Bug#908956: stretch-pu: package gphoto2-cffi/0.3~a1-1.1~deb9u1
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu
python3-gphoto2cffi in stretch is currently completely
broken, just trying to import it fails:
$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gphoto2cffi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/gphoto2cffi/__init__.py", line 1, in <module>
from .gphoto2 import (Camera, list_cameras, supported_cameras,
File "/usr/lib/python3/dist-packages/gphoto2cffi/gphoto2.py", line 15, in <module>
from . import errors, backend
File "/usr/lib/python3/dist-packages/gphoto2cffi/backend.py", line 56, in <module>
'extract_exif': _lib.GP_FILE_OPERATION_EXIF})
File "/usr/lib/python3.5/enum.py", line 243, in __call__
return cls._create_(value, names, module=module, qualname=qualname, type=type, start=start)
File "/usr/lib/python3.5/enum.py", line 343, in _create_
enum_class = metacls.__new__(metacls, class_name, bases, classdict)
File "/usr/lib/python3.5/enum.py", line 114, in __new__
enum_class = super().__new__(metacls, cls, bases, classdict)
TypeError: type() argument 1 must be str, not bytes
>>>
diff -Nru gphoto2-cffi-0.3~a1/debian/changelog gphoto2-cffi-0.3~a1/debian/changelog
--- gphoto2-cffi-0.3~a1/debian/changelog 2016-04-04 22:28:11.000000000 +0300
+++ gphoto2-cffi-0.3~a1/debian/changelog 2018-09-16 20:31:17.000000000 +0300
@@ -1,3 +1,17 @@
+gphoto2-cffi (0.3~a1-1.1~deb9u1) stretch; urgency=medium
+
+ * Non-maintainer upload.
+ * Rebuild for stretch.
+
+ -- Adrian Bunk <bunk@debian.org> Sun, 16 Sep 2018 20:31:17 +0300
+
+gphoto2-cffi (0.3~a1-1.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * Add upstream fix to unbreak python3-gphoto2cffi. (Closes: #896238)
+
+ -- Adrian Bunk <bunk@debian.org> Mon, 27 Aug 2018 22:41:25 +0300
+
gphoto2-cffi (0.3~a1-1) unstable; urgency=low
* Updated upstream version merging changes
diff -Nru gphoto2-cffi-0.3~a1/debian/patches/0001-Make-enum-descriptors-strs-not-bytestrings-7.patch gphoto2-cffi-0.3~a1/debian/patches/0001-Make-enum-descriptors-strs-not-bytestrings-7.patch
--- gphoto2-cffi-0.3~a1/debian/patches/0001-Make-enum-descriptors-strs-not-bytestrings-7.patch 1970-01-01 02:00:00.000000000 +0200
+++ gphoto2-cffi-0.3~a1/debian/patches/0001-Make-enum-descriptors-strs-not-bytestrings-7.patch 2018-08-27 22:34:41.000000000 +0300
@@ -0,0 +1,43 @@
+From 88ed97764365fea5f72a6f2c9aba0323b7fd93a8 Mon Sep 17 00:00:00 2001
+From: Johannes Baiter <johannes.baiter@gmail.com>
+Date: Thu, 7 Jul 2016 16:14:37 +0200
+Subject: Make enum descriptors strs, not bytestrings (#7)
+
+---
+ gphoto2cffi/backend.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gphoto2cffi/backend.py b/gphoto2cffi/backend.py
+index c49db11..21edc4b 100644
+--- a/gphoto2cffi/backend.py
++++ b/gphoto2cffi/backend.py
+@@ -48,7 +48,7 @@ LOG_LEVELS = {
+ _lib.GP_LOG_DEBUG: logging.DEBUG}
+
+
+-FILE_OPS = IntEnum(b'FileOperations', {
++FILE_OPS = IntEnum('FileOperations', {
+ 'remove': _lib.GP_FILE_OPERATION_DELETE,
+ 'extract_preview': _lib.GP_FILE_OPERATION_PREVIEW,
+ 'extract_raw': _lib.GP_FILE_OPERATION_RAW,
+@@ -56,7 +56,7 @@ FILE_OPS = IntEnum(b'FileOperations', {
+ 'extract_exif': _lib.GP_FILE_OPERATION_EXIF})
+
+
+-CAM_OPS = IntEnum(b'CameraOperations', {
++CAM_OPS = IntEnum('CameraOperations', {
+ 'capture_image': _lib.GP_OPERATION_CAPTURE_IMAGE,
+ 'capture_video': _lib.GP_OPERATION_CAPTURE_VIDEO,
+ 'capture_audio': _lib.GP_OPERATION_CAPTURE_AUDIO,
+@@ -65,7 +65,7 @@ CAM_OPS = IntEnum(b'CameraOperations', {
+ 'trigger_capture': _lib.GP_OPERATION_TRIGGER_CAPTURE})
+
+
+-DIR_OPS = IntEnum(b'DirectoryOperations', {
++DIR_OPS = IntEnum('DirectoryOperations', {
+ 'remove': _lib.GP_FOLDER_OPERATION_REMOVE_DIR,
+ 'create': _lib.GP_FOLDER_OPERATION_MAKE_DIR,
+ 'delete_all': _lib.GP_FOLDER_OPERATION_DELETE_ALL,
+--
+2.11.0
+
diff -Nru gphoto2-cffi-0.3~a1/debian/patches/series gphoto2-cffi-0.3~a1/debian/patches/series
--- gphoto2-cffi-0.3~a1/debian/patches/series 2016-04-04 22:24:03.000000000 +0300
+++ gphoto2-cffi-0.3~a1/debian/patches/series 2018-08-27 22:41:25.000000000 +0300
@@ -0,0 +1 @@
+0001-Make-enum-descriptors-strs-not-bytestrings-7.patch
Reply to: