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

David Kupka dkupka at redhat.com
Fri Oct 2 12:14:58 UTC 2015


On 23/09/15 16:46, 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.
>>>
>>>
>>>
>>>
>>
>> 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?

No, I've not seen any tracebacks with packaged pylint on F23. I hit a 
traceback when I was playing with latest pylint and astroid code.
But I'm almost certain that the cause was that make-lint uses pylint's 
internals and it changed slightly again.

>
> $ ./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.
>
>


-- 
David Kupka




More information about the Freeipa-devel mailing list