Bug#769737: Broken import path renders python3-parted unusable

2014-11-16 Thread intrigeri
Hi,

Christian Kastner wrote (16 Nov 2014 00:26:58 GMT) :
> This has already been fixed upstream. The attached debdiff includes this fix.

Thanks!

I've uploaded a package based on your patch (slightly improved DEP-3
headers and debian/changelog) to DELAYED/5.

pyparted maintainers: please find, attached, the git format-patch
output (on top of current Vcs-Git master branch) of the changes that
are part of this NMU.

Cheers!

>From 33dc5073f3d5c3a3bd543c9d6030381b76b9f3c2 Mon Sep 17 00:00:00 2001
From: intrigeri 
Date: Sun, 16 Nov 2014 09:57:54 +
Subject: [PATCH 1/2] Fix-localeC-imports.patch: new patch, cherry-picked from
 upstream (Closes: #769737).

---
 debian/patches/Fix-localeC-imports.patch | 61 
 debian/patches/series|  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 debian/patches/Fix-localeC-imports.patch

diff --git a/debian/patches/Fix-localeC-imports.patch b/debian/patches/Fix-localeC-imports.patch
new file mode 100644
index 000..3127ded
--- /dev/null
+++ b/debian/patches/Fix-localeC-imports.patch
@@ -0,0 +1,61 @@
+From ed960211d0a23db67fbec4e134365e5ff331fd7d Mon Sep 17 00:00:00 2001
+From: David Cantrell 
+Date: Wed, 22 Oct 2014 09:52:55 -0400
+Origin: https://github.com/dcantrell/pyparted/commit/ed960211d0a23db67fbec4e134365e5ff331fd7d
+Last-Update: 2014-11-16
+Bug-Debian: https://bugs.debian.org/769737
+Subject: [PATCH] Fix localeC imports in a handful of src/parted/*.py files.
+
+Need to use 'from parted.decorators import localeC'
+
+Also fix one instance of 'from parted.cachedlist import CachedList' in
+disk.py
+
+
+---
+ src/parted/device.py | 2 +-
+ src/parted/disk.py   | 4 ++--
+ src/parted/filesystem.py | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: pyparted-3.10.0/src/parted/device.py
+===
+--- pyparted-3.10.0.orig/src/parted/device.py
 pyparted-3.10.0/src/parted/device.py
+@@ -28,7 +28,7 @@ import warnings
+ import parted
+ import _ped
+ 
+-from decorators import localeC
++from parted.decorators import localeC
+ 
+ class Device(object):
+ """Device()
+Index: pyparted-3.10.0/src/parted/disk.py
+===
+--- pyparted-3.10.0.orig/src/parted/disk.py
 pyparted-3.10.0/src/parted/disk.py
+@@ -25,8 +25,8 @@
+ import _ped
+ import parted
+ 
+-from cachedlist import CachedList
+-from decorators import localeC
++from parted.cachedlist import CachedList
++from parted.decorators import localeC
+ 
+ class Disk(object):
+ """Disk()
+Index: pyparted-3.10.0/src/parted/filesystem.py
+===
+--- pyparted-3.10.0.orig/src/parted/filesystem.py
 pyparted-3.10.0/src/parted/filesystem.py
+@@ -25,7 +25,7 @@
+ import _ped
+ import parted
+ 
+-from decorators import localeC
++from parted.decorators import localeC
+ 
+ # XXX: add docstrings!
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 74ae2f7..12f33b9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 no-last-flag-check.patch
+Fix-localeC-imports.patch
-- 
2.1.3

>From e08874c4ceb9a731f4b48599c5c67ab6baf25a4b Mon Sep 17 00:00:00 2001
From: intrigeri 
Date: Sun, 16 Nov 2014 09:58:19 +
Subject: [PATCH 2/2] pyparted (3.10.0-1.1)

---
 debian/changelog | 9 +
 1 file changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3d3cf6d..2c71e68 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+pyparted (3.10.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport patch Fix-localeC-imports.patch from upstream which fixes an
+ImportError that rendered the python3-parted package unusable.
+Thanks to Christian Kastner  for the patch (Closes: #769737).
+
+ -- intrigeri   Sun, 16 Nov 2014 10:57:22 +0100
+
 pyparted (3.10.0-1) unstable; urgency=medium
 
   * New upstream release.
-- 
2.1.3



Bug#769737: Broken import path renders python3-parted unusable

2014-11-15 Thread Christian Kastner
Package: python3-parted
Version: 3.10.0-1
Severity: grave
Tags: patch

With Python 3, pyparted cannot be imported:

$ sudo aptitude install python-parted python3-parted
$ python -c 'import parted'
$ python3 -c 'import parted'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/parted/__init__.py", line 55, in 
from parted.device import Device
  File "/usr/lib/python3/dist-packages/parted/device.py", line 31, in 
from decorators import localeC
ImportError: No module named 'decorators'

This has already been fixed upstream. The attached debdiff includes this fix.

Regards,
Christian

diff -Nru pyparted-3.10.0/debian/changelog pyparted-3.10.0/debian/changelog
--- pyparted-3.10.0/debian/changelog2014-09-30 20:10:56.0 +0200
+++ pyparted-3.10.0/debian/changelog2014-11-16 01:49:48.0 +0100
@@ -1,3 +1,11 @@
+pyparted (3.10.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport patch Fix-localeC-imports.patch from upstream which fixes an
+ImportError that rendered the python3-parted package unusable.
+
+ -- Christian Kastner   Sun, 16 Nov 2014 00:59:49 +0100
+
 pyparted (3.10.0-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru pyparted-3.10.0/debian/patches/Fix-localeC-imports.patch 
pyparted-3.10.0/debian/patches/Fix-localeC-imports.patch
--- pyparted-3.10.0/debian/patches/Fix-localeC-imports.patch1970-01-01 
01:00:00.0 +0100
+++ pyparted-3.10.0/debian/patches/Fix-localeC-imports.patch2014-11-16 
00:56:30.0 +0100
@@ -0,0 +1,60 @@
+From ed960211d0a23db67fbec4e134365e5ff331fd7d Mon Sep 17 00:00:00 2001
+From: David Cantrell 
+Date: Wed, 22 Oct 2014 09:52:55 -0400
+Subject: [PATCH] Fix localeC imports in a handful of src/parted/*.py files.
+
+Need to use 'from parted.decorators import localeC'
+
+Also fix one instance of 'from parted.cachedlist import CachedList' in
+disk.py
+
+Origin: 
https://github.com/dcantrell/pyparted/commit/ed960211d0a23db67fbec4e134365e5ff331fd7d
+Last-Update: 2014-11-16
+
+---
+ src/parted/device.py | 2 +-
+ src/parted/disk.py   | 4 ++--
+ src/parted/filesystem.py | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: pyparted-3.10.0/src/parted/device.py
+===
+--- pyparted-3.10.0.orig/src/parted/device.py
 pyparted-3.10.0/src/parted/device.py
+@@ -28,7 +28,7 @@ import warnings
+ import parted
+ import _ped
+ 
+-from decorators import localeC
++from parted.decorators import localeC
+ 
+ class Device(object):
+ """Device()
+Index: pyparted-3.10.0/src/parted/disk.py
+===
+--- pyparted-3.10.0.orig/src/parted/disk.py
 pyparted-3.10.0/src/parted/disk.py
+@@ -25,8 +25,8 @@
+ import _ped
+ import parted
+ 
+-from cachedlist import CachedList
+-from decorators import localeC
++from parted.cachedlist import CachedList
++from parted.decorators import localeC
+ 
+ class Disk(object):
+ """Disk()
+Index: pyparted-3.10.0/src/parted/filesystem.py
+===
+--- pyparted-3.10.0.orig/src/parted/filesystem.py
 pyparted-3.10.0/src/parted/filesystem.py
+@@ -25,7 +25,7 @@
+ import _ped
+ import parted
+ 
+-from decorators import localeC
++from parted.decorators import localeC
+ 
+ # XXX: add docstrings!
+ 
diff -Nru pyparted-3.10.0/debian/patches/series 
pyparted-3.10.0/debian/patches/series
--- pyparted-3.10.0/debian/patches/series   2014-09-30 20:10:56.0 
+0200
+++ pyparted-3.10.0/debian/patches/series   2014-11-16 00:55:19.0 
+0100
@@ -1 +1,2 @@
 no-last-flag-check.patch
+Fix-localeC-imports.patch


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org