Public bug reported: Summary: the package ldaptor is shipping version 0.0.43, which is from ~2006 (14 years old already). The twisted version from the repos is 16.0.0 (~2016).
The release of Ubuntu I am using is Ubuntu 16.04.6 LTS. The version of the package I am using is 0.0.43+debian1-7. What I've expected to happen: 1. Installed the latest available python-ldaptor and latest available python-twisted-core packages (it's installed automatically as a dependency). 2. Tried the example server and client code from https://ldaptor.readthedocs.io/en/latest/quickstart.html (attached the code examples just in case) 3. Example client and server interacts properly, without errors What happened instead: 2020-02-07 14:15:50+0000 [-] Log opened. 2020-02-07 14:15:50+0000 [-] LDAPServerFactory starting on 8080 2020-02-07 14:15:50+0000 [-] Starting factory <__main__.LDAPServerFactory instance at 0x7f310257bc68> 2020-02-07 14:16:10+0000 [LDAPServer,0,127.0.0.1] Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 101, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) --- <exception caught here> --- File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 597, in _doReadOrWrite why = selectable.doRead() File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 209, in doRead return self._dataReceived(data) File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 215, in _dataReceived rval = self.protocol.dataReceived(data) File "/usr/lib/python2.7/dist-packages/ldaptor/protocols/ldap/ldapserver.py", line 52, in dataReceived self.handle(o) File "/usr/lib/python2.7/dist-packages/ldaptor/protocols/ldap/ldapserver.py", line 114, in handle log.debug('S<-C %s' % repr(msg)) exceptions.AttributeError: 'module' object has no attribute 'debug' Steps to reproduce: 1. Run apt-get install python-ldaptor 2. Download the example server.py and client.py (or copy-paste them from https://ldaptor.readthedocs.io/en/latest/quickstart.html) 3. Run python2 server.py 4. Run python2 client.py Additional information: As far as I can see the package ldaptor is 0.0.43, which is from 2006 (14 years old already, info taken from https://changelogs.ubuntu.com/changelogs/pool/universe/l/ldaptor/ldaptor_0.0.43+debian1-7/changelog), and the latest python-twisted version is 16.0.0 (from the repos), which is first seen at 2016 in the repos (https://changelogs.ubuntu.com/changelogs/pool/main/t/twisted/twisted_16.0.0-1ubuntu0.2/changelog). So, we have at least 10 years of inconsistency between ldaptor and twisted. As for now, ldaptor uses log.msg() instead of log.debug(), which is simply not available in modern twisted, as can be seen in the same code part from the modern version of ldaptor: https://github.com/twisted/ldaptor/blob/master/ldaptor/protocols/ldap/ldapserver.py#L120, and that is the source of the exception. So, please, update the ldaptor to the modern one. Even the examples are not working with such an old version now. ** Affects: ldaptor (Ubuntu) Importance: Undecided Status: New ** Attachment added: "Example code from https://ldaptor.readthedocs.io/en/latest/quickstart.html" https://bugs.launchpad.net/bugs/1862367/+attachment/5326262/+files/example.tar.gz -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1862367 Title: The package version is too old to work with relatively modern Twisted To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ldaptor/+bug/1862367/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs