Hello community, here is the log from the commit of package python-ldap for openSUSE:Factory checked in at 2015-10-25 14:18:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ldap (Old) and /work/SRC/openSUSE:Factory/.python-ldap.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ldap" Changes: -------- --- /work/SRC/openSUSE:Factory/python-ldap/python-ldap.changes 2015-09-27 08:39:53.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-ldap.new/python-ldap.changes 2015-10-25 14:18:18.000000000 +0100 @@ -1,0 +2,5 @@ +Sat Oct 24 16:33:35 UTC 2015 - mich...@stroeder.com + +- Update to upstream release 2.4.22 + +------------------------------------------------------------------- Old: ---- python-ldap-2.4.21.tar.gz New: ---- python-ldap-2.4.22.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ldap.spec ++++++ --- /var/tmp/diff_new_pack.TfEplL/_old 2015-10-25 14:18:18.000000000 +0100 +++ /var/tmp/diff_new_pack.TfEplL/_new 2015-10-25 14:18:18.000000000 +0100 @@ -17,7 +17,7 @@ Name: python-ldap -Version: 2.4.21 +Version: 2.4.22 Release: 0 Summary: Python LDAP interface License: Python-2.0 ++++++ python-ldap-2.4.21.tar.gz -> python-ldap-2.4.22.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/CHANGES new/python-ldap-2.4.22/CHANGES --- old/python-ldap-2.4.21/CHANGES 2015-09-25 18:21:56.000000000 +0200 +++ new/python-ldap-2.4.22/CHANGES 2015-10-24 17:57:13.000000000 +0200 @@ -1,4 +1,25 @@ ---------------------------------------------------------------- +Released 2.4.22 2015-10-25 + +Changes since 2.4.21: + +Lib/ +* LDIFParser now also accepts value-spec without a space + after the colon. +* Added key-word argument authz_id to LDAPObject methods + sasl_non_interactive_bind_s(), sasl_external_bind_s() and + sasl_gssapi_bind_s() +* Hmmpf! Added missing self to LDAPObject.fileno(). +* ReconnectLDAPObject.sasl_bind_s() now correctly uses + generic wrapper arguments *args,**kwargs +* LDIFParser.parse_change_records() now correctly calls + LDIFParser.handle_change_modify() +* Corrected ldap.controls.pwdpolicy.__all__ + +Doc/ +* Started missing docs for sub-module ldap.sasl. + +---------------------------------------------------------------- Released 2.4.21 2015-09-25 Changes since 2.4.20: @@ -1195,4 +1216,4 @@ ---------------------------------------------------------------- Released 1.10alpha3 2000-09-19 -$Id: CHANGES,v 1.356 2015/09/25 16:21:47 stroeder Exp $ +$Id: CHANGES,v 1.363 2015/10/24 15:55:07 stroeder Exp $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Demo/pyasn1/noopsearch.py new/python-ldap-2.4.22/Demo/pyasn1/noopsearch.py --- old/python-ldap-2.4.21/Demo/pyasn1/noopsearch.py 2013-07-05 18:57:25.000000000 +0200 +++ new/python-ldap-2.4.22/Demo/pyasn1/noopsearch.py 2015-10-24 18:25:47.000000000 +0200 @@ -14,8 +14,6 @@ from ldap.controls.openldap import SearchNoOpControl -LDAPLimitErrors = (ldap.TIMEOUT,ldap.TIMELIMIT_EXCEEDED,ldap.SIZELIMIT_EXCEEDED,ldap.ADMINLIMIT_EXCEEDED) - SEARCH_TIMEOUT=30.0 try: @@ -56,7 +54,11 @@ serverctrls=[SearchNoOpControl(criticality=True)], ) _,_,_,search_response_ctrls = ldap_conn.result3(msg_id,all=1,timeout=SEARCH_TIMEOUT) -except LDAPLimitErrors,e: +except ( + ldap.TIMEOUT, + ldap.TIMELIMIT_EXCEEDED, + ldap.SIZELIMIT_EXCEEDED, + ldap.ADMINLIMIT_EXCEEDED),e: ldap_conn.abandon(msg_id) sys.exit(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/dsml.py new/python-ldap-2.4.22/Lib/dsml.py --- old/python-ldap-2.4.21/Lib/dsml.py 2015-09-25 18:19:42.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/dsml.py 2015-10-24 17:57:14.000000000 +0200 @@ -4,13 +4,13 @@ See http://www.python-ldap.org/ for details. -$Id: dsml.py,v 1.38 2015/08/08 13:36:30 stroeder Exp $ +$Id: dsml.py,v 1.39 2015/09/30 17:15:53 stroeder Exp $ Python compability note: Tested with Python 2.0+. """ -__version__ = '2.4.21' +__version__ = '2.4.22' import string,base64 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldap/__init__.py new/python-ldap-2.4.22/Lib/ldap/__init__.py --- old/python-ldap-2.4.21/Lib/ldap/__init__.py 2015-09-25 18:19:42.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/ldap/__init__.py 2015-10-24 17:57:14.000000000 +0200 @@ -3,12 +3,12 @@ See http://www.python-ldap.org/ for details. -$Id: __init__.py,v 1.98 2015/08/08 13:36:30 stroeder Exp $ +$Id: __init__.py,v 1.99 2015/09/30 17:15:53 stroeder Exp $ """ # This is also the overall release version number -__version__ = '2.4.21' +__version__ = '2.4.22' import sys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldap/controls/openldap.py new/python-ldap-2.4.22/Lib/ldap/controls/openldap.py --- old/python-ldap-2.4.21/Lib/ldap/controls/openldap.py 2015-09-25 18:19:42.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/ldap/controls/openldap.py 2015-10-24 18:25:47.000000000 +0200 @@ -4,7 +4,7 @@ See http://www.python-ldap.org/ for project details. -$Id: openldap.py,v 1.4 2015/09/18 17:24:39 stroeder Exp $ +$Id: openldap.py,v 1.6 2015/10/24 16:21:56 stroeder Exp $ """ import ldap.controls @@ -15,7 +15,8 @@ __all__ = [ - 'SearchNoOpControl' + 'SearchNoOpControl', + 'SearchNoOpMixIn', ] @@ -63,7 +64,12 @@ serverctrls=[SearchNoOpControl(criticality=True)], ) _,_,_,search_response_ctrls = self.result3(msg_id,all=1,timeout=timeout) - except LDAPLimitErrors,e: + except ( + ldap.TIMEOUT, + ldap.TIMELIMIT_EXCEEDED, + ldap.SIZELIMIT_EXCEEDED, + ldap.ADMINLIMIT_EXCEEDED + ),e: self.abandon(msg_id) raise e else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldap/controls/pwdpolicy.py new/python-ldap-2.4.22/Lib/ldap/controls/pwdpolicy.py --- old/python-ldap-2.4.21/Lib/ldap/controls/pwdpolicy.py 2014-03-24 11:20:16.000000000 +0100 +++ new/python-ldap-2.4.22/Lib/ldap/controls/pwdpolicy.py 2015-10-24 17:57:14.000000000 +0200 @@ -5,11 +5,12 @@ See http://www.python-ldap.org/ for project details. -$Id: pwdpolicy.py,v 1.4 2014/03/12 21:34:07 stroeder Exp $ +$Id: pwdpolicy.py,v 1.5 2015/10/24 15:55:07 stroeder Exp $ """ __all__ = [ - 'ExpirationWarningControl' + 'PasswordExpiringControl', + 'PasswordExpiredControl', ] # Imports from python-ldap 2.4+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldap/controls/sss.py new/python-ldap-2.4.22/Lib/ldap/controls/sss.py --- old/python-ldap-2.4.21/Lib/ldap/controls/sss.py 2015-06-22 18:47:08.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/ldap/controls/sss.py 2015-10-24 17:57:14.000000000 +0200 @@ -5,13 +5,12 @@ See http://www.python-ldap.org/ for project details. -$Id: sss.py,v 1.1 2015/06/22 16:47:08 stroeder Exp $ +$Id: sss.py,v 1.2 2015/10/24 15:52:23 stroeder Exp $ """ __all__ = [ 'SSSRequestControl', 'SSSResponseControl', - 'SSSVLVPagedLDAPObject' ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldap/ldapobject.py new/python-ldap-2.4.22/Lib/ldap/ldapobject.py --- old/python-ldap-2.4.21/Lib/ldap/ldapobject.py 2015-09-25 18:19:42.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/ldap/ldapobject.py 2015-10-24 17:57:14.000000000 +0200 @@ -3,7 +3,7 @@ See http://www.python-ldap.org/ for details. -\$Id: ldapobject.py,v 1.147 2015/08/08 13:37:41 stroeder Exp $ +\$Id: ldapobject.py,v 1.149 2015/10/24 15:46:12 stroeder Exp $ Compability: - Tested with Python 2.0+ but should work with Python 1.5.x @@ -136,7 +136,7 @@ self.__class__.__name__,repr(name) ) - def fileno(): + def fileno(self): """ Returns file description of LDAP connection. @@ -243,23 +243,29 @@ """ return self._ldap_call(self._l.sasl_interactive_bind_s,who,auth,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls),sasl_flags) - def sasl_non_interactive_bind_s(self,sasl_mech,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET): + def sasl_non_interactive_bind_s(self,sasl_mech,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET,authz_id=''): """ Send a SASL bind request using a non-interactive SASL method (e.g. GSSAPI, EXTERNAL) """ - self.sasl_interactive_bind_s('',ldap.sasl.sasl({},sasl_mech)) + self.sasl_interactive_bind_s( + '', + ldap.sasl.sasl( + {ldap.sasl.CB_USER:authz_id}, + sasl_mech + ) + ) - def sasl_external_bind_s(self,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET): + def sasl_external_bind_s(self,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET,authz_id=''): """ Send SASL bind request using SASL mech EXTERNAL """ - self.sasl_non_interactive_bind_s('EXTERNAL',serverctrls,clientctrls,sasl_flags) + self.sasl_non_interactive_bind_s('EXTERNAL',serverctrls,clientctrls,sasl_flags,authz_id) - def sasl_gssapi_bind_s(self,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET): + def sasl_gssapi_bind_s(self,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET,authz_id=''): """ Send SASL bind request using SASL mech GSSAPI """ - self.sasl_non_interactive_bind_s('GSSAPI',serverctrls,clientctrls,sasl_flags) + self.sasl_non_interactive_bind_s('GSSAPI',serverctrls,clientctrls,sasl_flags,authz_id) def sasl_bind_s(self,dn,mechanism,cred,serverctrls=None,clientctrls=None): """ @@ -927,7 +933,7 @@ self._store_last_bind(SimpleLDAPObject.sasl_interactive_bind_s,*args,**kwargs) return res - def sasl_bind_s(self,dn,mechanism,cred,serverctrls=None,clientctrls=None): + def sasl_bind_s(self,*args,**kwargs): res = self._apply_method_s(SimpleLDAPObject.sasl_bind_s,*args,**kwargs) self._store_last_bind(SimpleLDAPObject.sasl_bind_s,*args,**kwargs) return res diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldapurl.py new/python-ldap-2.4.22/Lib/ldapurl.py --- old/python-ldap-2.4.21/Lib/ldapurl.py 2015-09-25 18:19:42.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/ldapurl.py 2015-10-24 17:57:14.000000000 +0200 @@ -3,7 +3,7 @@ See http://www.python-ldap.org/ for details. -\$Id: ldapurl.py,v 1.73 2015/08/08 13:36:30 stroeder Exp $ +\$Id: ldapurl.py,v 1.74 2015/09/30 17:15:53 stroeder Exp $ Python compability note: This module only works with Python 2.0+ since @@ -11,7 +11,7 @@ 2. list comprehensions are used. """ -__version__ = '2.4.21' +__version__ = '2.4.22' __all__ = [ # constants diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/ldif.py new/python-ldap-2.4.22/Lib/ldif.py --- old/python-ldap-2.4.21/Lib/ldif.py 2015-09-25 18:19:42.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/ldif.py 2015-10-24 18:12:31.000000000 +0200 @@ -3,13 +3,13 @@ See http://www.python-ldap.org/ for details. -$Id: ldif.py,v 1.83 2015/08/08 13:36:30 stroeder Exp $ +$Id: ldif.py,v 1.87 2015/10/24 16:12:31 stroeder Exp $ Python compability note: Tested with Python 2.0+, but should work with Python 1.5.2+. """ -__version__ = '2.4.21' +__version__ = '2.4.22' __all__ = [ # constants @@ -324,7 +324,7 @@ # if needed attribute value is BASE64 decoded value_spec = unfolded_line[colon_pos:colon_pos+2] if value_spec==': ': - attr_value = unfolded_line[colon_pos+2:] + attr_value = unfolded_line[colon_pos+2:].lstrip() elif value_spec=='::': # attribute value needs base64-decoding attr_value = base64.decodestring(unfolded_line[colon_pos+2:]) @@ -336,8 +336,8 @@ u = urlparse.urlparse(url) if self._process_url_schemes.has_key(u[0]): attr_value = urllib.urlopen(url).read() - elif value_spec==':\r\n' or value_spec=='\n': - attr_value = '' + else: + attr_value = unfolded_line[colon_pos+1:] return attr_type,attr_value def parse_entry_records(self): @@ -391,7 +391,7 @@ """ return self.parse_entry_records() # parse() - def handle_change_modify(self,dn,modops,controls=None): + def handle_modify(self,dn,modops,controls=None): """ Process a single LDIF record representing a single modify operation. This method should be implemented by applications using LDIFParser. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Lib/python_ldap.egg-info/PKG-INFO new/python-ldap-2.4.22/Lib/python_ldap.egg-info/PKG-INFO --- old/python-ldap-2.4.21/Lib/python_ldap.egg-info/PKG-INFO 2015-09-25 18:23:51.000000000 +0200 +++ new/python-ldap-2.4.22/Lib/python_ldap.egg-info/PKG-INFO 2015-10-24 18:26:45.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-ldap -Version: 2.4.21 +Version: 2.4.22 Summary: Python modules for implementing LDAP clients Home-page: http://www.python-ldap.org/ Author: python-ldap project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/PKG-INFO new/python-ldap-2.4.22/PKG-INFO --- old/python-ldap-2.4.21/PKG-INFO 2015-09-25 18:23:51.000000000 +0200 +++ new/python-ldap-2.4.22/PKG-INFO 2015-10-24 18:26:45.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-ldap -Version: 2.4.21 +Version: 2.4.22 Summary: Python modules for implementing LDAP clients Home-page: http://www.python-ldap.org/ Author: python-ldap project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-ldap-2.4.21/Tests/t_ldif.py new/python-ldap-2.4.22/Tests/t_ldif.py --- old/python-ldap-2.4.21/Tests/t_ldif.py 2015-09-18 16:51:44.000000000 +0200 +++ new/python-ldap-2.4.22/Tests/t_ldif.py 2015-10-24 17:57:14.000000000 +0200 @@ -15,29 +15,24 @@ class TestParse(unittest.TestCase): maxDiff = None - def check_ldif_to_records(self, ldif_string, expected): - #import pdb; pdb.set_trace() - got = ldif.ParseLDIF(StringIO(ldif_string)) - self.assertEqual(got, expected) + def _parse_entry_records(self, ldif_string): + return ldif.ParseLDIF(StringIO(ldif_string)) - def check_records_to_ldif(self, records, expected): + def _unparse_entry_records(self, records): f = StringIO() ldif_writer = ldif.LDIFWriter(f) for dn, attrs in records: ldif_writer.unparse(dn, attrs) - got = f.getvalue() - self.assertEqual(got, expected) + return f.getvalue() - def check_roundtrip(self, ldif_source, records, ldif_expected=None): + def check_roundtrip(self, ldif_source, entry_records): ldif_source = textwrap.dedent(ldif_source).lstrip() + '\n' - if ldif_expected is None: - ldif_expected = ldif_source - else: - ldif_expected = textwrap.dedent(ldif_expected).lstrip() + '\n' - - self.check_ldif_to_records(ldif_source, records) - self.check_records_to_ldif(records, ldif_expected) - self.check_ldif_to_records(ldif_expected, records) + parsed_entry_records = self._parse_entry_records(ldif_source) + parsed_entry_records2 = self._parse_entry_records( + self._unparse_entry_records(entry_records) + ) + self.assertEqual(parsed_entry_records, entry_records) + self.assertEqual(parsed_entry_records2, entry_records) def test_simple(self): self.check_roundtrip(""" @@ -48,6 +43,15 @@ ('cn=x,cn=y,cn=z', {'attrib': [b'value', b'value2']}), ]) + def test_simple2(self): + self.check_roundtrip(""" + dn:cn=x,cn=y,cn=z + attrib:value + attrib:value2 + """, [ + ('cn=x,cn=y,cn=z', {'attrib': [b'value', b'value2']}), + ]) + def test_multiple(self): self.check_roundtrip(""" dn: cn=x,cn=y,cn=z @@ -74,12 +78,7 @@ """ % ('asdf.' * 20), [ ('cn=x,cn=y,cn=z', {'attrib': [b'verylong value'], 'attrib2': [b'asdf.' * 20]}), - ], """ - dn: cn=x,cn=y,cn=z - attrib: verylong value - attrib2: asdf.asdf.asdf.asdf.asdf.asdf.asdf.asdf.asdf.asdf.asdf.asdf.asdf.as - df.asdf.asdf.asdf.asdf.asdf.asdf. - """) + ]) def test_empty(self): self.check_roundtrip(""" @@ -98,6 +97,14 @@ ('cn=x,cn=y,cn=z', {'attrib': [b'\t\0\n:%@']}), ]) + def test_binary2(self): + self.check_roundtrip(""" + dn: cn=x,cn=y,cn=z + attrib::CQAKOiVA + """, [ + ('cn=x,cn=y,cn=z', {'attrib': [b'\t\0\n:%@']}), + ]) + def test_unicode(self): self.check_roundtrip(""" dn: cn=Michael Stroeder,dc=stroeder,dc=com @@ -105,10 +112,7 @@ """, [ ('cn=Michael Stroeder,dc=stroeder,dc=com', {'lastname': [b'Str\303\266der']}), - ], """ - dn: cn=Michael Stroeder,dc=stroeder,dc=com - lastname:: U3Ryw7ZkZXI= - """) + ]) def test_sorted(self): self.check_roundtrip(""" @@ -120,12 +124,7 @@ ('cn=x,cn=y,cn=z', {'a': [b'value_a'], 'b': [b'value_b'], 'c': [b'value_c']}), - ], """ - dn: cn=x,cn=y,cn=z - a: value_a - b: value_b - c: value_c - """) + ]) if __name__ == '__main__':