From hahn at univention.de Wed Jul 1 12:34:50 2020 From: hahn at univention.de (Philipp Hahn) Date: Wed, 1 Jul 2020 18:34:50 +0200 Subject: [python-ldap] PEP 484 -- Type Hints for python-ldap? In-Reply-To: <27699750-3141-4407-B34E-2AC8C9D06CC6@dataflake.org> References: <27699750-3141-4407-B34E-2AC8C9D06CC6@dataflake.org> Message-ID: <7c6acb79-ae30-f5b7-ba35-113a12970871@univention.de> Hello, Am 29.06.20 um 12:04 schrieb Jens Vagelpohl: >> On 29. Jun 2020, at 11:26 , Christian Heimes wrote: >> >> On 29/06/2020 10.04, Philipp Hahn wrote: >>> Sadly "python-ldap" does not yet seem to contain those annotations nor >>> am I aware of any project doing that. >> >> One personal note: >> I don't like how you phrased 'Sadly "python-ldap" does not yet seem to >> contain those annotations'. It feels like you are putting emotional >> pressure on us and shaming us for not providing more free labor. It was >> probably not your intention, but I still like to point out that the >> prase is problematic. > > > I am sure there wasn?t any specific negative intent here, but I am > 1000% behind your sentiment that many people have a serious lack of > appreciation for the work others do in their spare time. This issue > comes up again and again in the projects I help maintain. Sorry if my use of "sadly" put emotional pressure on you, that was not my intention. I use `mypy` a lot and for our product "Univention Corporate Server" (UCS) "python-ldap" plays an important role, so I/we very much appreciate the work you're doing. As we use "python-ldap" a lot, I get lots of "warnings" about missing types, so this was the part which made me sad. I/we have been contributing back to "python-ldap" in the past already and will still do so, which was my motivation to ask if - that work would be appreciated - someone other was already doing it as to not waste time on double implementing this. I have worked on adding those type annotation to other projects in the past, and they were gladly accepted by the "typeshed" project, but one of my other projects to add those annotations to "libvirt-python" is currently (and since some time) stalled, which is not that motivating. They were/are also currently in a transition to Python-3-only parallel to the switch from GitHub to GitLab, so the reasons are somehow known to me. Still it sucks. So Thank you all again for python-ldap, keep up the excellent work. Philipp Hahn PS: I'm getting payed to work on UCS, but contributing type annotation is not my main work and I do most of it in my unpaid overdue and spare times. From gsever at proofpoint.com Tue Aug 4 10:36:38 2020 From: gsever at proofpoint.com (Gilad Sever) Date: Tue, 4 Aug 2020 14:36:38 +0000 Subject: [python-ldap] Getting duplicate entries when calling a search to an Active Directory server Message-ID: Hi, When calling a search_ext() query to an AD server, I get inconsistent results. Each time I query I receive different amount of duplicate, identical group objects. E.g: I have 10 groups but I sometimes I get 12 - 2 groups twice. I query while filtering groups: (&(objectClass=group)(member=*)) I tried tweaking the parameters and oddly this happens only when asking for the "member" attribute (also when not sending any attributes which returns all the results. I captured the response before reaching the client and the server actually sends duplicate entires. This occurs with ldapsearch as well. If anyone experienced something familiar I would be glad to know if this is common with AD and if there is a way to avoid this. Thank you, Gilad. Gilad Sever Software Developer [cid:afc723c4-ae6d-4c4d-82e4-c02387e311fc] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Outlook-raak3fkv.png Type: image/png Size: 251328 bytes Desc: Outlook-raak3fkv.png URL: From william at blackhats.net.au Tue Aug 4 18:47:59 2020 From: william at blackhats.net.au (William Brown) Date: Wed, 5 Aug 2020 08:47:59 +1000 Subject: [python-ldap] Getting duplicate entries when calling a search to an Active Directory server In-Reply-To: References: Message-ID: <7EFEEF9A-1AE1-403B-A1FB-3821241ED0A0@blackhats.net.au> > On 5 Aug 2020, at 00:36, Gilad Sever via python-ldap wrote: > > Hi, > When calling a search_ext() query to an AD server, I get inconsistent results. > Each time I query I receive different amount of duplicate, identical group objects. Do you have referrals disabled? By default AD always sends referrals (including a referral to itself) which means the client (by default) follows them which could cause you to see the same object twice. > E.g: I have 10 groups but I sometimes I get 12 - 2 groups twice. > I query while filtering groups: (&(objectClass=group)(member=*)) > I tried tweaking the parameters and oddly this happens only when asking for the "member" attribute (also when not sending any attributes which returns all the results. > I captured the response before reaching the client and the server actually sends duplicate entires. > This occurs with ldapsearch as well. > If anyone experienced something familiar I would be glad to know if this is common with AD and if there is a way to avoid this. > Thank you, > Gilad. > > Gilad Sever > Software Developer > > _______________________________________________ > python-ldap mailing list > python-ldap at python.org > https://mail.python.org/mailman/listinfo/python-ldap -- Sincerely, William