Description of problem: python3-pyldap version in Fedora 26 is too old and is not fully python3-compatible. Version-Release number of selected component (if applicable): python3-pyldap-2.4.25.1-2.fc25.x86_64 How reproducible: All the time. Steps to Reproduce: 1. python3 -c "import ldap; ldap.schema.subentry.urlfetch('file:///iamgreat.ldif')" Actual results: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python3.5/site-packages/ldap/schema/subentry.py", line 478, in urlfetch ldif_file = urllib.urlopen(uri) AttributeError: module 'urllib' has no attribute 'urlopen' Expected results: Some kind of exception that a file does not exist/proper processing of the file if you're really the person who would have such a file. Additional info: This also applies for Fedora 25 but I guess that one is lost so I would like to have this fixed at least in 26. It breaks FreeIPA in python3. For the record, this was fixed upstream: https://github.com/pyldap/pyldap/commit/378b13c8361a12dc655146f2cd91f28bbe257599
Once the above is worked around, there is yet another python3 incompatibility: File "/usr/lib64/python3.5/site-packages/ldap/schema/subentry.py", line 480, in urlfetch ldif_parser = ldif.LDIFRecordList(ldif_file,max_entries=1) File "/usr/lib64/python3.5/site-packages/ldif.py", line 535, in __init__ LDIFParser.__init__(self,input_file,ignored_attr_types,max_entries,process_url_schemes) File "/usr/lib64/python3.5/site-packages/ldif.py", line 294, in __init__ self._line = self._readline() File "/usr/lib64/python3.5/site-packages/ldif.py", line 307, in _readline if s[-2:]=='\r\n': BytesWarning: Comparison between bytes and string which is fixed upstream in https://github.com/pyldap/pyldap/commit/39a31ba755ff91c2f0ffa8ced713da32f6ed4cf1 which is further fixed in https://github.com/pyldap/pyldap/commit/1b4da37305dc29a60bacb11e317bcd004400cd78 for non-standard situations.
A F26 scratch build with the latest release: https://koji.fedoraproject.org/koji/taskinfo?taskID=19780394 Let me know if that fixes it. Also, if you wish to backport the fixes to F25, please do.
Miro, Thank you. In the meantime, I made an own copr build for Fedora 25/26, too (I believe we're using the same sources), and found one more bytes-unicode comparison which was not yet fixed upstream and is also contained in your package. Please, see https://github.com/pyldap/pyldap/pull/96/files, it's an easy one-liner. Nonetheless, I could probably live with your build should we not decide to go with the ^-- PR.
Let's wait a bit for the response for the above PR.
With your patch https://koji.fedoraproject.org/koji/taskinfo?taskID=19780641
Let me know and if it works for you, I'll build it in rawhide and F26.
It does work, thanks for the brief action.
https://koji.fedoraproject.org/koji/taskinfo?taskID=19782510
python-pyldap-2.4.35.1-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-beaa317f1d
python-pyldap-2.4.35.1-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-beaa317f1d
python-pyldap-2.4.35.1-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.