Hello community,
here is the log from the commit of package python-ldap
checked in at Fri Apr 4 01:44:23 CEST 2008.
--------
--- python-ldap/python-ldap.changes 2007-08-01 18:32:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/python-ldap/python-ldap.changes 2008-04-03 17:58:11.000000000 +0200
@@ -1,0 +2,10 @@
+Thu Apr 3 17:55:47 CEST 2008 - matejcik@suse.cz
+
+- update to 2.3.4
+ * better RFC 4514 compatibility
+ * bugfixes
+- cleaned up spec file
+- removed unnecessary source
+- added %fdupes
+
+-------------------------------------------------------------------
Old:
----
python-ldap-2.3.1.tar.bz2
setup.cfg.suse-linux
New:
----
python-ldap-2.3.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ldap.spec ++++++
--- /var/tmp/diff_new_pack.cL3887/_old 2008-04-04 01:44:02.000000000 +0200
+++ /var/tmp/diff_new_pack.cL3887/_new 2008-04-04 01:44:02.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package python-ldap (Version 2.3.1)
+# spec file for package python-ldap (Version 2.3.4)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -10,18 +10,18 @@
# norootforbuild
+
Name: python-ldap
-BuildRequires: krb5 openldap2-client >= 2.3 openldap2-devel python-devel
+BuildRequires: fdupes krb5-devel openldap2-devel >= 2.3 python-devel
Requires: openldap2-client >= 2.3
-License: Public domain
+License: Public Domain, Freeware
Group: Development/Libraries/Python
-Autoreqprov: on
-Version: 2.3.1
+AutoReqProv: on
+Version: 2.3.4
Release: 1
Summary: Python LDAP interface
-URL: http://python-ldap.sourceforge.net/
+Url: http://python-ldap.sourceforge.net/
Source: python-ldap-%{version}.tar.bz2
-Source1: setup.cfg.suse-linux
Patch0: python-ldap-sasl.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
@@ -41,7 +41,7 @@
%prep
%setup
%patch0
-cp %{S:1} setup.cfg
+cp Build/setup.cfg.suse-linux setup.cfg
%build
export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED"
@@ -50,6 +50,7 @@
%install
rm -rf $RPM_BUILD_ROOT
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
+%fdupes $RPM_BUILD_ROOT/%{_libdir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -59,61 +60,68 @@
%doc README Demo CHANGES TODO LICENCE
%changelog
-* Wed Aug 01 2007 - jmatejek@suse.cz
+* Thu Apr 03 2008 matejcik@suse.cz
+- update to 2.3.4
+ * better RFC 4514 compatibility
+ * bugfixes
+- cleaned up spec file
+- removed unnecessary source
+- added %%fdupes
+* Wed Aug 01 2007 jmatejek@suse.cz
- update to 2.3.1
* openLDAP 2.3+ is now required
* upstream fixed python2.5 problems
* support for Cancel operation
* DN related functions moved to submodule ldap.dn
* numerous bugfixes
-* Mon Jan 22 2007 - jmatejek@suse.cz
+* Mon Jan 22 2007 jmatejek@suse.cz
- removed dependency on openldap, added dependency on openldap-client
-* Thu Nov 16 2006 - jmatejek@suse.cz
+* Thu Nov 16 2006 jmatejek@suse.cz
- fixed a bug that would in some cases lead to invalid free() call
while deallocating the object
-* Mon Oct 23 2006 - jmatejek@suse.cz
+* Mon Oct 23 2006 jmatejek@suse.cz
- update to 2.2.0
- OpenLDAP 2.2+ is now required
- code is cleaned up, many memory leaks fixed
- improved ldap.async - fixed Dict, added IndexedDict
- lots of bugs fixed
- fixed some 64bit problems with PEP353 conversion
-* Tue Feb 28 2006 - jmatejek@suse.cz
+* Tue Feb 28 2006 jmatejek@suse.cz
- updated to reflect python changes due to #149809
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Thu Jan 05 2006 - jmatejek@suse.cz
+* Thu Jan 05 2006 jmatejek@suse.cz
- update to 2.0.11
- using setup.cfg source designed for SuSE (minor adjustments
against Build/setup.cfg.suse-linux
-* Tue Oct 25 2005 - rhafer@suse.de
+* Tue Oct 25 2005 rhafer@suse.de
- added LDAP_DEPRECATED to CFLAGS to build correctly with·
OpenLDAP 2.3
-* Thu Oct 06 2005 - matejcik@suse.cz
+* Thu Oct 06 2005 matejcik@suse.cz
- update to 2.0.10
-* Wed Jun 29 2005 - ltinkl@suse.cz
+* Wed Jun 29 2005 ltinkl@suse.cz
- update to 2.0.8
-* Tue May 10 2005 - mcihar@suse.cz
+* Tue May 10 2005 mcihar@suse.cz
- update to 2.0.7
-* Mon Dec 06 2004 - mcihar@suse.cz
+* Mon Dec 06 2004 mcihar@suse.cz
- update to 2.0.6
-* Tue Nov 23 2004 - mcihar@suse.cz
+* Tue Nov 23 2004 mcihar@suse.cz
- update to 2.0.5
-* Fri Jul 30 2004 - mcihar@suse.cz
+* Fri Jul 30 2004 mcihar@suse.cz
- update to 2.0.2
-* Wed Jun 30 2004 - mcihar@suse.cz
+* Wed Jun 30 2004 mcihar@suse.cz
- update to 2.0.1
-* Wed May 19 2004 - mcihar@suse.cz
+* Wed May 19 2004 mcihar@suse.cz
- update to 2.0.0 final
-* Fri Jan 30 2004 - mcihar@suse.cz
+* Fri Jan 30 2004 mcihar@suse.cz
- include licence
-* Fri Jan 23 2004 - mcihar@suse.cz
+* Fri Jan 23 2004 mcihar@suse.cz
- updated to 2.0.0pre19
-* Tue Dec 16 2003 - mcihar@suse.cz
+* Tue Dec 16 2003 mcihar@suse.cz
- updated to 2.0.0pre18
-* Thu Nov 13 2003 - mcihar@suse.cz
+* Thu Nov 13 2003 mcihar@suse.cz
- updated to 2.0.0pre15
-* Wed Oct 15 2003 - mcihar@suse.cz
+* Wed Oct 15 2003 mcihar@suse.cz
- don't build as root
- updated to 2.0.0pre14:
ldap.ldapobject:
@@ -132,48 +140,48 @@
class attributes
* New method SubSchema.get_inheritedobj() for retrieving a
schema element instance including all inherited class attributes
-* Mon Aug 11 2003 - mcihar@suse.cz
+* Mon Aug 11 2003 mcihar@suse.cz
- updated to 2.0.0pre13
-* Mon Jun 16 2003 - mcihar@suse.cz
+* Mon Jun 16 2003 mcihar@suse.cz
- use record-rpm
-* Tue May 27 2003 - mcihar@suse.cz
+* Tue May 27 2003 mcihar@suse.cz
- updated to 2.0.0pre12
-* Tue May 13 2003 - mcihar@suse.cz
+* Tue May 13 2003 mcihar@suse.cz
- updated to 2.0.0pre11
- use distutils for build
-* Mon May 12 2003 - mcihar@suse.cz
+* Mon May 12 2003 mcihar@suse.cz
- use versioned dependency on python
-* Fri Jan 31 2003 - ro@suse.de
+* Fri Jan 31 2003 ro@suse.de
- use sasl2
-* Fri Jan 10 2003 - mcihar@suse.cz
+* Fri Jan 10 2003 mcihar@suse.cz
- updated to 2.0.0pre06
- build with more features
- add demo into docs
-* Mon Aug 26 2002 - rhafer@suse.de
+* Mon Aug 26 2002 rhafer@suse.de
- LDAP_FILT_MAXSIZ isn't defined in libldap anymore
-* Wed Aug 14 2002 - vinil@suse.cz
+* Wed Aug 14 2002 vinil@suse.cz
- new version: 2.0.0pre05
-* Mon Jun 03 2002 - stepan@suse.de
+* Mon Jun 03 2002 stepan@suse.de
- use %%_lib instead of lib
-* Wed Feb 27 2002 - vinil@suse.cz
+* Wed Feb 27 2002 vinil@suse.cz
- version 2.0.0pre04 to work with openldap2 (bug #13948)
-* Tue Sep 04 2001 - rvasice@suse.cz
+* Tue Sep 04 2001 rvasice@suse.cz
- fix Group tag to Development/Libraries/Python
-* Thu Mar 15 2001 - kukuk@suse.de
+* Thu Mar 15 2001 kukuk@suse.de
- Remove openldap from Requires
-* Thu Mar 15 2001 - ro@suse.de
+* Thu Mar 15 2001 ro@suse.de
- changed for openldap2
-* Thu Mar 15 2001 - ro@suse.de
+* Thu Mar 15 2001 ro@suse.de
- fixed neededforbuild for openldap
-* Wed Nov 22 2000 - mt@suse.de
+* Wed Nov 22 2000 mt@suse.de
- renamed from pyldapm to python-ldap
- updated to python-ldap-1.10alpha3
- adopted spec file for python2.0
-* Mon Nov 06 2000 - ro@suse.de
+* Mon Nov 06 2000 ro@suse.de
- fixed neededforbuild (added ldaplib)
-* Sun Oct 29 2000 - kukuk@suse.de
+* Sun Oct 29 2000 kukuk@suse.de
- fix need for build
-* Mon Sep 13 1999 - bs@suse.de
+* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-* Wed May 26 1999 - mt@suse.de
+* Wed May 26 1999 mt@suse.de
- new version 1.5
++++++ python-ldap-2.3.1.tar.bz2 -> python-ldap-2.3.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/CHANGES new/python-ldap-2.3.4/CHANGES
--- old/python-ldap-2.3.1/CHANGES 2007-07-25 00:46:49.000000000 +0200
+++ new/python-ldap-2.3.4/CHANGES 2008-03-29 13:19:41.000000000 +0100
@@ -1,4 +1,40 @@
----------------------------------------------------------------
+Released 2.3.4 2008-03-29
+
+Changes since 2.3.3:
+
+Modules/
+* Fixed seg fault when calling LDAPObject.get_option()
+ (see SF#1926507, thanks to Matej)
+
+----------------------------------------------------------------
+Released 2.3.3 2008-03-26
+
+Changes since 2.3.2:
+
+Fixed backward-compability when building with OpenLDAP 2.3.x libs.
+
+----------------------------------------------------------------
+Released 2.3.2 2008-03-26
+
+Changes since 2.3.1:
+
+Lib/
+* ldap.dn.escape_dn_chars() now really adheres to
+ RFC 4514 section 2.4 by escaping null characters and a
+ space occurring at the beginning of the string
+* New method ldap.cidict.cidict.__contains__()
+* ldap.dn.explode_dn() and ldap.dn.explode_rdn()
+ have a new optional key-word argument flags which is
+ passed to ldap.dn.str2dn().
+
+Modules/
+* Removed unused OPT_PRIVATE_EXTENSION_BASE from constants.c
+
+Doc/
+* Various additions, updates, polishing (thanks to James).
+
+----------------------------------------------------------------
Released 2.3.1 2007-07-25
Changes since 2.3.0:
@@ -626,4 +662,4 @@
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19
-$Id: CHANGES,v 1.158 2007/07/24 22:46:38 stroeder Exp $
+$Id: CHANGES,v 1.168 2008/03/29 12:19:24 stroeder Exp $
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Demo/matchedvalues.py new/python-ldap-2.3.4/Demo/matchedvalues.py
--- old/python-ldap-2.3.1/Demo/matchedvalues.py 1970-01-01 01:00:00.000000000 +0100
+++ new/python-ldap-2.3.4/Demo/matchedvalues.py 2007-08-06 11:45:59.000000000 +0200
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+#
+# demo for matched values control (RFC 3876)
+#
+# suppose the uid=jsmith LDAP entry has two mail attributes:
+#
+# dn: uid=jsmith,ou=People,dc=example,dc=com
+# (...)
+# mail: jsmith@example.com
+# mail: jsmith@example.org
+#
+# Let's say you want to fetch only the example.org email. Without MV,
+# you would first fetch all mail attributes and then filter them further
+# on the client. With the MV control, the result can be given to the
+# client already filtered.
+#
+# Sample output:
+# $ ./matchedvalues.py
+# LDAP filter used: (&(objectClass=inetOrgPerson)(mail=*@example.org))
+# Requesting 'mail' attribute back
+#
+# No matched values control:
+# dn: uid=jsmith,ou=People,dc=example,dc=com
+# mail: jsmith@example.org
+# mail: john@example.com
+#
+# Matched values control: (mail=*@example.org)
+# dn: uid=jsmith,ou=People,dc=example,dc=com
+# mail: jsmith@example.org
+
+import ldap
+from ldap.controls import MatchedValuesControl
+
+def print_result(search_result):
+ for n in range(len(search_result)):
+ print "dn: %s" % search_result[n][0]
+ for attr in search_result[n][1].keys():
+ for i in range(len(search_result[n][1][attr])):
+ print "%s: %s" % (attr, search_result[n][1][attr][i])
+ print
+
+
+uri = "ldap://ldap.example.com"
+base = "dc=example,dc=com"
+scope = ldap.SCOPE_SUBTREE
+filter = "(&(objectClass=inetOrgPerson)(mail=*@example.org))"
+control_filter = "(mail=*@example.org)"
+
+ld = ldap.initialize(uri)
+
+mv = MatchedValuesControl(criticality=True, controlValue=control_filter)
+
+res = ld.search_ext_s(base, scope, filter, attrlist = ['mail'])
+print "LDAP filter used: %s" % filter
+print "Requesting 'mail' attribute back"
+print
+print "No matched values control:"
+print_result(res)
+
+res = ld.search_ext_s(base, scope, filter, attrlist = ['mail'], serverctrls = [mv])
+print "Matched values control: %s" % control_filter
+print_result(res)
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/dsml.py new/python-ldap-2.3.4/Lib/dsml.py
--- old/python-ldap-2.3.1/Lib/dsml.py 2004-06-17 15:52:07.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/dsml.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,11 +1,10 @@
"""
dsml - generate and parse DSMLv1 data
(see http://www.oasis-open.org/committees/dsml/)
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-$Id: dsml.py,v 1.9 2004/06/17 13:52:07 stroeder Exp $
+$Id: dsml.py,v 1.10 2008/03/10 08:34:29 stroeder Exp $
Python compability note:
Tested with Python 2.0+.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/async.py new/python-ldap-2.3.4/Lib/ldap/async.py
--- old/python-ldap-2.3.1/Lib/ldap/async.py 2006-04-10 07:19:09.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/async.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldap.async - handle async LDAP operations
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: async.py,v 1.25 2006/04/10 05:19:09 stroeder Exp $
+\$Id: async.py,v 1.26 2008/03/10 08:34:29 stroeder Exp $
Python compability note:
Tested on Python 2.0+ but should run on Python 1.5.x.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/cidict.py new/python-ldap-2.3.4/Lib/ldap/cidict.py
--- old/python-ldap-2.3.1/Lib/ldap/cidict.py 2003-08-24 18:28:12.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/cidict.py 2007-12-26 12:49:25.000000000 +0100
@@ -5,10 +5,10 @@
See http://python-ldap.sourceforge.net for details.
-$Id: cidict.py,v 1.10 2003/08/24 16:28:12 stroeder Exp $
+$Id: cidict.py,v 1.11 2007/12/26 11:49:25 stroeder Exp $
"""
-__version__ = """$Revision: 1.10 $"""
+__version__ = """$Revision: 1.11 $"""
from UserDict import UserDict
from string import lower
@@ -43,6 +43,9 @@
def has_key(self,key):
return UserDict.has_key(self,lower(key))
+ def __contains__(self,key):
+ return self.has_key(self,key)
+
def get(self,key,failobj=None):
try:
return self[key]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/dn.py new/python-ldap-2.3.4/Lib/ldap/dn.py
--- old/python-ldap-2.3.1/Lib/ldap/dn.py 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/dn.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,16 +1,15 @@
"""
dn.py - misc stuff for handling distinguished names (see RFC 4514)
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: dn.py,v 1.4 2007/03/22 23:15:30 stroeder Exp $
+\$Id: dn.py,v 1.7 2008/03/10 08:34:29 stroeder Exp $
Compability:
- Tested with Python 2.0+
"""
-__version__ = '0.1.0'
+__version__ = '0.2.0'
import _ldap
@@ -21,7 +20,7 @@
def escape_dn_chars(s):
"""
Escape all DN special characters found in s
- with a back-slash
+ with a back-slash (see RFC 4514, section 2.4)
"""
if s:
s = s.replace('\\','\\\\')
@@ -32,7 +31,8 @@
s = s.replace('>' ,'\\>')
s = s.replace(';' ,'\\;')
s = s.replace('=' ,'\\=')
- if s[0]=='#':
+ s = s.replace('\000' ,'\\\000')
+ if s[0]=='#' or s[0]==' ':
s = ''.join(('\\',s))
if s[-1]==' ':
s = ''.join((s[:-1],'\\ '))
@@ -43,6 +43,10 @@
"""
This function takes a DN as string as parameter and returns
a decomposed DN. It's the inverse to dn2str().
+
+ flags describes the format of the dn
+
+ See also the OpenLDAP man-page ldap_str2dn(3)
"""
if not dn:
return []
@@ -52,7 +56,8 @@
def dn2str(dn):
"""
This function takes a decomposed DN as parameter and returns
- a single string. It's the inverse to str2dn().
+ a single string. It's the inverse to str2dn() but will always
+ return a DN in LDAPv3 format compliant to RFC 4514.
"""
return ','.join([
'+'.join([
@@ -61,7 +66,7 @@
for rdn in dn
])
-def explode_dn(dn,notypes=0):
+def explode_dn(dn,notypes=0,flags=0):
"""
explode_dn(dn [, notypes=0]) -> list
@@ -71,7 +76,7 @@
"""
if not dn:
return []
- dn_decomp = str2dn(dn)
+ dn_decomp = str2dn(dn,flags)
rdn_list = []
for rdn in dn_decomp:
if notypes:
@@ -87,7 +92,7 @@
return rdn_list
-def explode_rdn(rdn,notypes=0):
+def explode_rdn(rdn,notypes=0,flags=0):
"""
explode_rdn(rdn [, notypes=0]) -> list
@@ -98,7 +103,7 @@
"""
if not rdn:
return []
- rdn_decomp = str2dn(rdn)[0]
+ rdn_decomp = str2dn(rdn,flags)[0]
if notypes:
return [avalue or '' for atype,avalue,dummy in rdn_decomp]
else:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/filter.py new/python-ldap-2.3.4/Lib/ldap/filter.py
--- old/python-ldap-2.3.1/Lib/ldap/filter.py 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/filter.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
filters.py - misc stuff for handling LDAP filter strings (see RFC2254)
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: filter.py,v 1.4 2006/11/16 13:49:24 stroeder Exp $
+\$Id: filter.py,v 1.5 2008/03/10 08:34:29 stroeder Exp $
Compability:
- Tested with Python 2.0+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/functions.py new/python-ldap-2.3.4/Lib/ldap/functions.py
--- old/python-ldap-2.3.1/Lib/ldap/functions.py 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/functions.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
functions.py - wraps functions of module _ldap
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: functions.py,v 1.20 2007/03/22 23:12:36 stroeder Exp $
+\$Id: functions.py,v 1.21 2008/03/10 08:34:29 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/__init__.py new/python-ldap-2.3.4/Lib/ldap/__init__.py
--- old/python-ldap-2.3.1/Lib/ldap/__init__.py 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/__init__.py 2008-03-26 17:43:48.000000000 +0100
@@ -1,15 +1,14 @@
"""
ldap - base module
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-$Id: __init__.py,v 1.53 2007/05/23 22:04:15 stroeder Exp $
+$Id: __init__.py,v 1.58 2008/03/26 16:43:13 stroeder Exp $
"""
# This is also the overall release version number
-__version__ = '2.3.1'
+__version__ = '2.3.4'
import sys
@@ -48,3 +47,9 @@
from functions import open,initialize,init,get_option,set_option
from ldap.dn import explode_dn,explode_rdn
+
+# More constants
+
+# For compability of 2.3 and 2.4 OpenLDAP API
+OPT_DIAGNOSTIC_MESSAGE = OPT_ERROR_STRING
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/ldapobject.py new/python-ldap-2.3.4/Lib/ldap/ldapobject.py
--- old/python-ldap-2.3.1/Lib/ldap/ldapobject.py 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/ldapobject.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldapobject.py - wraps class _ldap.LDAPObject
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: ldapobject.py,v 1.98 2007/06/05 09:56:15 stroeder Exp $
+\$Id: ldapobject.py,v 1.100 2008/03/10 08:34:29 stroeder Exp $
Compability:
- Tested with Python 2.0+ but should work with Python 1.5.x
@@ -435,8 +434,12 @@
def result3(self,msgid=_ldap.RES_ANY,all=1,timeout=None):
if timeout is None:
timeout = self.timeout
- rtype, rdata, rmsgid, serverctrls = self._ldap_call(self._l.result3,msgid,all,timeout)
- decoded_serverctrls = DecodeControlTuples(serverctrls)
+ ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
+ if ldap_result is None:
+ rtype, rdata, rmsgid, decoded_serverctrls = (None,None,None,None)
+ else:
+ rtype, rdata, rmsgid, serverctrls = ldap_result
+ decoded_serverctrls = DecodeControlTuples(serverctrls)
return rtype, rdata, rmsgid, decoded_serverctrls
def search_ext(self,base,scope,filterstr='(objectClass=*)',attrlist=None,attrsonly=0,serverctrls=None,clientctrls=None,timeout=-1,sizelimit=0):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/modlist.py new/python-ldap-2.3.4/Lib/ldap/modlist.py
--- old/python-ldap-2.3.1/Lib/ldap/modlist.py 2004-01-22 23:30:59.000000000 +0100
+++ new/python-ldap-2.3.4/Lib/ldap/modlist.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldap.modlist - create add/modify modlist's
-(c) by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-$Id: modlist.py,v 1.14 2004/01/22 22:30:59 stroeder Exp $
+$Id: modlist.py,v 1.15 2008/03/10 08:34:29 stroeder Exp $
Python compability note:
This module is known to work with Python 2.0+ but should work
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/resiter.py new/python-ldap-2.3.4/Lib/ldap/resiter.py
--- old/python-ldap-2.3.1/Lib/ldap/resiter.py 2005-11-07 12:24:25.000000000 +0100
+++ new/python-ldap-2.3.4/Lib/ldap/resiter.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldap.resiter - processing LDAP results with iterators
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: resiter.py,v 1.1 2005/11/07 11:24:25 stroeder Exp $
+\$Id: resiter.py,v 1.2 2008/03/10 08:34:29 stroeder Exp $
Python compability note:
Requires Python 2.3+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/sasl.py new/python-ldap-2.3.4/Lib/ldap/sasl.py
--- old/python-ldap-2.3.1/Lib/ldap/sasl.py 2004-11-09 01:15:55.000000000 +0100
+++ new/python-ldap-2.3.4/Lib/ldap/sasl.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
sasl.py - support for SASL mechanism
-written by Hans Aschauer
See http://python-ldap.sourceforge.net for details.
-\$Id: sasl.py,v 1.12 2004/11/09 00:15:55 stroeder Exp $
+\$Id: sasl.py,v 1.13 2008/03/10 08:34:29 stroeder Exp $
Description:
The ldap.sasl module provides SASL authentication classes.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/schema/__init__.py new/python-ldap-2.3.4/Lib/ldap/schema/__init__.py
--- old/python-ldap-2.3.1/Lib/ldap/schema/__init__.py 2003-04-11 14:51:02.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/schema/__init__.py 2008-03-10 09:34:30.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldap.schema - LDAPv3 schema handling
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: __init__.py,v 1.4 2003/04/11 12:51:02 stroeder Exp $
+\$Id: __init__.py,v 1.5 2008/03/10 08:34:30 stroeder Exp $
"""
__version__ = '0.2.1'
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/schema/models.py new/python-ldap-2.3.4/Lib/ldap/schema/models.py
--- old/python-ldap-2.3.1/Lib/ldap/schema/models.py 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/schema/models.py 2008-03-26 17:42:22.000000000 +0100
@@ -1,10 +1,9 @@
"""
schema.py - support for subSchemaSubEntry information
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: models.py,v 1.31 2007/07/24 15:04:39 stroeder Exp $
+\$Id: models.py,v 1.33 2008/03/26 16:42:22 stroeder Exp $
"""
import UserDict,ldap.cidict
@@ -564,6 +563,9 @@
for key in dict.keys():
self[key] = dict[key]
+ def __contains__(self,key):
+ return self.has_key(self,key)
+
def __getitem__(self,nameoroid):
return self.data[self._at2key(nameoroid)]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/schema/subentry.py new/python-ldap-2.3.4/Lib/ldap/schema/subentry.py
--- old/python-ldap-2.3.1/Lib/ldap/schema/subentry.py 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/schema/subentry.py 2008-03-10 09:34:30.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldap.schema.subentry - subschema subentry handling
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: subentry.py,v 1.22 2006/11/16 13:20:47 stroeder Exp $
+\$Id: subentry.py,v 1.23 2008/03/10 08:34:30 stroeder Exp $
"""
import ldap.cidict,ldap.schema
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldap/schema/tokenizer.py new/python-ldap-2.3.4/Lib/ldap/schema/tokenizer.py
--- old/python-ldap-2.3.1/Lib/ldap/schema/tokenizer.py 2005-09-22 06:26:12.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldap/schema/tokenizer.py 2008-03-10 09:34:30.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldap.schema.tokenizer - Low-level parsing functions for schema element strings
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: tokenizer.py,v 1.10 2005/09/22 04:26:12 stroeder Exp $
+\$Id: tokenizer.py,v 1.11 2008/03/10 08:34:30 stroeder Exp $
"""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldapurl.py new/python-ldap-2.3.4/Lib/ldapurl.py
--- old/python-ldap-2.3.1/Lib/ldapurl.py 2005-06-02 00:11:20.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldapurl.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldapurl - handling of LDAP URLs as described in RFC 2255
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-\$Id: ldapurl.py,v 1.33 2005/06/01 22:11:20 stroeder Exp $
+\$Id: ldapurl.py,v 1.34 2008/03/10 08:34:29 stroeder Exp $
Python compability note:
This module only works with Python 2.0+ since
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Lib/ldif.py new/python-ldap-2.3.4/Lib/ldif.py
--- old/python-ldap-2.3.1/Lib/ldif.py 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Lib/ldif.py 2008-03-10 09:34:29.000000000 +0100
@@ -1,10 +1,9 @@
"""
ldif - generate and parse LDIF data (see RFC 2849)
-written by Michael Stroeder
See http://python-ldap.sourceforge.net for details.
-$Id: ldif.py,v 1.46 2007/05/23 22:04:15 stroeder Exp $
+$Id: ldif.py,v 1.47 2008/03/10 08:34:29 stroeder Exp $
Python compability note:
Tested with Python 2.0+, but should work with Python 1.5.2+.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/common.c new/python-ldap-2.3.4/Modules/common.c
--- old/python-ldap-2.3.1/Modules/common.c 2000-07-27 18:08:58.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/common.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,6 @@
-/* David Leonard , 1999. Public domain. */
-
-/*
- * Miscellaneous common routines
- * $Id: common.c,v 1.1 2000/07/27 16:08:58 leonard Exp $
- */
+/* Miscellaneous common routines
+ * See http://python-ldap.sourceforge.net for details.
+ * $Id: common.c,v 1.2 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/common.h new/python-ldap-2.3.4/Modules/common.h
--- old/python-ldap-2.3.1/Modules/common.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/common.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,6 @@
-/* David Leonard , 1999. Public domain. */
-/*
- * common utility macros
- *
- * $Id: common.h,v 1.6 2006/12/06 07:36:00 stroeder Exp $
- */
+/* common utility macros
+ * See http://python-ldap.sourceforge.net for details.
+ * $Id: common.h,v 1.7 2008/03/20 12:24:56 stroeder Exp $ */
#ifndef __h_common
#define __h_common
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/constants.c new/python-ldap-2.3.4/Modules/constants.c
--- old/python-ldap-2.3.1/Modules/constants.c 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/constants.c 2008-03-26 17:21:57.000000000 +0100
@@ -1,9 +1,6 @@
-/* David Leonard , 1999. Public domain. */
-
-/*
- * constants defined for LDAP
- * $Id: constants.c,v 1.30 2007/07/17 19:37:27 stroeder Exp $
- */
+/* constants defined for LDAP
+ * See http://python-ldap.sourceforge.net for details.
+ * $Id: constants.c,v 1.34 2008/03/26 16:17:26 stroeder Exp $ */
#include "common.h"
#include "constants.h"
@@ -152,9 +149,12 @@
add_int(d,OPT_CLIENT_CONTROLS);
add_int(d,OPT_API_FEATURE_INFO);
add_int(d,OPT_HOST_NAME);
+
+ /* For backward-compability with OpenLDAP 2.3 libs this is defined in ldap/__init__.py */
+ /* add_int(d,OPT_DIAGNOSTIC_MESSAGE); */
+
add_int(d,OPT_ERROR_STRING);
add_int(d,OPT_MATCHED_DN);
- add_int(d,OPT_PRIVATE_EXTENSION_BASE);
add_int(d,OPT_DEBUG_LEVEL);
add_int(d,OPT_TIMEOUT);
add_int(d,OPT_REFHOPLIMIT);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/constants.h new/python-ldap-2.3.4/Modules/constants.h
--- old/python-ldap-2.3.1/Modules/constants.h 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/constants.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,9 @@
-/* David Leonard , 1999. Public domain. */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: constants.h,v 1.5 2008/03/20 12:24:56 stroeder Exp $ */
+
#ifndef __h_constants_
#define __h_constants_
-/* $Id: constants.h,v 1.4 2007/07/16 10:49:48 stroeder Exp $ */
-
#include "common.h"
extern void LDAPinit_constants( PyObject* d );
extern PyObject* LDAPconstant( int );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/errors.c new/python-ldap-2.3.4/Modules/errors.c
--- old/python-ldap-2.3.1/Modules/errors.c 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/errors.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,11 +1,8 @@
-/* David Leonard , 1999. Public domain. */
-
/*
* errors that arise from ldap use
- * $Id: errors.c,v 1.15 2006/11/16 13:13:56 stroeder Exp $
- *
* Most errors become their own exception
- */
+ * See http://python-ldap.sourceforge.net for details.
+ * $Id: errors.c,v 1.16 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
#include "errors.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/errors.h new/python-ldap-2.3.4/Modules/errors.h
--- old/python-ldap-2.3.1/Modules/errors.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/errors.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,5 +1,5 @@
-/* David Leonard , 1999. Public domain. */
-/* $Id: errors.h,v 1.4 2006/12/06 07:36:00 stroeder Exp $ */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: errors.h,v 1.5 2008/03/20 12:24:56 stroeder Exp $ */
#ifndef __h_errors_
#define __h_errors_
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/functions.c new/python-ldap-2.3.4/Modules/functions.c
--- old/python-ldap-2.3.1/Modules/functions.c 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/functions.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,5 @@
-/* David Leonard , 1999. Public domain. */
-
-/*
- * functions - functions available at the module level
- * $Id: functions.c,v 1.20 2007/03/26 18:37:24 stroeder Exp $
- #*/
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: functions.c,v 1.21 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
#include "functions.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/functions.h new/python-ldap-2.3.4/Modules/functions.h
--- old/python-ldap-2.3.1/Modules/functions.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/functions.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,8 +1,10 @@
-/* David Leonard , 1999. Public domain. */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: functions.h,v 1.3 2008/03/20 12:24:56 stroeder Exp $ */
+
#ifndef __h_functions_
#define __h_functions_
-/* $Id: functions.h,v 1.2 2006/12/06 07:36:00 stroeder Exp $ */
+/* $Id: functions.h,v 1.3 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
extern void LDAPinit_functions( PyObject* );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/ldapcontrol.c new/python-ldap-2.3.4/Modules/ldapcontrol.c
--- old/python-ldap-2.3.1/Modules/ldapcontrol.c 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/ldapcontrol.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,11 +1,5 @@
-/* Deepak Giridharagopal , 2004.
- * Applied Research Laboratories, University of Texas at Austin
- */
-
-/*
- * ldapcontrol.c - wrapper around libldap LDAPControl structs.
- * $Id: ldapcontrol.c,v 1.8 2007/07/16 10:49:48 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: ldapcontrol.c,v 1.9 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
#include "LDAPObject.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/ldapcontrol.h new/python-ldap-2.3.4/Modules/ldapcontrol.h
--- old/python-ldap-2.3.1/Modules/ldapcontrol.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/ldapcontrol.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,6 +1,5 @@
-/* Deepak Giridharagopal , 2004.
- * Applied Research Laboratories, University of Texas at Austin
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: ldapcontrol.h,v 1.4 2008/03/20 12:24:56 stroeder Exp $ */
#ifndef __h_ldapcontrol
#define __h_ldapcontrol
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/ldapmodule.c new/python-ldap-2.3.4/Modules/ldapmodule.c
--- old/python-ldap-2.3.1/Modules/ldapmodule.c 2005-06-14 19:49:14.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/ldapmodule.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,8 +1,5 @@
-/* David Leonard , 1999. Public domain. */
-/*
- * LDAP module
- * $Id: ldapmodule.c,v 1.7 2005/06/14 17:49:14 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: ldapmodule.c,v 1.8 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
#include "version.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/LDAPObject.c new/python-ldap-2.3.4/Modules/LDAPObject.c
--- old/python-ldap-2.3.1/Modules/LDAPObject.c 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/LDAPObject.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,5 @@
-/* David Leonard , 1999. Public domain. */
-
-/*
- * LDAPObject - wrapper around an LDAP* context
- * $Id: LDAPObject.c,v 1.78 2006/12/06 07:36:00 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: LDAPObject.c,v 1.79 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
#include "patchlevel.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/LDAPObject.h new/python-ldap-2.3.4/Modules/LDAPObject.h
--- old/python-ldap-2.3.1/Modules/LDAPObject.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/LDAPObject.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,9 @@
-/* David Leonard , 1999. Public domain. */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: LDAPObject.h,v 1.9 2008/03/20 12:24:56 stroeder Exp $ */
+
#ifndef __h_LDAPObject
#define __h_LDAPObject
-/* $Id: LDAPObject.h,v 1.8 2006/12/06 07:36:00 stroeder Exp $ */
-
#include "common.h"
#include "lber.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/message.c new/python-ldap-2.3.4/Modules/message.c
--- old/python-ldap-2.3.1/Modules/message.c 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/message.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,8 +1,5 @@
-/* David Leonard , 1999. Public domain. */
-/*
- * LDAPMessageObject - wrapper around an LDAPMessage*
- * $Id: message.c,v 1.11 2006/12/06 07:36:00 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: message.c,v 1.12 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
#include "message.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/message.h new/python-ldap-2.3.4/Modules/message.h
--- old/python-ldap-2.3.1/Modules/message.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/message.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,9 @@
-/* David Leonard , 1999. Public domain. */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: message.h,v 1.4 2008/03/20 12:24:56 stroeder Exp $ */
+
#ifndef __h_message
#define __h_message
-/* $Id: message.h,v 1.3 2006/12/06 07:36:00 stroeder Exp $ */
-
#include "common.h"
#include "lber.h"
#include "ldap.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/options.c new/python-ldap-2.3.4/Modules/options.c
--- old/python-ldap-2.3.1/Modules/options.c 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/options.c 2008-03-29 13:19:42.000000000 +0100
@@ -1,7 +1,5 @@
-/*
- * Options support
- * $Id: options.c,v 1.16 2006/11/16 13:13:56 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: options.c,v 1.18 2008/03/29 11:44:41 stroeder Exp $ */
#include "common.h"
#include "errors.h"
@@ -123,7 +121,7 @@
int res;
int intval;
double doubleval;
- struct timeval tv;
+ struct timeval *tv;
LDAPAPIInfo apiinfo;
LDAPControl **lcs;
LDAPControl *lc;
@@ -160,7 +158,14 @@
"vendor_name", apiinfo.ldapai_vendor_name,
"vendor_version", apiinfo.ldapai_vendor_version,
"extensions", extensions);
+
+ if (apiinfo.ldapai_vendor_name)
+ ldap_memfree(apiinfo.ldapai_vendor_name);
+ for (i = 0; i < num_extensions; i++)
+ ldap_memfree(apiinfo.ldapai_extensions[i]);
+ ldap_memfree(apiinfo.ldapai_extensions);
Py_DECREF(extensions);
+
return v;
#ifdef HAVE_SASL
@@ -207,7 +212,13 @@
if (self) LDAP_END_ALLOW_THREADS(self);
if (res != LDAP_OPT_SUCCESS)
return LDAPerr(res);
- return PyString_FromString(strval);
+ if (strval == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ v = PyString_FromString(strval);
+ ldap_memfree(strval);
+ return v;
case LDAP_OPT_TIMEOUT:
case LDAP_OPT_NETWORK_TIMEOUT:
@@ -217,9 +228,15 @@
if (self) LDAP_END_ALLOW_THREADS(self);
if (res != LDAP_OPT_SUCCESS)
return LDAPerr(res);
- return PyFloat_FromDouble(
- (double) tv.tv_sec + ( (double) tv.tv_usec / 1000000.0 )
+ if (tv == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ v = PyFloat_FromDouble(
+ (double) tv->tv_sec + ( (double) tv->tv_usec / 1000000.0 )
);
+ ldap_memfree(tv);
+ return v;
case LDAP_OPT_SERVER_CONTROLS:
case LDAP_OPT_CLIENT_CONTROLS:
@@ -249,6 +266,8 @@
PyList_SET_ITEM(v, i, tup);
}
+ ldap_controls_free(lcs);
+
return v;
default:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/options.h new/python-ldap-2.3.4/Modules/options.h
--- old/python-ldap-2.3.1/Modules/options.h 2002-07-26 00:49:37.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/options.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,4 +1,5 @@
-/* $Id: options.h,v 1.2 2002/07/25 22:49:37 stroeder Exp $ */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: options.h,v 1.3 2008/03/20 12:24:56 stroeder Exp $ */
int LDAP_optionval_by_name(const char *name);
int LDAP_set_option(LDAPObject *self, int option, PyObject *value);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/schema.c new/python-ldap-2.3.4/Modules/schema.c
--- old/python-ldap-2.3.1/Modules/schema.c 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/schema.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,5 @@
-/* Hans Aschauer , 2002. Public domain. */
-
-/*
- *
- * $Id: schema.c,v 1.6 2006/12/06 07:36:00 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: schema.c,v 1.7 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/schema.h new/python-ldap-2.3.4/Modules/schema.h
--- old/python-ldap-2.3.1/Modules/schema.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/schema.h 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,5 @@
-/* Hans Aschauer , 2002. Public domain. */
-
-/*
- *
- * $Id: schema.h,v 1.3 2006/12/06 07:36:00 stroeder Exp $
- */
+/* See http://python-ldap.sourceforge.net for details.
+ * $Id: schema.h,v 1.4 2008/03/20 12:24:56 stroeder Exp $ */
#ifndef __h_schema_
#define __h_schema_
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/version.c new/python-ldap-2.3.4/Modules/version.c
--- old/python-ldap-2.3.1/Modules/version.c 2000-08-15 00:37:37.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/version.c 2008-03-20 13:24:56.000000000 +0100
@@ -1,9 +1,6 @@
-/* David Leonard , 1999. Public domain. */
-
-/*
- * version info
- * $Id: version.c,v 1.2 2000/08/14 22:37:37 leonard Exp $
- */
+/* Set release version
+ * See http://python-ldap.sourceforge.net for details.
+ * $Id: version.c,v 1.3 2008/03/20 12:24:56 stroeder Exp $ */
#include "common.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/Modules/version.h new/python-ldap-2.3.4/Modules/version.h
--- old/python-ldap-2.3.1/Modules/version.h 2007-03-27 22:34:31.000000000 +0200
+++ new/python-ldap-2.3.4/Modules/version.h 2008-03-20 13:24:57.000000000 +0100
@@ -1,8 +1,10 @@
-/* David Leonard , 1999. Public domain. */
+/* Set release version
+ * See http://python-ldap.sourceforge.net for details.
+ * $Id: version.h,v 1.3 2008/03/20 12:24:57 stroeder Exp $ */
+
#ifndef __h_version_
#define __h_version_
-/* $Id: version.h,v 1.2 2006/12/06 07:36:00 stroeder Exp $ */
#include "common.h"
extern void LDAPinit_version( PyObject* d );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/PKG-INFO new/python-ldap-2.3.4/PKG-INFO
--- old/python-ldap-2.3.1/PKG-INFO 2007-07-25 00:46:57.000000000 +0200
+++ new/python-ldap-2.3.4/PKG-INFO 2008-03-29 13:19:52.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: python-ldap
-Version: 2.3.1
+Version: 2.3.4
Summary: Various LDAP-related Python modules
Home-page: http://python-ldap.sourceforge.net/
Author: David Leonard, Michael Stroeder, et al.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/README new/python-ldap-2.3.4/README
--- old/python-ldap-2.3.1/README 2007-07-25 00:46:05.000000000 +0200
+++ new/python-ldap-2.3.4/README 2008-03-26 17:37:33.000000000 +0100
@@ -50,9 +50,6 @@
and Steffen Ries for working
on support for OpenLDAP 2.0.x features.
- Thanks to Federico Di Gregorio <fog at mixadlive.com> for the
- ldaplib and perldap migration module.
-
Thanks to Michael Stroeder <michael at stroeder.com> for the
modules ldif, ldapurl, ldap/schema/*.py, ldap/*.py.
@@ -62,8 +59,12 @@
Thanks to Mauro Cicognini <mcicogni at siosistemi.it> for the
WIN32/MSVC6 bits, and the pre-built WIN32 ldap.pyd.
+ Thanks to James Andrewartha <jamesa at daa.com.au> for
+ significant contribution to Doc/*.tex.
+
These very kind people have supplied patches or suggested changes:
+ Federico Di Gregorio <fog at mixadlive.com>
John Benninghoff <johnb at netscape.com>
Donn Cave <donn at u.washington.edu>
Jason Gunthorpe <jgg at debian.org>
@@ -86,4 +87,4 @@
Thanks! We may have missed someone: please mail us if we have omitted
your name.
-$Id: README,v 1.14 2007/07/24 22:44:59 stroeder Exp $
+$Id: README,v 1.16 2008/03/26 16:37:33 stroeder Exp $
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-ldap-2.3.1/setup.py new/python-ldap-2.3.4/setup.py
--- old/python-ldap-2.3.1/setup.py 2007-07-25 00:42:56.000000000 +0200
+++ new/python-ldap-2.3.4/setup.py 2008-03-26 13:29:01.000000000 +0100
@@ -3,7 +3,7 @@
See http://python-ldap.sourceforge.net for details.
-$Id: setup.py,v 1.61 2007/07/16 10:40:29 stroeder Exp $
+$Id: setup.py,v 1.62 2008/03/26 12:29:01 stroeder Exp $
"""
has_setuptools = False
@@ -24,7 +24,7 @@
f = open(package_init_file_name,'r')
s = f.readline()
while s:
- s = string.strip(f.readline())
+ s = string.strip(s)
if s[0:11]=='__version__':
version = eval(string.split(s,'=')[1])
break
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org