* Removed embedded copy of six using a patch from Chuck Short. Thanks to
James Page for letting me know.
This commit is contained in:
parent
ed49cbbb70
commit
04962e9001
|
@ -1,3 +1,10 @@
|
|||
python-retrying (1.2.3-2) unstable; urgency=medium
|
||||
|
||||
* Removed embedded copy of six using a patch from Chuck Short. Thanks to
|
||||
James Page for letting me know.
|
||||
|
||||
-- Thomas Goirand <zigo@debian.org> Tue, 30 Sep 2014 14:00:40 +0000
|
||||
|
||||
python-retrying (1.2.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
|
|
@ -11,6 +11,7 @@ Build-Depends: debhelper (>= 9),
|
|||
python-setuptools,
|
||||
python3-all,
|
||||
python3-setuptools
|
||||
Build-Depends-Indep: python-six, python3-six
|
||||
Standards-Version: 3.9.5
|
||||
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-retrying.git
|
||||
Vcs-Git: git://anonscm.debian.org/openstack/python-retrying.git
|
||||
|
@ -19,7 +20,7 @@ Homepage: https://github.com/rholder/retrying
|
|||
Package: python-retrying
|
||||
Architecture: all
|
||||
Pre-Depends: dpkg (>= 1.15.6~)
|
||||
Depends: ${misc:Depends}, ${python:Depends}
|
||||
Depends: python-six, ${misc:Depends}, ${python:Depends}
|
||||
Description: simplifies the task of adding retry behavior - Python 2.x
|
||||
Retrying is an Apache 2.0 licensed general-purpose retrying library, written
|
||||
in Python, to simplify the task of adding retry behavior to just about
|
||||
|
@ -37,7 +38,7 @@ Description: simplifies the task of adding retry behavior - Python 2.x
|
|||
Package: python3-retrying
|
||||
Architecture: all
|
||||
Pre-Depends: dpkg (>= 1.15.6~)
|
||||
Depends: ${misc:Depends}, ${python3:Depends}
|
||||
Depends: python3-six, ${misc:Depends}, ${python3:Depends}
|
||||
Description: simplifies the task of adding retry behavior - Python 3.x
|
||||
Retrying is an Apache 2.0 licensed general-purpose retrying library, written
|
||||
in Python, to simplify the task of adding retry behavior to just about
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
six.patch
|
|
@ -0,0 +1,51 @@
|
|||
Description: Remove six copying and use six directly.
|
||||
Author: Chuck Short <zulcss@ubuntu.com>
|
||||
Forwarded: Not yet
|
||||
Last-Update: 2014-09-30
|
||||
|
||||
Index: python-retrying/retrying.py
|
||||
===================================================================
|
||||
--- python-retrying.orig/retrying.py
|
||||
+++ python-retrying/retrying.py
|
||||
@@ -40,31 +40,7 @@ import sys
|
||||
import time
|
||||
import traceback
|
||||
|
||||
-# Python 3 compatibility hacks, pilfered from https://pypi.python.org/pypi/six/1.6.1
|
||||
-PY3 = sys.version_info[0] == 3
|
||||
-if PY3:
|
||||
- def reraise(tp, value, tb=None):
|
||||
- if value.__traceback__ is not tb:
|
||||
- raise value.with_traceback(tb)
|
||||
- raise value
|
||||
-
|
||||
-else:
|
||||
- def exec_(_code_, _globs_=None, _locs_=None):
|
||||
- """Execute code in a namespace."""
|
||||
- if _globs_ is None:
|
||||
- frame = sys._getframe(1)
|
||||
- _globs_ = frame.f_globals
|
||||
- if _locs_ is None:
|
||||
- _locs_ = frame.f_locals
|
||||
- del frame
|
||||
- elif _locs_ is None:
|
||||
- _locs_ = _globs_
|
||||
- exec("""exec _code_ in _globs_, _locs_""")
|
||||
-
|
||||
-
|
||||
- exec_("""def reraise(tp, value, tb=None):
|
||||
- raise tp, value, tb
|
||||
-""")
|
||||
+import six
|
||||
|
||||
# sys.maxint / 2, since Python 3.2 doesn't have a sys.maxint...
|
||||
MAX_WAIT = 1073741823
|
||||
@@ -282,7 +258,7 @@ class Attempt(object):
|
||||
if wrap_exception:
|
||||
raise RetryError(self)
|
||||
else:
|
||||
- reraise(self.value[0], self.value[1], self.value[2])
|
||||
+ six.reraise(self.value[0], self.value[1], self.value[2])
|
||||
else:
|
||||
return self.value
|
||||
|
Loading…
Reference in New Issue