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

Petr Viktorin pviktori at redhat.com
Wed Sep 23 14:46:35 UTC 2015


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.
>>
>>
>>
>>
> 
> Hi Petr,
> thanks for another batch of Python 3 compatibility patches.
> Unfortunately I hit a lot of pylint errors. Some of them are false
> positives for sure. Could you please look at them, mark the false
> positive with "pylint: disable=Exxxx" directive and fix the rest?
>
> http://fpaste.org/270090/92665414/
>

Thanks.
I'm actually having some trouble running pylint on an f23 machine; have
you seen this error before?

$ ./make-lint
Traceback (most recent call last):
  File "./make-lint", line 280, in <module>
    sys.exit(main())
  File "./make-lint", line 251, in main
    linter.check(files)
  File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 747, in check
    self._do_check(files_or_modules)
  File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 869, in
_do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 924, in
check_astroid_module
    tokens = utils.tokenize_module(ast_node)
  File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 137, in
tokenize_module
    with module.stream() as stream:
AttributeError: 'Module' object has no attribute 'stream'


Anyway, I've ran pylint on f21. Updated patches attached.


> And one nitpick, I believe that the plus signs are not needed.
> 
>> -        self.arabic_hello_utf8 = '\xd9\x85\xd9\x83\xd9\x8a\xd9\x84' + \
>> -                                 '\xd8\xb9\x20\xd9\x85\xd8\xa7\xd9' + \
>> -                                 '\x84\xd9\x91\xd8\xb3\xd9\x84\xd8\xa7'
>> +        self.arabic_hello_utf8 = (b'\xd9\x85\xd9\x83\xd9\x8a\xd9\x84' +
>> +                                  b'\xd8\xb9\x20\xd9\x85\xd8\xa7\xd9' +
>> +                                 
>> b'\x84\xd9\x91\xd8\xb3\xd9\x84\xd8\xa7')

No, but I don't think they hurt.


-- 
Petr Viktorin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0713.2-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/20150923/a4631987/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0714.2-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/20150923/a4631987/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0715.2-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/20150923/a4631987/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0716.2-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/20150923/a4631987/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0717.2-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/20150923/a4631987/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0718.2-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/20150923/a4631987/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0719.2-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/20150923/a4631987/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0720.2-Use-six.moves.configparser-instead-of-ConfigParser.patch
Type: text/x-patch
Size: 11450 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150923/a4631987/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0721.2-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/20150923/a4631987/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0722.2-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/20150923/a4631987/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0723.2-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/20150923/a4631987/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0724.2-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/20150923/a4631987/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0725.2-Appease-pylint.patch
Type: text/x-patch
Size: 1277 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150923/a4631987/attachment-0012.bin>


More information about the Freeipa-devel mailing list