commit python-pyasn1 for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package python-pyasn1 for openSUSE:Factory checked in at 2012-03-24 20:10:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyasn1 (Old) and /work/SRC/openSUSE:Factory/.python-pyasn1.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-pyasn1", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyasn1/python-pyasn1.changes 2011-12-09 15:25:21.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyasn1.new/python-pyasn1.changes 2012-03-24 20:10:11.000000000 +0100 @@ -1,0 +2,13 @@ +Fri Mar 23 09:59:28 UTC 2012 - michael@stroeder.com + +- updated to upstrean release 0.1.2 + +From upstream CHANGES: +- Fix to __long__() to actually return longs on py2k +- Fix to OctetString.__str__() workings of a non-initialized object. +- Fix to quote initializer of OctetString.__repr__() +- Minor fix towards ObjectIdentifier.prettyIn() reliability +- ObjectIdentifier.__str__() is aliased to prettyPrint() +- Exlicit repr() calls replaced with '%r' + +------------------------------------------------------------------- Old: ---- pyasn1-0.1.1.tar.gz New: ---- pyasn1-0.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyasn1.spec ++++++ --- /var/tmp/diff_new_pack.J2UKfE/_old 2012-03-24 20:10:12.000000000 +0100 +++ /var/tmp/diff_new_pack.J2UKfE/_new 2012-03-24 20:10:12.000000000 +0100 @@ -15,9 +15,11 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: python-pyasn1 -Version: 0.1.1 -Release: 0 +Version: 0.1.2 +Release: 1 Url: http://pyasn1.sf.net/ Summary: ASN.1 types and codecs License: BSD-3-Clause @@ -32,8 +34,8 @@ BuildArch: noarch %endif %endif -Provides: python-asn1 = %{version} -Obsoletes: python-asn1 < %{version} +Provides: python-pyasn1 = %{version} +Obsoletes: python-pyasn1 < %{version} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %description ++++++ pyasn1-0.1.1.tar.gz -> pyasn1-0.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/CHANGES new/pyasn1-0.1.2/CHANGES --- old/pyasn1-0.1.1/CHANGES 2011-10-31 00:15:45.000000000 +0100 +++ new/pyasn1-0.1.2/CHANGES 2011-11-21 11:00:30.000000000 +0100 @@ -1,3 +1,13 @@ +Revision 0.1.2 +-------------- + +- Fix to __long__() to actually return longs on py2k +- Fix to OctetString.__str__() workings of a non-initialized object. +- Fix to quote initializer of OctetString.__repr__() +- Minor fix towards ObjectIdentifier.prettyIn() reliability +- ObjectIdentifier.__str__() is aliased to prettyPrint() +- Exlicit repr() calls replaced with '%r' + Revision 0.1.1 -------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/PKG-INFO new/pyasn1-0.1.2/PKG-INFO --- old/pyasn1-0.1.1/PKG-INFO 2011-11-06 23:30:27.000000000 +0100 +++ new/pyasn1-0.1.2/PKG-INFO 2011-12-07 17:04:52.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pyasn1 -Version: 0.1.1 +Version: 0.1.2 Summary: ASN.1 types and codecs Home-page: http://sourceforge.net/projects/pyasn1/ Author: Ilya Etingof diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/THANKS new/pyasn1-0.1.2/THANKS --- old/pyasn1-0.1.1/THANKS 2010-09-20 22:07:18.000000000 +0200 +++ new/pyasn1-0.1.2/THANKS 2011-11-07 12:38:21.000000000 +0100 @@ -1,3 +1,4 @@ Denis S. Otkidach Gregory Golberg Bud P. Bruegger +Jacek Konieczny diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/pyasn1/codec/ber/decoder.py new/pyasn1-0.1.2/pyasn1/codec/ber/decoder.py --- old/pyasn1-0.1.1/pyasn1/codec/ber/decoder.py 2011-10-27 20:16:01.000000000 +0200 +++ new/pyasn1-0.1.2/pyasn1/codec/ber/decoder.py 2011-11-08 16:15:33.000000000 +0100 @@ -736,7 +736,7 @@ state = stStop if state == stErrorCondition: raise error.PyAsn1Error( - '%s not in asn1Spec: %s' % (tagSet, repr(asn1Spec)) + '%r not in asn1Spec: %r' % (tagSet, asn1Spec) ) return value, substrate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/pyasn1/type/base.py new/pyasn1-0.1.2/pyasn1/type/base.py --- old/pyasn1-0.1.1/pyasn1/type/base.py 2011-11-06 11:55:51.000000000 +0100 +++ new/pyasn1-0.1.2/pyasn1/type/base.py 2011-11-08 16:29:58.000000000 +0100 @@ -46,6 +46,9 @@ class __NoValue: def __getattr__(self, attr): raise error.PyAsn1Error('No value for %s()' % attr) + def __getitem__(self, i): + raise error.PyAsn1Error('No value') + noValue = __NoValue() # Base class for "simple" ASN.1 objects. These are immutable. @@ -68,7 +71,7 @@ if self._value is noValue: return self.__class__.__name__ + '()' else: - return self.__class__.__name__ + '(' + self.prettyOut(self._value) + ')' + return self.__class__.__name__ + '(%s)' % (self.prettyOut(self._value),) def __str__(self): return str(self._value) def __eq__(self, other): return self is other and True or self._value == other @@ -158,8 +161,8 @@ for idx in range(len(self._componentValues)): if self._componentValues[idx] is None: continue - r = r + '.setComponentByPosition(%s, %s)' % ( - idx, repr(self._componentValues[idx]) + r = r + '.setComponentByPosition(%s, %r)' % ( + idx, self._componentValues[idx] ) return r diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/pyasn1/type/namedtype.py new/pyasn1-0.1.2/pyasn1/type/namedtype.py --- old/pyasn1-0.1.1/pyasn1/type/namedtype.py 2011-10-02 15:05:23.000000000 +0200 +++ new/pyasn1-0.1.2/pyasn1/type/namedtype.py 2011-11-08 16:15:18.000000000 +0100 @@ -9,7 +9,7 @@ def __init__(self, name, t): self.__name = name; self.__type = t def __repr__(self): return '%s(%s, %s)' % ( - self.__class__.__name__, repr(self.__name), repr(self.__type) + self.__class__.__name__, self.__name, self.__type ) def getType(self): return self.__type def getName(self): return self.__name @@ -35,7 +35,7 @@ def __repr__(self): r = '%s(' % self.__class__.__name__ for n in self.__namedTypes: - r = r + '%s, ' % repr(n) + r = r + '%r, ' % (n,) return r + ')' def __getitem__(self, idx): return self.__namedTypes[idx] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/pyasn1/type/tagmap.py new/pyasn1-0.1.2/pyasn1/type/tagmap.py --- old/pyasn1-0.1.1/pyasn1/type/tagmap.py 2011-10-02 13:51:48.000000000 +0200 +++ new/pyasn1-0.1.2/pyasn1/type/tagmap.py 2011-11-08 16:10:34.000000000 +0100 @@ -21,9 +21,9 @@ raise KeyError() def __repr__(self): - s = repr(self.__posMap) + '/' + repr(self.__negMap) + s = '%r/%r' % (self.__posMap, self.__negMap) if self.__defType is not None: - s = s + '/' + repr(self.__defType) + s = s + '/%r' % (self.__defType,) return s def clone(self, parentType, tagMap, uniq=False): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/pyasn1/type/univ.py new/pyasn1-0.1.2/pyasn1/type/univ.py --- old/pyasn1-0.1.1/pyasn1/type/univ.py 2011-11-06 11:55:19.000000000 +0100 +++ new/pyasn1-0.1.2/pyasn1/type/univ.py 2011-12-07 15:26:37.000000000 +0100 @@ -54,7 +54,8 @@ __hash__ = base.AbstractSimpleAsn1Item.__hash__ def __int__(self): return int(self._value) - def __long__(self): return int(self._value) + if sys.version_info[0] <= 2: + def __long__(self): return long(self._value) def __float__(self): return float(self._value) def __abs__(self): return abs(self._value) def __index__(self): return int(self._value) @@ -81,10 +82,7 @@ def prettyOut(self, value): r = self.__namedValues.getName(value) - if r is not None: - return '%s(%s)' % (r, value) - else: - return str(value) + return r is None and str(value) or repr(r) def getNamedValues(self): return self.__namedValues @@ -380,10 +378,10 @@ if [ x for x in self.asNumbers() if x < 32 or x > 126 ]: return self.__class__.__name__ + '(hexValue=\'' + ''.join([ '%x' % x for x in self.asNumbers() ])+'\')' else: - return self.__class__.__name__ + '(' + self.prettyOut(self._value) + ')' + return self.__class__.__name__ + '(\'' + self.prettyOut(self._value) + '\')' if sys.version_info[0] <= 2: - def __str__(self): return self._value + def __str__(self): return str(self._value) def __unicode__(self): return self._value.decode(self._encoding, 'ignore') def asOctets(self): return self._value @@ -452,6 +450,8 @@ else: return self._value[i] + def __str__(self): return self.prettyPrint() + def index(self, suboid): return self._value.index(suboid) def isPrefixOf(self, value): @@ -479,10 +479,14 @@ (str(value), self.__class__.__name__, sys.exc_info()[1]) ) value = tuple(r) - - pass else: - value = tuple(value) + try: + value = tuple(value) + except TypeError: + raise error.PyAsn1Error( + 'Malformed Object ID %s at %s: %s' % + (str(value), self.__class__.__name__,sys.exc_info()[1]) + ) for x in value: if not isinstance(x, intTypes) or x < 0: @@ -492,14 +496,8 @@ return value - def prettyOut(self, value): - r = [] - for subOid in value: - r.append(str(subOid)) - if r[-1] and r[-1][-1] == 'L': - r[-1][-1] = r[-1][:-1] - return '.'.join(r) - + def prettyOut(self, value): return '.'.join([ str(x) for x in value ]) + class Real(base.AbstractSimpleAsn1Item): try: _plusInf = float('inf') @@ -590,7 +588,8 @@ def __rdivmod__(self, value): return self.clone(value // float(self)) def __int__(self): return int(float(self)) - def __long__(self): return int(float(self)) + if sys.version_info[0] <= 2: + def __long__(self): return long(float(self)) def __float__(self): if self._value in self._inf: return self._value @@ -744,8 +743,7 @@ ) t = self._componentType[idx].getType() if not t.isSuperTypeOf(value): - raise error.PyAsn1Error('Component type error %s vs %s' % - (repr(t), repr(value))) + raise error.PyAsn1Error('Component type error %r vs %r' % (t, value)) def getComponentByName(self, name): return self.getComponentByPosition( @@ -812,7 +810,7 @@ elif not self._componentType[idx].isOptional: if self.getComponentByPosition(idx) is None: raise error.PyAsn1Error( - 'Uninitialized component #%s at %s' % (idx, repr(self)) + 'Uninitialized component #%s at %r' % (idx, self) ) def prettyPrint(self, scope=0): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/pyasn1.egg-info/PKG-INFO new/pyasn1-0.1.2/pyasn1.egg-info/PKG-INFO --- old/pyasn1-0.1.1/pyasn1.egg-info/PKG-INFO 2011-11-06 23:30:27.000000000 +0100 +++ new/pyasn1-0.1.2/pyasn1.egg-info/PKG-INFO 2011-12-07 17:04:52.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pyasn1 -Version: 0.1.1 +Version: 0.1.2 Summary: ASN.1 types and codecs Home-page: http://sourceforge.net/projects/pyasn1/ Author: Ilya Etingof diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/setup.py new/pyasn1-0.1.2/setup.py --- old/pyasn1-0.1.1/setup.py 2011-11-04 10:52:27.000000000 +0100 +++ new/pyasn1-0.1.2/setup.py 2011-12-07 15:27:05.000000000 +0100 @@ -25,7 +25,7 @@ params.update( { 'name': 'pyasn1', - 'version': '0.1.1', + 'version': '0.1.2', 'description': 'ASN.1 types and codecs', 'author': 'Ilya Etingof', 'author_email': 'ilya@glas.net', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyasn1-0.1.1/test/type/univ.py new/pyasn1-0.1.2/test/type/univ.py --- old/pyasn1-0.1.1/test/type/univ.py 2011-10-25 21:16:36.000000000 +0200 +++ new/pyasn1-0.1.2/test/type/univ.py 2011-11-21 11:00:30.000000000 +0100 @@ -115,7 +115,15 @@ assert univ.OctetString('abcd').asOctets() == str2octs('abcd'), 'testAsOctets() fails' def testAsInts(self): assert univ.OctetString('abcd').asNumbers() == (97, 98, 99, 100), 'testAsNumbers() fails' - + + def testEmpty(self): + try: + str(univ.OctetString()) + except PyAsn1Error: + pass + else: + assert 0, 'empty OctetString() not reported' + def testAdd(self): assert univ.OctetString('') + 'q' == str2octs('q'), '__add__() fails' def testRadd(self): @@ -205,7 +213,7 @@ class ObjectIdentifier(unittest.TestCase): def testStr(self): - assert str(univ.ObjectIdentifier((1,3,6))) == '(1, 3, 6)' + assert str(univ.ObjectIdentifier((1,3,6))) == '1.3.6' def testEq(self): assert univ.ObjectIdentifier((1,3,6)) == (1,3,6), '__cmp__() fails' def testAdd(self): -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de