From david.smith at cornell.edu Thu Jan 5 17:56:50 2012 From: david.smith at cornell.edu (David N. Smith) Date: Thu, 5 Jan 2012 16:56:50 +0000 Subject: [python-ldap] Unit tests in python-ldap CVS trunk Message-ID: Hi all. I'm working on building and validating a python 3 version of python-ldap using the current CVS repo as a starting place (version 2.4.6). Most of the provided unit tests work in my python 3 version but not the ones for ldap urls. Are they supposed to work? I get the impression from code they were written, but no release has ever passed them. -- David From david.smith at cornell.edu Thu Jan 5 20:26:31 2012 From: david.smith at cornell.edu (David N. Smith) Date: Thu, 5 Jan 2012 19:26:31 +0000 Subject: [python-ldap] python-ldap for python3 (volunteering effort/code) Message-ID: <32FF44A2-B725-4F50-B8BF-EADD3A33B48C@cornell.edu> Hi everyone. We are fairly heavy users of python-ldap and are working towards the move to python 3. I've done some work on the code and am willing to contribute/maintain it. If someone could point me in the right direction, I'm more than willing to contribute. Thanks. -- David From david.smith at cornell.edu Thu Jan 5 20:30:29 2012 From: david.smith at cornell.edu (David N. Smith) Date: Thu, 5 Jan 2012 19:30:29 +0000 Subject: [python-ldap] Unit tests in python-ldap CVS trunk In-Reply-To: <5911_1325784009_q05HK4aa025716_A5E24D14-936B-4C74-85C7-A647950DE59B@cornell.edu> References: <5911_1325784009_q05HK4aa025716_A5E24D14-936B-4C74-85C7-A647950DE59B@cornell.edu> Message-ID: <363D0586-1AE1-4DF5-8647-7B9E1DC5A421@cornell.edu> On Jan 5, 2012, at 12:20 PM, "David N. Smith" wrote: > Hi all. > > I'm working on building and validating a python 3 version of python-ldap using the current CVS repo as a starting place (version 2.4.6). Most of the provided unit tests work in my python 3 version but not the ones for ldap urls. Are they supposed to work? I get the impression from code they were written, but no release has ever passed them. > > -- David I should mention it's only one test that's failing now ... test_bad_urls in Tests/t_ldapurl.py. Everything else passes on my Ubuntu box. -- David From michael at stroeder.com Fri Jan 6 08:43:04 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Fri, 06 Jan 2012 13:13:04 +0530 Subject: [python-ldap] Unit tests in python-ldap CVS trunk In-Reply-To: <363D0586-1AE1-4DF5-8647-7B9E1DC5A421@cornell.edu> References: <5911_1325784009_q05HK4aa025716_A5E24D14-936B-4C74-85C7-A647950DE59B@cornell.edu> <363D0586-1AE1-4DF5-8647-7B9E1DC5A421@cornell.edu> Message-ID: <4F06A608.90401@stroeder.com> David N. Smith wrote: > I should mention it's only one test that's failing now ... > test_bad_urls in Tests/t_ldapurl.py. Everything else passes on my > Ubuntu box. Regarding tests there's this section in TODO: Tests/ - Clean up and finish the mess of small test scripts started. - Create a test script that exercises everything with a server holding the BLITS test data set So basically there is no test suite which allows you to check a Python3 implementation of python-ldap. :-( Usually when doing modifications I test with my web2ldap which triggers most code within python-ldap even when just connecting and SASL binding to my local test server. The bad URL tests in Tests/t_ldapurl.py fail because syntax checking for various data in LDAP URLs is not implemented yet but David added very strict test cases. The parser is quite liberal and leaves stricter checks up to the calling application. This is debatable though. Ciao, Michael. From michael at stroeder.com Fri Jan 6 08:52:15 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Fri, 06 Jan 2012 13:22:15 +0530 Subject: [python-ldap] python-ldap for python3 (volunteering effort/code) In-Reply-To: <32FF44A2-B725-4F50-B8BF-EADD3A33B48C@cornell.edu> References: <32FF44A2-B725-4F50-B8BF-EADD3A33B48C@cornell.edu> Message-ID: <4F06A82F.8090900@stroeder.com> David N. Smith wrote: > We are fairly heavy users of python-ldap and are working towards the > move to python 3. I've done some work on the code and am willing to > contribute/maintain it. During the last weeks I've read about Cython and how to write extension modules with it. This was triggered by suggestions on this mailing list during a discussion about supporting Python3 in December. It looks very promising, also for speeding up schema parsing, but I have to make up my mind which approach to take. Cython offers various ways to do the same thing. As said before: You can do some quick hacks to get the C wrapper module working. This was already done by others (see mailing list archive). But it's far more work to get all the features robustly implemented and have a maintainable code base. > If someone could point me in the right > direction, I'm more than willing to contribute. Certainly your help is welcome. But let us first discuss the proper approach. There are various things to address when rewriting this stuff: 1. Maintain API backwards compability? 2. Start a new module package ldap2 to avoid compability clash? 3. How to overcome deficiencies of the C API and current C wrapper module? Ciao, Michael. From michael at stroeder.com Sat Jan 7 08:56:05 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Sat, 07 Jan 2012 13:26:05 +0530 Subject: [python-ldap] Unit tests in python-ldap CVS trunk In-Reply-To: <202704BA-AAAB-4508-95A9-6EF67503EE6F@cornell.edu> References: <5911_1325784009_q05HK4aa025716_A5E24D14-936B-4C74-85C7-A647950DE59B@cornell.edu> <363D0586-1AE1-4DF5-8647-7B9E1DC5A421@cornell.edu>, <4F06A608.90401@stroeder.com> <202704BA-AAAB-4508-95A9-6EF67503EE6F@cornell.edu> Message-ID: <4F07FA95.1090708@stroeder.com> David N. Smith wrote: > On Jan 6, 2012, at 5:21 AM, "Michael Str?der" wrote: >> The bad URL tests in Tests/t_ldapurl.py fail because syntax >> checking for various data in LDAP URLs is not implemented yet but >> David added very strict test cases. The parser is quite liberal and >> leaves stricter checks up to the calling application. This is >> debatable though. > > Thanks for clarifying that. I'm of the opinion that strict checking > isn't necessarily the best way to go. As long as a URL either get's > a good, properly configured connection or is rejected is good enough > in my book. Well, there are more cases where LDAP URLs are used, not only making a connection. An LDAP URL can be used e.g. for configuration with empty hostport part. Ciao, Michael. From jblaine at kickflop.net Mon Jan 9 23:00:45 2012 From: jblaine at kickflop.net (Jeff Blaine) Date: Mon, 09 Jan 2012 17:00:45 -0500 Subject: [python-ldap] ldap.rst doc patch Message-ID: <4F0B638D.8030408@kickflop.net> Can't find contact info @ python-ldap.org, so here: --- ldap.rst 2012-01-09 16:57:47.000001000 -0500 +++ ldap.rst.new 2012-01-09 16:58:23.000002000 -0500 @@ -760,8 +760,8 @@ Each element in the list *modlist* should be a tuple of the form *(mod_op,mod_type,mod_vals)*, - where *mod_op* indicates the operation (one of :py:const:`MOD_ADD`, - :py:const:`MOD_DELETE`, or :py:const:`MOD_REPLACE`), + where *mod_op* indicates the operation (one of :py:const:`ldap.MOD_ADD`, + :py:const:`ldap.MOD_DELETE`, or :py:const:`ldap.MOD_REPLACE`), *mod_type* is a string indicating the attribute type name, and *mod_vals* is either a string value or a list of string values to add, delete or replace respectively. For the delete operation, *mod_vals* -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Attached Message Part URL: From michael at stroeder.com Wed Jan 11 00:29:13 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 11 Jan 2012 00:29:13 +0100 Subject: [python-ldap] ldap.rst doc patch In-Reply-To: <4F0B638D.8030408@kickflop.net> References: <4F0B638D.8030408@kickflop.net> Message-ID: <4F0CC9C9.1010907@stroeder.com> Jeff Blaine wrote: > Can't find contact info @ python-ldap.org, so here: > > --- ldap.rst 2012-01-09 16:57:47.000001000 -0500 > +++ ldap.rst.new 2012-01-09 16:58:23.000002000 -0500 > @@ -760,8 +760,8 @@ > Each element in the list *modlist* should be a tuple of the form > *(mod_op,mod_type,mod_vals)*, > - where *mod_op* indicates the operation (one of :py:const:`MOD_ADD`, > - :py:const:`MOD_DELETE`, or :py:const:`MOD_REPLACE`), > + where *mod_op* indicates the operation (one of :py:const:`ldap.MOD_ADD`, > + :py:const:`ldap.MOD_DELETE`, or :py:const:`ldap.MOD_REPLACE`), > *mod_type* is a string indicating the attribute type name, and > *mod_vals* is either a string value or a list of string values to add, > delete or replace respectively. For the delete operation, *mod_vals* Committed. Thanks for sending this in. Ciao, Michael. From michael at stroeder.com Wed Jan 11 11:06:26 2012 From: michael at stroeder.com (=?UTF-8?B?TWljaGFlbCBTdHLDtmRlcg==?=) Date: Wed, 11 Jan 2012 11:06:26 +0100 Subject: [python-ldap] Suspected memory leak in Modules/errors.c:LDAPerr In-Reply-To: <1323881342.2369.54.camel@surprise> References: <1323294096.2300.23.camel@surprise> <1323296528.2300.32.camel@surprise> <4EE0FE92.4060205@stroeder.com> <1323881342.2369.54.camel@surprise> Message-ID: <4F0D5F22.4070209@stroeder.com> David Malcolm wrote: > On Thu, 2011-12-08 at 19:14 +0100, Michael Str?der wrote: >> Hi Bradley and David, >> >> thanks for your analysis and experiments with PyPy. >> >> I'm not familiar with all this. If you prepare a patch (until tomorrow >> evening) I will test and commit it but I have currently no time during the >> next weeks to dive into that. > Attached is a minimal patch against CVS HEAD which removes the erroneous > Py_DECREF(). Thanks for sending it. Committed in HEAD. Ciao, Michael. From dmitry.pankratov at gmail.com Fri Jan 13 23:10:25 2012 From: dmitry.pankratov at gmail.com (D.P.) Date: Fri, 13 Jan 2012 22:10:25 +0000 (UTC) Subject: [python-ldap] PyPy-LDAP References: Message-ID: > Hello, > > I've built a PyPy version of python-ldap (2.4.6), and I get the following error when I try to import: >... > Segmentation fault: 11 After I've commented the following line in the errors.c file no segfault occurs: // Py_DECREF( LDAPexception_class ); Haven't tested it further though... Regards, Dimitri From michael at stroeder.com Sat Jan 14 00:12:59 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Sat, 14 Jan 2012 00:12:59 +0100 Subject: [python-ldap] PyPy-LDAP In-Reply-To: References: Message-ID: <4F10BA7B.1020605@stroeder.com> D.P. wrote: >> Hello, >> >> I've built a PyPy version of python-ldap (2.4.6), and I get the following > error when I try to import: >> ... >> Segmentation fault: 11 > > > After I've commented the following line in the errors.c file no segfault occurs: > > // Py_DECREF( LDAPexception_class ); > > Haven't tested it further though... Please try CVS HEAD since the code line above was removed there a couple of days ago. Ciao, Michael. From michael at stroeder.com Wed Jan 18 20:40:48 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 18 Jan 2012 20:40:48 +0100 Subject: [python-ldap] Developer access to python-ldap on SF Message-ID: <4F172040.1020607@stroeder.com> HI! Not many contributions were done for python-ldap by others. For security reasons I want to disable developer access to python-ldap for all SF accounts except for David Leonard and myself within the next days. I have no idea who is active and whether a SF account might got hacked. Anyone who really needs developer access to python-ldap should speak up now. Ciao, Michael. From david.smith at cornell.edu Wed Jan 18 21:38:15 2012 From: david.smith at cornell.edu (David N. Smith) Date: Wed, 18 Jan 2012 20:38:15 +0000 Subject: [python-ldap] Developer access to python-ldap on SF In-Reply-To: <4F172040.1020607@stroeder.com> References: <4F172040.1020607@stroeder.com> Message-ID: <8D944600-4FC2-4387-98B4-4C23F752B041@cornell.edu> As long as I can read the cvs, no problem. Still interested in working on an "official" python 3 version. I suspect that will be a new version (3.0?) based on the conversation so far. -- David On Jan 18, 2012, at 2:41 PM, "Michael Str?der" wrote: > HI! > > Not many contributions were done for python-ldap by others. For security reasons I want to disable developer access to python-ldap for all SF accounts except for David Leonard and myself within the next days. I have no idea who is active and whether a SF account might got hacked. > > Anyone who really needs developer access to python-ldap should speak up now. > > Ciao, Michael. > _______________________________________________ > python-ldap mailing list > python-ldap at python.org > http://mail.python.org/mailman/listinfo/python-ldap From michael at stroeder.com Thu Jan 19 20:45:09 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Thu, 19 Jan 2012 20:45:09 +0100 Subject: [python-ldap] ANN: python-ldap 2.4.7 Message-ID: <4F1872C5.2040808@stroeder.com> Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.4 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. ---------------------------------------------------------------- Released 2.4.7 2012-12-19 Changes since 2.4.6: Lib/ * Separate classes for request/response controls for RFC 3829 * Fixed ldap.schema.subentry.SubSchema.attribute_types() to also eliminate double attribute types in MAY clause of DIT content rule Modules/ * Fixed memory leak (thanks to David Malcolm) ---------------------------------------------------------------- Released 2.4.6 2011-11-27 Changes since 2.4.5: Lib/ * ldap.controls.ppolicy: Another fix for decoding the password policy response control From michael at stroeder.com Tue Feb 21 18:20:19 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 21 Feb 2012 18:20:19 +0100 Subject: [python-ldap] ANN: python-ldap 2.4.8 Message-ID: <4F43D253.2090407@stroeder.com> Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.8 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. ---------------------------------------------------------------- Released 2.4.8 2012-02-21 Changes since 2.4.7: Lib/ * Fixed overzealous check for non-unique NAMEs in ldap.schema.subentry.SubSchema.__init__() * Fixed typos in control decoding method ldap.controls.simple.OctetStringInteger.decodeControlValue() * Added experimental support for draft-vchu-ldap-pwd-policy From mmatz at wyoarea.org Tue Feb 28 14:41:17 2012 From: mmatz at wyoarea.org (Mike Matz) Date: Tue, 28 Feb 2012 08:41:17 -0500 Subject: [python-ldap] Mac OS X Lion & python-ldap Message-ID: <993AC7E3-D6D3-4659-A880-48E02FD6C9B6@wyoarea.org> Good Morning, I am having difficulty getting python-ldap to work on Mac OS X 10.7.3. I installed python-ldap following the directions here. I tested the module after installation and it appears to have installed correctly. mmatz$ python -c 'import ldap; print ldap.__version__' 2.4.8 I was then able to use the module successfully from an interactive shell. mmatz$ python Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ldap >>> server = "ldap://10.20.12.10:389" >>> user = "some user" >>> pwd = "some password" >>> l = ldap.initialize(server) >>> l.simple_bind_s(user, pwd) (97, [], 1, []) >>> l.unbind_s() However, when I execute the same code from within a script, the script fails. mmatz$ python ldap.py Traceback (most recent call last): File "ldap.py", line 1, in import ldap File "/Users/mmatz/Desktop/ldap.py", line 8, in l = ldap.initialize(server) AttributeError: 'module' object has no attribute 'initialize' Any help on getting the python-ldap module to work from a script would be much appreciated. Thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Tue Feb 28 16:11:40 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 28 Feb 2012 16:11:40 +0100 Subject: [python-ldap] Mac OS X Lion & python-ldap In-Reply-To: <993AC7E3-D6D3-4659-A880-48E02FD6C9B6@wyoarea.org> References: <993AC7E3-D6D3-4659-A880-48E02FD6C9B6@wyoarea.org> Message-ID: <4F4CEEAC.4030505@stroeder.com> Mike, I'm not familiar with Mac OS X at all. But I don't see any reason why python-ldap should work in the Python shell but not in a Python script if invoked with the very same interpreter. Maybe you should try to analyse the output of python -v and compare the paths used when importing python-ldap. Ciao, Michael. Mike Matz wrote: > Good Morning, > > I am having difficulty getting python-ldap to work on Mac OS X 10.7.3. I > installed python-ldap following the directions here > . I tested the > module after installation and it appears to have installed correctly. > > mmatz$ python -c 'import ldap; print ldap.__version__' > 2.4.8 > > I was then able to use the module successfully from an interactive shell. > > mmatz$ python > Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) > [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import ldap > >>> server = "ldap://10.20.12.10:389" > >>> user = "some user" > >>> pwd = "some password" > >>> l = ldap.initialize(server) > >>> l.simple_bind_s(user, pwd) > (97, [], 1, []) > >>> l.unbind_s() > > However, when I execute the same code from within a script, the script fails. > > mmatz$ python ldap.py > Traceback (most recent call last): > File "ldap.py", line 1, in > import ldap > File "/Users/mmatz/Desktop/ldap.py", line 8, in > l = ldap.initialize(server) > AttributeError: 'module' object has no attribute 'initialize' > > Any help on getting the python-ldap module to work from a script would be much > appreciated. > Thanks, > Mike > > > > > > _______________________________________________ > python-ldap mailing list > python-ldap at python.org > http://mail.python.org/mailman/listinfo/python-ldap -- Michael Str?der Klauprechtstr. 11 Dipl.-Inform. D-76137 Karlsruhe, Germany Tel.: +49 721 8304316 Mobil: +49 170 2391920 E-Mail: michael at stroeder.com http://www.stroeder.com From david.smith at cornell.edu Tue Feb 28 16:18:01 2012 From: david.smith at cornell.edu (David N. Smith) Date: Tue, 28 Feb 2012 15:18:01 +0000 Subject: [python-ldap] Mac OS X Lion & python-ldap In-Reply-To: <993AC7E3-D6D3-4659-A880-48E02FD6C9B6@wyoarea.org> References: <993AC7E3-D6D3-4659-A880-48E02FD6C9B6@wyoarea.org> Message-ID: <15A2C91D-04D8-4B3D-84F0-68289B2D2136@cornell.edu> On Feb 28, 2012, at 8:43 AM, "Mike Matz" > wrote: Good Morning, I am having difficulty getting python-ldap to work on Mac OS X 10.7.3. I installed python-ldap following the directions here. I tested the module after installation and it appears to have installed correctly. mmatz$ python -c 'import ldap; print ldap.__version__' 2.4.8 I was then able to use the module successfully from an interactive shell. mmatz$ python Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ldap >>> server = "ldap://10.20.12.10:389" >>> user = "some user" >>> pwd = "some password" >>> l = ldap.initialize(server) >>> l.simple_bind_s(user, pwd) (97, [], 1, []) >>> l.unbind_s() However, when I execute the same code from within a script, the script fails. mmatz$ python ldap.py Traceback (most recent call last): File "ldap.py", line 1, in import ldap File "/Users/mmatz/Desktop/ldap.py", line 8, in l = ldap.initialize(server) AttributeError: 'module' object has no attribute 'initialize' Any help on getting the python-ldap module to work from a script would be much appreciated. Thanks, Mike I suspect you have a naming conflict between your script (ldap.py) and the ldap package. Try changing your scripts name and re-run it. -- David -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmatz at wyoarea.org Tue Feb 28 17:21:01 2012 From: mmatz at wyoarea.org (Mike Matz) Date: Tue, 28 Feb 2012 11:21:01 -0500 Subject: [python-ldap] Mac OS X Lion & python-ldap In-Reply-To: <15A2C91D-04D8-4B3D-84F0-68289B2D2136@cornell.edu> References: <993AC7E3-D6D3-4659-A880-48E02FD6C9B6@wyoarea.org> <15A2C91D-04D8-4B3D-84F0-68289B2D2136@cornell.edu> Message-ID: <5CDE92D6-A17B-44AB-8967-2E8B9A1103E9@wyoarea.org> Thanks David. I should have know better. Mike On Feb 28, 2012, at 10:18 AM, David N. Smith wrote: On Feb 28, 2012, at 8:43 AM, "Mike Matz" > wrote: Good Morning, I am having difficulty getting python-ldap to work on Mac OS X 10.7.3. I installed python-ldap following the directions here. I tested the module after installation and it appears to have installed correctly. mmatz$ python -c 'import ldap; print ldap.__version__' 2.4.8 I was then able to use the module successfully from an interactive shell. mmatz$ python Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ldap >>> server = "ldap://10.20.12.10:389" >>> user = "some user" >>> pwd = "some password" >>> l = ldap.initialize(server) >>> l.simple_bind_s(user, pwd) (97, [], 1, []) >>> l.unbind_s() However, when I execute the same code from within a script, the script fails. mmatz$ python ldap.py Traceback (most recent call last): File "ldap.py", line 1, in import ldap File "/Users/mmatz/Desktop/ldap.py", line 8, in l = ldap.initialize(server) AttributeError: 'module' object has no attribute 'initialize' Any help on getting the python-ldap module to work from a script would be much appreciated. Thanks, Mike I suspect you have a naming conflict between your script (ldap.py) and the ldap package. Try changing your scripts name and re-run it. -- David _______________________________________________ python-ldap mailing list python-ldap at python.org http://mail.python.org/mailman/listinfo/python-ldap -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennethkoski at gmail.com Wed Feb 29 06:39:20 2012 From: kennethkoski at gmail.com (Kenneth Koski) Date: Tue, 28 Feb 2012 23:39:20 -0600 Subject: [python-ldap] Pip install failure Message-ID: Not quite sure if this is a python-ldap issue, or a pip issue. Reporting a bug/feature request here, though, and if someone can redirect me to the right group, I'll send it that way. At any rate, I'm running Ubuntu 10.04 with virtualenv. I tried doing a "pip install python-ldap", which apparently tried to build from source. It failed with the error message "too many arguments to function ?interaction?". After doing some Google searching it turns out that the libraries libldap2-dev, libsasl2-dev, and libssl-dev are required. It seems like there should be a more informative way of letting the user know that they need to install these libraries without requiring them to resort to using a search engine. Thanks, Ken Koski -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Wed Feb 29 10:48:07 2012 From: michael at stroeder.com (=?windows-1252?Q?Michael_Str=F6der?=) Date: Wed, 29 Feb 2012 10:48:07 +0100 Subject: [python-ldap] Pip install failure In-Reply-To: References: Message-ID: <4F4DF457.9000606@stroeder.com> Kenneth Koski wrote: > Not quite sure if this is a python-ldap issue, or a pip issue. Reporting a > bug/feature request here, though, and if someone can redirect me to the right > group, I'll send it that way. > > At any rate, I'm running Ubuntu 10.04 with virtualenv. I tried doing a "pip > install python-ldap", which apparently tried to build from source. It failed > with the error message "too many arguments to function ?interaction?". After > doing some Google searching it turns out that the libraries libldap2-dev, > libsasl2-dev, and libssl-dev are required. It seems like there should be a > more informative way of letting the user know that they need to install these > libraries without requiring them to resort to using a search engine. Feel free to contribute appropriate text for this doc section: http://www.python-ldap.org/doc/html/installing.html#building-and-installing But bear in mind that the Linux distributions all have different package systems and package names - even changing from distro version to version. So there should not be too much platform-specific stuff in your text. I tried to write up something for my web2ldap which is based on python-ldap: http://www.web2ldap.de/install_debian.html But the drawback is that this is only a example for a specific Debian version and the admin still might have to check out some things himself. It might be better to tell the Ubuntu developers to update their python-ldap package because this is likely the reason why you installed via pip. Ciao, Michael. P.S.: If you plan to post more to python-ldap mailing list please subscribe to it so you can receive the follow-ups and I don't have to manually approve your postings. The mailing list is very low traffic. From jen.tille at yahoo.com Wed Feb 29 15:42:15 2012 From: jen.tille at yahoo.com (Jen Tille) Date: Wed, 29 Feb 2012 06:42:15 -0800 (PST) Subject: [python-ldap] Where to Download Python-ldap for Python-2.7.2 and Openldap-2.2.13-4 Message-ID: <1330526535.66003.YahooMailNeo@web121601.mail.ne1.yahoo.com> Hello - I want a python-ldap tarball which I can compile for Python-2.7.2 and openldap-2.2.13-4.? The two latest python-ldap packages do not work because they need a newer openldap.? Where can I download a python-ldap tarball that I can compile for the above mentioned versions? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Wed Feb 29 16:24:14 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 29 Feb 2012 16:24:14 +0100 Subject: [python-ldap] Where to Download Python-ldap for Python-2.7.2 and Openldap-2.2.13-4 In-Reply-To: <1330526535.66003.YahooMailNeo@web121601.mail.ne1.yahoo.com> References: <1330526535.66003.YahooMailNeo@web121601.mail.ne1.yahoo.com> Message-ID: <4F4E431E.40609@stroeder.com> Jen Tille wrote: > I want a python-ldap tarball which I can compile for Python-2.7.2 and > openldap-2.2.13-4. The two latest python-ldap packages do not work because > they need a newer openldap. Where can I download a python-ldap tarball that I > can compile for the above mentioned versions? Note that OpenLDAP 2.2.13 is really ancient! It was released almost eight years ago and should not be used anymore. 2.2.x series has not been maintained by OpenLDAP developers for years. You won't get support for this anywhere. You definitely cannot compile recent python-ldap releases on such a platform. If you're stuck on a certain Linux distribution (I guess old RHEL 4 or earlier) you should either 1. stick to Python and python-ldap packages provided for this distribution or 2. also compile recent OpenLDAP, OpenSSL and SASL libs yourself to a separate prefix (take care of run-time linking issues!). Ciao, Michael. From jen.tille at yahoo.com Wed Feb 29 19:34:30 2012 From: jen.tille at yahoo.com (Jen Tille) Date: Wed, 29 Feb 2012 10:34:30 -0800 (PST) Subject: [python-ldap] Where to Download Python-ldap for Python-2.7.2 and Openldap-2.2.13-4 References: <1330526535.66003.YahooMailNeo@web121601.mail.ne1.yahoo.com> <4F4E431E.40609@stroeder.com> Message-ID: <1330540470.6989.YahooMailNeo@web121604.mail.ne1.yahoo.com> Yes, I am stuck on the OS.? Where can I download an older python-ldap tarball from such as python-ldap-2.0.1-2? I don't find a link on the python-ldap page to older tarballs.? The pypi.python.org only has the two latest tarballs. ________________________________ From: Michael Str?der To: Jen Tille Cc: "python-ldap at python.org" Sent: Wednesday, February 29, 2012 9:24 AM Subject: Re: [python-ldap] Where to Download Python-ldap for Python-2.7.2 and Openldap-2.2.13-4 Jen Tille wrote: > I want a python-ldap tarball which I can compile for Python-2.7.2 and > openldap-2.2.13-4. The two latest python-ldap packages do not work because > they need a newer openldap. Where can I download a python-ldap tarball that I > can compile for the above mentioned versions? Note that OpenLDAP 2.2.13 is really ancient! It was released almost eight years ago and should not be used anymore. 2.2.x series has not been maintained by OpenLDAP developers for years. You won't get support for this anywhere. You definitely cannot compile recent python-ldap releases on such a platform. If you're stuck on a certain Linux distribution (I guess old RHEL 4 or earlier) you should either 1. stick to Python and python-ldap packages provided for this distribution or 2. also compile recent OpenLDAP, OpenSSL and SASL libs yourself to a separate prefix (take care of run-time linking issues!). Ciao, Michael. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Wed Feb 29 19:43:28 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 29 Feb 2012 19:43:28 +0100 Subject: [python-ldap] Where to Download Python-ldap for Python-2.7.2 and Openldap-2.2.13-4 In-Reply-To: <1330540470.6989.YahooMailNeo@web121604.mail.ne1.yahoo.com> References: <1330526535.66003.YahooMailNeo@web121601.mail.ne1.yahoo.com> <4F4E431E.40609@stroeder.com> <1330540470.6989.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: <4F4E71D0.1050102@stroeder.com> Jen Tille wrote: > Yes, I am stuck on the OS. Where can I download an older python-ldap tarball > from such as python-ldap-2.0.1-2? Ask your OS vendor then. Probably you can install the SRPM. I won't give any support for such ancient releases especially if you want to use them with newer Python versions! As said: Either compile recent releases competeley yourself in a separate prefix (I'd do this) or solely stick to the distro's packages and ask the OS vendor for support. Ciao, Michael. From vela at debian.org Wed Feb 29 19:50:44 2012 From: vela at debian.org (Matej Vela) Date: Wed, 29 Feb 2012 19:50:44 +0100 Subject: [python-ldap] Where to Download Python-ldap for Python-2.7.2 and Openldap-2.2.13-4 In-Reply-To: <1330540470.6989.YahooMailNeo@web121604.mail.ne1.yahoo.com> (Jen Tille's message of "Wed\, 29 Feb 2012 10\:34\:30 -0800 \(PST\)") References: <1330526535.66003.YahooMailNeo@web121601.mail.ne1.yahoo.com> <4F4E431E.40609@stroeder.com> <1330540470.6989.YahooMailNeo@web121604.mail.ne1.yahoo.com> Message-ID: <8762eplbi3.fsf@zelendur.carpriv.carnet.hr> Jen Tille writes: > Yes, I am stuck on the OS.? Where can I download an older python-ldap > tarball from such as python-ldap-2.0.1-2? I don't find a link on the > python-ldap page to older tarballs.? The pypi.python.org only has the > two latest tarballs. If you're using Debian or a derivative like Ubuntu, older packages (along with sources) are available at: Cheers, Matej From zhbmaillistonly at gmail.com Thu Mar 1 21:38:18 2012 From: zhbmaillistonly at gmail.com (Zhang Huangbin) Date: Fri, 2 Mar 2012 04:38:18 +0800 Subject: [python-ldap] Patch to successfully install python-ldap-2.4.8 on DragonFly BSD 3.0 Message-ID: <3DBF8DF76207489C8D32D5FDBAC5AF4A@gmail.com> Dear developers, Here's small/dirty patch to make python-ldap work on DragonFly BSD due to different library and include dirs. Hope you will consider fixing it in next release. Thanks for your great work. :) # diff -Naur setup.cfg ../setup.cfg --- setup.cfg 2012-02-22 01:18:54.000000000 +0800 +++ ../setup.cfg 2012-03-02 04:32:40.764107000 +0800 @@ -1,6 +1,6 @@ [_ldap] -library_dirs = /opt/openldap-RE24/lib /usr/lib -include_dirs = /opt/openldap-RE24/include /usr/include/sasl /usr/include +library_dirs = /opt/openldap-RE24/lib /usr/lib /usr/pkg/lib +include_dirs = /opt/openldap-RE24/include /usr/include/sasl /usr/include /usr/pkg/include/sasl defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R extra_compile_args = extra_objects = ---- Zhang Huangbin iRedMail: Open Source Mail Server Solution for Red Hat Enterprise Linux, CentOS, Scientific Linux, Debian, Ubuntu, openSUSE, FreeBSD: http://www.iredmail.org/ From pratheeshrajan18 at gmail.com Wed Mar 7 06:24:49 2012 From: pratheeshrajan18 at gmail.com (Pratheesh Rajan) Date: Wed, 7 Mar 2012 10:54:49 +0530 Subject: [python-ldap] Pyhton Ldap Error Message-ID: Hi Group, I am getting a python ldap error Traceback (most recent call last): File "/appl/share/lookupservices/python/ldap_user_dl.py", line 172, in udp = UserDlMapper(logger=logger) File "/appl/share/lookupservices/python/ldap_user_dl.py", line 46, in _*init *_ self.page_results_control = SimplePagedResultsControl(ldap.LDAP_CONTROL_PAGE_OID, True, (self.conf ['page_size'], '')) AttributeError: 'module' object has no attribute 'LDAP_CONTROL_PAGE_OID' Looks like *LDAP_CONTROL_PAGE_OID*, this constant is removed. How to use that correctly. could any one help me please. Thanks in advance!! Pratheesh Rajan -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at stroeder.com Wed Mar 7 10:56:24 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 07 Mar 2012 10:56:24 +0100 Subject: [python-ldap] Pyhton Ldap Error In-Reply-To: References: Message-ID: <4F5730C8.6090802@stroeder.com> Pratheesh Rajan wrote: > I am getting a python ldap error > > Traceback (most recent call last): > File "/appl/share/lookupservices/python/ldap_user_dl.py", line 172, in > udp = UserDlMapper(logger=logger) > File "/appl/share/lookupservices/python/ldap_user_dl.py", line 46, in _/init/_ > self.page_results_control = > SimplePagedResultsControl(ldap.LDAP_CONTROL_PAGE_OID, True, > (self.conf['page_size'], '')) > AttributeError: 'module' object has no attribute 'LDAP_CONTROL_PAGE_OID' I guess your code was written for python-ldap 2.3.x and you're now using python-ldap 2.4.x. Which exact version are you using? > How to use that correctly. could any one help me please. In 2.4 there have been changes in the API for LDAPv3 extended controls. Please see Demo/page_control.py (and Demo/paged_search_ext_s.py) how to use the simple paged control with 2.4. Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2317 bytes Desc: S/MIME Cryptographic Signature URL: From michael at stroeder.com Sat Mar 10 14:32:34 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Sat, 10 Mar 2012 14:32:34 +0100 Subject: [python-ldap] Please test ReconnectLDAPObject Message-ID: <4F5B57F2.7020101@stroeder.com> HI! Anyone making use of class ReconnectLDAPObject should re-test with CVS HEAD which contains kind of a locking to prevent multiple threads to do a reconnect. Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2317 bytes Desc: S/MIME Cryptographic Signature URL: From michael at stroeder.com Tue Mar 13 20:25:15 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Tue, 13 Mar 2012 20:25:15 +0100 Subject: [python-ldap] Please test ReconnectLDAPObject In-Reply-To: <4F5B57F2.7020101@stroeder.com> References: <4F5B57F2.7020101@stroeder.com> Message-ID: <4F5F9F1B.9030006@stroeder.com> Michael Str?der wrote: > Anyone making use of class ReconnectLDAPObject should re-test with CVS HEAD > which contains kind of a locking to prevent multiple threads to do a reconnect. Check in other small changes made to ReconnectLDAPObject for more robustness. Please test! Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2317 bytes Desc: S/MIME Cryptographic Signature URL: From michael at stroeder.com Wed Mar 14 20:57:48 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 14 Mar 2012 20:57:48 +0100 Subject: [python-ldap] ANN: python-ldap 2.4.9 Message-ID: <4F60F83C.30708@stroeder.com> Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.8 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). Project's web site: http://www.python-ldap.org/ Ciao, Michael. ---------------------------------------------------------------- Released 2.4.9 2012-03-14 Changes since 2.4.8: Lib/ * ldapobject.ReconnectLDAPObject.reconnect() now does kind of an internal locking to pause other threads while reconnecting is pending. * Changes to bind- and startTLS-related operation methods of class ReconnectLDAPObject for more robustness * New constant ldap.OPT_NAMES_DICT contains mapping from integer to variable name for all option-related constants. From michael at stroeder.com Wed Mar 14 20:59:10 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 14 Mar 2012 20:59:10 +0100 Subject: [python-ldap] ANN: python-ldap 2.4.9 In-Reply-To: <4F60F83C.30708@stroeder.com> References: <4F60F83C.30708@stroeder.com> Message-ID: <4F60F88E.2000709@stroeder.com> Michael Str?der wrote: > Find a new release of python-ldap: > > http://pypi.python.org/pypi/python-ldap/2.4.8 Hmmpf! Obviously the download link should be http://pypi.python.org/pypi/python-ldap/2.4.9 Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2317 bytes Desc: S/MIME Cryptographic Signature URL: From michael at stroeder.com Wed Mar 14 21:18:14 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Wed, 14 Mar 2012 21:18:14 +0100 Subject: [python-ldap] please test openSUSE package repository Message-ID: <4F60FD06.7070405@stroeder.com> HI! I'm currently playing with the SuSE build service. Please test the openSUSE and SLES packages and provide feedback. http://download.opensuse.org/repositories/home:/stroeder:/branches:/devel:/languages:/python/ The Fedora/RedHat/CentOS-Builds do not work at the moment. Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2317 bytes Desc: S/MIME Cryptographic Signature URL: From hhassan at noorgroup.net Sun Mar 18 13:37:43 2012 From: hhassan at noorgroup.net (Haitham Hassan) Date: Sun, 18 Mar 2012 12:37:43 -0000 Subject: [python-ldap] python_ldap installation Message-ID: <02c501ccd52a$1a51c150$4ef543f0$@net> Hi All, I asked if anyone can help me to install and configure python-ldap for moinmoin, moinmoin version is 1.9.3 Python version is 2.7 I already installed the package using: Apt-get install python-ldap I appreciate the support Thanks Haitham From michael at stroeder.com Sun Mar 18 15:28:40 2012 From: michael at stroeder.com (=?ISO-8859-1?Q?Michael_Str=F6der?=) Date: Sun, 18 Mar 2012 15:28:40 +0100 Subject: [python-ldap] python_ldap installation In-Reply-To: <02c501ccd52a$1a51c150$4ef543f0$@net> References: <02c501ccd52a$1a51c150$4ef543f0$@net> Message-ID: <4F65F118.4000505@stroeder.com> Haitham Hassan wrote: > I asked if anyone can help me to install and configure python-ldap for > moinmoin, moinmoin version is 1.9.3 > Python version is 2.7 > > I already installed the package using: > > Apt-get install python-ldap I know nothing about moinmoin at all. Did you try to follow the instructions here? http://moinmo.in/MoinMoinQuestions/Authentication#How_do_I_implement_LDAP_authentication What error messages do you see in the logs? Ciao, Michael. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2317 bytes Desc: S/MIME Cryptographic Signature URL: