[Freeipa-devel] [PATCHES] 0691-0695 Modernization

Petr Viktorin pviktori at redhat.com
Mon Aug 10 15:39:29 UTC 2015


On 08/03/2015 11:07 AM, Christian Heimes wrote:
> On 2015-07-31 19:14, Petr Viktorin wrote:
>> Hello,
>> Here is a batch of mostly mechanical changes: removing deprecated
>> features to prepare for Python 3.
> 
> Out of curiosity, what tool did you use for patch 695-absolute-imports?
> Python-modernize adds from __future__ import absolute_imports and
> changes imports to explicit relative imports.

I used modernize to find all the occurences, and fixed imports by hand.
Most of IPA uses absolute imports, as recommended by PEP 8.

> In patch 693 you have removed test cases for CIDict.has_key(), but
> CIDict still provides the function. You should either keep the tests
> around or remove has_key() from CIDict.

I haven't removed them: "test_haskey" is only skipped under Python 3. I
assumed that's enough to verify that `has_key` works well (i.e. the same
as `in`), so in the other tests I do use `in` instead.

I'm attaching updated patches, under Python 3 they remove CIDict.has_key
a bit more formally. They're also rebased.

> The rest looks good to me, but I haven't studied every change
> thoroughly. It's just too much.

Anything I can do to help?

-- 
Petr Viktorin



-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0691.2-Modernize-except-clauses.patch
Type: text/x-patch
Size: 273857 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/9de0e99e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0692.2-Modernize-function-and-method-attribute-names.patch
Type: text/x-patch
Size: 5820 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/9de0e99e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0693.2-Replace-dict.has_key-with-the-in-operator.patch
Type: text/x-patch
Size: 17933 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/9de0e99e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0694.2-Import-reduce-from-functools.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/9de0e99e/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0695.2-Use-absolute-imports.patch
Type: text/x-patch
Size: 46030 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150810/9de0e99e/attachment-0004.bin>


More information about the Freeipa-devel mailing list