Skip to content

urlfetch from LDAP is broken on Python 2.7 #54

@tiran

Description

@tiran

See PR #52 for a reproducer

======================================================================
ERROR: test_urlfetch_ldap (Tests.t_ldap_schema_subentry.TestSubschemaUrlfetchSlapd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python-ldap/python-ldap/Tests/t_ldap_schema_subentry.py", line 87, in test_urlfetch_ldap
    dn, schema = ldap.schema.urlfetch(self.server.ldap_uri)
  File "/home/travis/build/python-ldap/python-ldap/Lib/ldap/schema/subentry.py", line 462, in urlfetch
    l.simple_bind_s(ldap_url.who or '', ldap_url.cred or '')
  File "/home/travis/build/python-ldap/python-ldap/Lib/ldap/ldapobject.py", line 409, in simple_bind_s
    msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
  File "/home/travis/build/python-ldap/python-ldap/Lib/ldap/ldapobject.py", line 402, in simple_bind
    who, cred = self._bytesify_inputs(who, cred)
  File "/home/travis/build/python-ldap/python-ldap/Lib/ldap/ldapobject.py", line 147, in <genexpr>
    for value in values
  File "/home/travis/build/python-ldap/python-ldap/Lib/ldap/ldapobject.py", line 131, in _bytesify_input
    raise TypeError("All provided fields *must* be text when bytes mode is off; got %r" % (value,))
TypeError: All provided fields *must* be text when bytes mode is off; got ''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy