|
From: Michael <mi...@st...> - 2001-11-13 14:22:08
|
HI! As already announced I'd like to contribute some of my LDAP-related Python modules to python-ldap. But I don't want to pollute the module name space with a lot of separate names. Therefore I'd suggest that we turn the module ldap into a directory-based module package adding more sub-modules later. ldap/__init__.py would import all symbols from _ldap for the sake of backward compability (like ldap.py already does today). Comments? Ciao, Michael. |
|
From: Rich S. <rs...@zo...> - 2001-11-13 14:26:35
|
+1 -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com |
|
From: Federico Di G. <fo...@de...> - 2001-11-13 14:37:26
|
On Tue, 2001-11-13 at 14:34, Michael Str=F6der wrote:
> HI!
>=20
> As already announced I'd like to contribute some of my LDAP-related
> Python modules to python-ldap.
>=20
> But I don't want to pollute the module name space with a lot of
> separate names. Therefore I'd suggest that we turn the module ldap
> into a directory-based module package adding more sub-modules later.
>=20
> ldap/__init__.py would import all symbols from _ldap for the sake of
> backward compability (like ldap.py already does today).
>=20
> Comments?
perfect. my work and other projects (psycopg notably) suck-up all my
time. just relegate my code under a dir, i'll update it when i'll have
some more time.
ciao,
federico (currently fighting with apache auth_ldap)
--=20
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact fo...@de...
INIT.D Developer fo...@in...
Best friends are often failed lovers. -- Me
|
|
From: Jacek K. <ja...@bn...> - 2001-11-13 15:04:37
|
On Tue, Nov 13, 2001 at 02:34:59PM +0100, Michael Str=F6der wrote:
> Comments?
Sounds like a good idea.
Greets,
Jacek
|
|
From: Konstantin C. <Kon...@da...> - 2001-11-13 15:18:26
|
Michael StrЖder wrote:
> As already announced I'd like to contribute some of my LDAP-related
> Python modules to python-ldap.
>
> But I don't want to pollute the module name space with a lot of
> separate names. Therefore I'd suggest that we turn the module ldap
> into a directory-based module package adding more sub-modules later.
>
> ldap/__init__.py would import all symbols from _ldap for the sake of
> backward compability (like ldap.py already does today).
>
Good idea!
Thank you Michael and all who brought python-ldap development back to life
recently! Unfortunately I do not have time to spend on it nowadays.
Regards,
Konstantin.
--
* * Konstantin Chuguev Francis House
* * Application Engineer 112 Hills Road
* Tel: +44 1223 302992 Cambridge CB2 1PQ
D A N T E WWW: http://www.dante.net United Kingdom
|
|
From: Michael <mi...@st...> - 2001-12-15 20:03:58
|
Michael Ströder wrote: > > As already announced I'd like to contribute some of my LDAP-related > Python modules to python-ldap. > > But I don't want to pollute the module name space with a lot of > separate names. Therefore I'd suggest that we turn the module ldap > into a directory-based module package adding more sub-modules later. > > ldap/__init__.py would import all symbols from _ldap for the sake of > backward compability (like ldap.py already does today). > > Comments? Hmm, following-up on my own request. After checking in some of my modules below Lib/ldap/ I noticed a serious drawback: All modules are dependent on availability of OpenLDAP 2 libs if located under Lib/ldap/ because of the "from _ldap import *" done in Lib/ldap/__init__.py. But I'm also using some of my modules separately on platforms where the OpenLDAP 2 libs are not available. This affects mostly the modules ldapurl, ldif, upcoming module dsml and upcoming module containing generic filter classes. The only solution I have at the moment is to make a new directory-based module package under Lib/ or a new project. Any opinions? Ciao, Michael. |
|
From: Jacek K. <ja...@bn...> - 2001-12-15 20:19:54
|
On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Str=F6der wrote:
> After checking in some of my modules below Lib/ldap/ I noticed a
> serious drawback:
> All modules are dependent on availability of OpenLDAP 2 libs if
> located under Lib/ldap/ because of the "from _ldap import *" done in
> Lib/ldap/__init__.py.
>=20
[...]
>=20
> Any opinions?
Maybe you could put "from _ldap import *" in some "try:/except:" block.
Greets,
Jacek
|
|
From: Michael <mi...@st...> - 2001-12-15 20:37:04
|
Jacek Konieczny wrote: > > On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Ströder wrote: > > After checking in some of my modules below Lib/ldap/ I noticed a > > serious drawback: > > All modules are dependent on availability of OpenLDAP 2 libs if > > located under Lib/ldap/ because of the "from _ldap import *" done in > > Lib/ldap/__init__.py. > > > [...] > > > > Any opinions? > > Maybe you could put "from _ldap import *" in some "try:/except:" block. I already thought of that. But this makes error reports about importing problems somewhat harder. E.g. if linking of shared libs fails it's much more useful to have the original traceback instead of e.g. a NameError exception afterwards. That's not good style. Ciao, Michael. |
|
From: Joe L. <jl...@op...> - 2001-12-15 21:27:16
|
Go one step further and use the try:except: with a variable.. ie, under som= e condition (such as a no_openldap def), do the try:except:.. otherwise, normal import On 12/15/01 12:31 PM, "Michael Str=F6der" <mi...@st...> wrote: > Jacek Konieczny wrote: >>=20 >> On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Str=F6der wrote: >>> After checking in some of my modules below Lib/ldap/ I noticed a >>> serious drawback: >>> All modules are dependent on availability of OpenLDAP 2 libs if >>> located under Lib/ldap/ because of the "from _ldap import *" done in >>> Lib/ldap/__init__.py. >>>=20 >> [...] >>>=20 >>> Any opinions? >>=20 >> Maybe you could put "from _ldap import *" in some "try:/except:" block. >=20 > I already thought of that. But this makes error reports about > importing problems somewhat harder. E.g. if linking of shared libs > fails it's much more useful to have the original traceback instead > of e.g. a NameError exception afterwards. That's not good style. >=20 > Ciao, Michael. >=20 > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev |
|
From: Michael <mi...@st...> - 2001-12-15 21:41:27
|
Joe Little wrote: > > Go one step further and use the try:except: with a variable.. ie, under some > condition (such as a no_openldap def), do the try:except:.. otherwise, > normal import You mean a variable in the module's name space? Hmm, that would have to be set by the installing routine, DistUtils in our case. Ciao, Michael. |
|
From: Jeffrey C. O. <je...@ol...> - 2001-12-15 22:25:58
|
On Sat, Dec 15, 2001 at 09:31:25PM +0100, Michael Ströder wrote:
> Jacek Konieczny wrote:
> >
> > On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Ströder wrote:
> > > After checking in some of my modules below Lib/ldap/ I noticed a
> > > serious drawback:
> > > All modules are dependent on availability of OpenLDAP 2 libs if
> > > located under Lib/ldap/ because of the "from _ldap import *" done in
> > > Lib/ldap/__init__.py.
> > >
> > [...]
> > >
> > > Any opinions?
> >
> > Maybe you could put "from _ldap import *" in some "try:/except:" block.
>
> I already thought of that. But this makes error reports about
> importing problems somewhat harder. E.g. if linking of shared libs
> fails it's much more useful to have the original traceback instead
> of e.g. a NameError exception afterwards. That's not good style.
What about something like:
import sys
_ldap_import_exception = (None, None, None)
try:
from _ldap import *
except ImportError:
_ldap_import_exception = sys.exc_info()
Jeff
|
|
From: Michael <mi...@st...> - 2001-12-15 22:36:08
|
"Jeffrey C. Ollie" wrote: > > On Sat, Dec 15, 2001 at 09:31:25PM +0100, Michael Ströder wrote: > > Jacek Konieczny wrote: > > > > > > On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Ströder wrote: > > > > After checking in some of my modules below Lib/ldap/ I noticed a > > > > serious drawback: > > > > All modules are dependent on availability of OpenLDAP 2 libs if > > > > located under Lib/ldap/ because of the "from _ldap import *" done in > > > > Lib/ldap/__init__.py. > > > > > > > [...] > > > > > > > > Any opinions? > > > > > > Maybe you could put "from _ldap import *" in some "try:/except:" block. > > > > I already thought of that. But this makes error reports about > > importing problems somewhat harder. E.g. if linking of shared libs > > fails it's much more useful to have the original traceback instead > > of e.g. a NameError exception afterwards. That's not good style. > > What about something like: > > import sys > _ldap_import_exception = (None, None, None) > try: > from _ldap import * > except ImportError: > _ldap_import_exception = sys.exc_info() Well, then it's easier to tell somebody to do a $ python -c "import _ldap" to track down problems. Another issue I forgot to mention so far is that I can't reuse constants of _ldap if importing it fails. I have to define them separately anyway. Hmm, I think I will stick with a separate module package. Ciao, Michael. |
|
From: <don...@ma...> - 2001-12-28 17:27:26
|
Hey there,
I'm having a similar problem at the moment...
OpenLDAP 2.0.18 (openldap-stable-20011102.tgz)
CVS copy of python-ldap (checked out today in the past 4 hours)
Linux box
trying to do a simple open and getting:
-------------------------------------------------------
Traceback (most recent call last):
File "./ldap_connect", line 7, in ?
import _ldap
ImportError: /usr/local/lib/libldap.so.2: undefined symbol: res_query
-------------------------------------------------------
What I'm guessing is that the CVS copy I checked out isn't stable, or is
calling something that no longer exists in OpenLDAP libs or something...
Can someone confirm this is likely to be the problem... If you need more
details just shout... :)
Thanks
Donal
>-- Original Message --
>From: Michael Str=F6der <mi...@st...>
>Reply-To: mi...@st...
>To: "Jeffrey C. Ollie" <je...@ol...>
>Cc: python-ldap-dev <pyt...@li...>
>Subject: Re: Python parts of module ldap
>Date: Sat, 15 Dec 2001 23:35:48 +0100
>
>
>"Jeffrey C. Ollie" wrote:
>>
>> On Sat, Dec 15, 2001 at 09:31:25PM +0100, Michael Str=F6der wrote:
>> > Jacek Konieczny wrote:
>> > >
>> > > On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Str=F6der wrote:=
>> > > > After checking in some of my modules below Lib/ldap/ I noticed
a
>> > > > serious drawback:
>> > > > All modules are dependent on availability of OpenLDAP 2 libs if
>> > > > located under Lib/ldap/ because of the "from _ldap import *" don=
e
>in
>> > > > Lib/ldap/__init__.py.
>> > > >
>> > > [...]
>> > > >
>> > > > Any opinions?
>> > >
>> > > Maybe you could put "from _ldap import *" in some "try:/except:"
block.
>> >
>> > I already thought of that. But this makes error reports about
>> > importing problems somewhat harder. E.g. if linking of shared libs
>> > fails it's much more useful to have the original traceback instead
>> > of e.g. a NameError exception afterwards. That's not good style.
>>
>> What about something like:
>>
>> import sys
>> _ldap_import_exception =3D (None, None, None)
>> try:
>> from _ldap import *
>> except ImportError:
>> _ldap_import_exception =3D sys.exc_info()
>
>Well, then it's easier to tell somebody to do a
>
>$ python -c "import _ldap"
>
>to track down problems.
>
>Another issue I forgot to mention so far is that I can't reuse
>constants of _ldap if importing it fails. I have to define them
>separately anyway.
>
>Hmm, I think I will stick with a separate module package.
>
>Ciao, Michael.
>
>_______________________________________________
>Python-LDAP-dev mailing list
>Pyt...@li...
>https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
|
|
From: Michael <mi...@st...> - 2001-12-28 19:16:50
|
don...@ma... wrote: > > ImportError: /usr/local/lib/libldap.so.2: undefined symbol: res_query On which system are you building python-ldap? I believe you have to explicitly link libresolv. Tweak setup.cfg to contain this line: libs = lber ldap resolv Ciao, Michael. |
|
From: <don...@ma...> - 2001-12-29 15:26:06
|
Michael, System is a Suse Linux install on a S390 VM! donal@myVMbox:~ > uname -a Linux myVMbox 2.2.16 #1 SMP Wed Nov 8 10:57:03 GMT 2000 s390 unknown The tweak below sorted the problem. Nice one. Regards Donal >-- Original Message -- >Date: Fri, 28 Dec 2001 20:17:34 +0100 >From: Michael Str=F6der <mi...@st...> >Reply-To: mi...@st... >To: don...@ma... >Cc: python-ldap-dev <pyt...@li...> >Subject: Re: Python parts of module ldap > > >don...@ma... wrote: >> >> ImportError: /usr/local/lib/libldap.so.2: undefined symbol: res_query > >On which system are you building python-ldap? > >I believe you have to explicitly link libresolv. >Tweak setup.cfg to contain this line: > >libs =3D lber ldap resolv > >Ciao, Michael. |