Steps to reproduce:
>>> from ipapython.dnsutil import DNSName
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/ipapython/dnsutil.py", line 74, in ToASCII
return self.to_text().decode('ascii') # must be unicode string
AttributeError: 'str' object has no attribute 'decode'
This works with python2.
This ticket is out of scope of 4.4.0 release. Moving to 4.4.1. Note that 4.4.1 needs to be triaged, therefore not everything will be implemented.
This was fixed in master branch of dnspython https://github.com/rthalley/dnspython/blob/master/dns/name.py#L375
s = b'.'.join(map(_escapify, l))
Now, it always returns binary string so this should be always decoded, because IPA internals need punycoded string decoded to unicode.
Keeping as tracker until a new dnspython is released
Moving to next major version. Fixing this bug is not critical in stabilization release.
JFTR: it looks that dnspython changed implementation again, so proposed fix, don't do anything, doesn't work anymore.
Metadata Update from @dkupka:
- Issue assigned to mbasti
- Issue set to the milestone: FreeIPA 4.5
to comment on this ticket.