[Pki-devel] [PATCH 022] Modernize for Python 3 support

Endi Sukma Dewata edewata at redhat.com
Fri Aug 14 22:36:29 UTC 2015


On 8/14/2015 10:03 AM, Christian Heimes wrote:
> And now with attachment.
>
> I also attached a 2nd patch that fixes the one unit test under Python 3.
>
> Christian

Some comments:

1. Build works on F22, but fails on F21:

************* Module pylint-build-scan
I: 33, 0: Locally disabling import-error (F0401) (locally-disabled)
************* Module pki
I: 33, 0: Locally disabling redefined-builtin (W0622) (locally-disabled)
I:127, 0: Locally disabling too-few-public-methods (R0903) 
(locally-disabled)
I:141, 0: Locally disabling too-few-public-methods (R0903) 
(locally-disabled)
I:149, 0: Locally disabling invalid-name (C0103) (locally-disabled)
I:161, 0: Locally disabling invalid-name (C0103) (locally-disabled)
F: 33, 0: Unable to import 'six.moves' (import-error)
************* Module pki.encoder
I: 36, 0: Locally disabling method-hidden (E0202) (locally-disabled)
************* Module pki.profile
I:1361, 0: Locally disabling broad-except (W0703) (locally-disabled)
I:1398, 0: Locally disabling broad-except (W0703) (locally-disabled)
************* Module pki.key
I: 34, 0: Locally disabling no-name-in-module (E0611) (locally-disabled)
I: 36, 0: Locally disabling no-name-in-module (E0611) (locally-disabled)
I: 43, 0: Locally disabling too-few-public-methods (R0903) 
(locally-disabled)
I: 54, 0: Locally disabling too-few-public-methods (R0903) 
(locally-disabled)
I: 66, 0: Locally disabling invalid-name (C0103) (locally-disabled)
I:118, 0: Locally disabling invalid-name (C0103) (locally-disabled)
I:150, 0: Locally disabling too-few-public-methods (R0903) 
(locally-disabled)
I:186, 0: Locally disabling invalid-name (C0103) (locally-disabled)
I:222, 0: Locally disabling too-few-public-methods (R0903) 
(locally-disabled)
I:258, 0: Locally disabling invalid-name (C0103) (locally-disabled)
F: 34, 4: Unable to import 'urllib.parse' (import-error)
************* Module pki.upgrade
I:545, 0: Locally disabling exec-used (W0122) (locally-disabled)
I:632, 0: Locally disabling broad-except (W0703) (locally-disabled)
I:699, 0: Locally disabling broad-except (W0703) (locally-disabled)
************* Module pki.server.cli.migrate
I:166, 0: Locally disabling protected-access (W0212) (locally-disabled)
I:279, 0: Locally disabling protected-access (W0212) (locally-disabled)
************* Module pki.server.cli.instance
I:327, 0: Locally disabling no-member (E1101) (locally-disabled)
I:327, 0: Locally disabling maybe-no-member (E1103) (locally-disabled)
I:383, 0: Locally disabling no-member (E1101) (locally-disabled)
I:383, 0: Locally disabling maybe-no-member (E1103) (locally-disabled)
I:439, 0: Locally disabling no-member (E1101) (locally-disabled)
I:439, 0: Locally disabling maybe-no-member (E1103) (locally-disabled)
************* Module pki.server.deployment.pkiparser
I: 36, 0: Locally disabling no-name-in-module (E0611) (locally-disabled)
I: 38, 0: Locally disabling import-error (F0401) (locally-disabled)
I: 40, 0: Locally disabling redefined-builtin (W0622) (locally-disabled)
I:362, 0: Locally disabling no-member (E1101) (locally-disabled)
I:377, 0: Locally disabling no-member (E1101) (locally-disabled)
F: 36, 4: Unable to import 'urllib.parse' (import-error)
F: 40, 0: Unable to import 'six.moves' (import-error)
F: 41, 0: Unable to import 'six.moves' (import-error)
************* Module pki.server.deployment.pkiscriptlet
I: 36, 0: Locally disabling unused-argument (W0613) (locally-disabled)
W: 29, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.pkihelper
I: 35, 0: Locally disabling no-name-in-module (E0611) (locally-disabled)
I:1091, 0: Locally disabling broad-except (W0703) (locally-disabled)
I:2978, 0: Locally disabling broad-except (W0703) (locally-disabled)
I:2999, 0: Locally disabling broad-except (W0703) (locally-disabled)
I:3903, 0: Locally disabling no-member (E1101) (locally-disabled)
************* Module pki.server.deployment.pkiconfig
I: 25, 0: Locally disabling redefined-builtin (W0622) (locally-disabled)
F: 25, 0: Unable to import 'six.moves' (import-error)
************* Module pki.server.deployment.scriptlets.security_databases
W: 31, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.webapp_deployment
W: 33, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.instance_layout
W: 33, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.finalization
W: 32, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.infrastructure_layout
W: 32, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.subsystem_layout
W: 31, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.selinux_setup
W: 36, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.slot_substitution
W: 31, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.initialization
W: 31, 0: Class has no __init__ method (no-init)
************* Module pki.server.deployment.scriptlets.configuration
W: 34, 0: Class has no __init__ method (no-init)
I: 83, 0: Locally disabling unused-argument (W0613) (locally-disabled)
************* Module pkispawn
I: 58, 0: Locally disabling unused-argument (W0613) (locally-disabled)
I:602, 0: Locally disabling broad-except (W0703) (locally-disabled)
************* Module pkidestroy
I: 55, 0: Locally disabling unused-argument (W0613) (locally-disabled)
************* Module pki-upgrade
I: 31, 0: Locally disabling unused-argument (W0613) (locally-disabled)
************* Module pki-server-upgrade
I: 33, 0: Locally disabling unused-argument (W0613) (locally-disabled)
************* Module 01-RemoveInaccessableURLsFromServerXML
I: 34, 0: Locally disabling anomalous-backslash-in-string (W1401) 
(locally-disabled)
************* Module 01-AddKraAuditEvents
I: 48, 0: Locally disabling unused-argument (W0613) (locally-disabled)

2. In "Manually fix import problems and access to Exception.message" you 
replaced e.message['desc'] with e.args[0]['desc']. I suppose the code 
works fine, but it's kind of strange that we'd have to use a more 
cryptic code. Are there other alternatives?

Everything else looks fine. Thanks for the clarification about list().

-- 
Endi S. Dewata




More information about the Pki-devel mailing list