[Freeipa-devel] [PATCHES] More Python 3 porting

Petr Viktorin pviktori at redhat.com
Fri Oct 2 11:09:14 UTC 2015


On 10/01/2015 03:15 PM, Jan Cholasta wrote:
> Hi,
> 
> On 1.10.2015 13:01, Martin Basti wrote:
>>
>>
>> On 09/30/2015 10:25 AM, Petr Viktorin wrote:
>>> On 09/23/2015 04:46 PM, Petr Viktorin wrote:
>>>> On 09/22/2015 02:59 PM, David Kupka wrote:
>>>>> On 18/09/15 17:00, Petr Viktorin wrote:
>>>>>> Hello,
>>>>>> Here are more patches that bring IPA closer to Python 3
>>>>>> compatibility.
[...]
>>>
>> LGTM
>>
>> I ran xmlrpc tests, DNSSEC ci tests, backup and restore CI test and
>> everything works
> 
> Patches 713-719: ACK
> 
> 
> Patch 720:
> 
> You missed:
> 
> ipa-client/ipa-install/ipa-client-install:32:    from ConfigParser
> import RawConfigParser


Thanks, fixed.

> Patches 721-722: ACK
> 
> 
> Patch 723:
> 
> Why the "NoneType = type(None)" in parameters.py? It is used only at:
> 
> ipalib/parameters.py:388:    type = NoneType  # Ouch, this wont be very
> useful in the real world!

I believe this is less confusing than `type = type(None)`, but I can
change that if needed.

> Patch 724:
> 
> The SSHPublicKey class was written with the assumption that "str" means
> binary data, so unless I'm missing something, you only need to replace
> "str" with "bytes".

It specifically did take non-binary data as str:

-        if isinstance(key, str) and key[:3] != '\0\0\0':
-            key = key.decode(encoding)

I've removed this for Python 3, where text data shouldn't be in bytes.

Since this means the '\0\0\0' check is skipped in __init__ under Python
3, I've added it also to _parse_raw.

It's not necessary to dispatch to "_parse_raw" or "_parse_base64 or
_parse_openssh" based on type, but I believe this makes the control flow
clearer to follow.

> Patch 725: ACK


-- 
Petr Viktorin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0713.3-ipap11helper-Port-to-Python-3.patch
Type: text/x-patch
Size: 16522 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0714.3-rpc-Don-t-use-undocumented-urllib-functions.patch
Type: text/x-patch
Size: 1284 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0715.3-ipapython.dn-Use-rich-comparisons.patch
Type: text/x-patch
Size: 10236 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0716.3-test_dn-Split-bytes-and-unicode.patch
Type: text/x-patch
Size: 8225 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0717.3-Use-sys.maxsize-instead-of-sys.maxint.patch
Type: text/x-patch
Size: 3675 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0718.3-Use-six.moves.urllib-instead-of-urllib-urllib2-urlpa.patch
Type: text/x-patch
Size: 26145 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0719.3-Use-six.moves.xmlrpc.client-instead-of-xmlrpclib.patch
Type: text/x-patch
Size: 13249 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0720.3-Use-six.moves.configparser-instead-of-ConfigParser.patch
Type: text/x-patch
Size: 12096 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0721.3-Use-six.moves.http_client-instead-of-httplib.patch
Type: text/x-patch
Size: 3748 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0722.3-Use-six.Stringio-instead-of-StringIO.StringIO.patch
Type: text/x-patch
Size: 3978 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0723.3-Remove-uses-of-the-types-module.patch
Type: text/x-patch
Size: 12482 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0724.3-ipapython.ssh-Port-to-Python-3.patch
Type: text/x-patch
Size: 5547 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0725.3-Appease-pylint.patch
Type: text/x-patch
Size: 1277 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151002/5fb73845/attachment-0012.bin>


More information about the Freeipa-devel mailing list