#43 python3: improve Python 3.x compatibility
Merged by cqi. Opened by pavlix.
pavlix/fedpkg python3  into  master

Download 43.patch

Fix a relative import. With this patch
and the respective patches in other packages I can successfully
run at least some 'fedpkg' commands.

Signed-off-by: Pavel Šimerda pavlix@pavlix.net

See also:

https://pagure.io/rpkg/pull-request/90

This commit is fairly trivial and makes fedpkg Python 3.x compatible. Please merge.

Relative import is needed with Python 3.x.

Warning: Could not install krbV module. Kerberos support will be disabled.
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 54, in <module>
    exec(data)
  File "<string>", line 13, in <module>
  File "/usr/lib64/python3.4/site-packages/fedpkg/__init__.py", line 14, in <module>
    import cli
ImportError: No module named 'cli'

Is this import even needed? Nothing in __init__.py is using any name imported from it.

I tried removing it. The result is below. Maybe there's a better solution but for now I'm sticking with this patch.

$ fedpkg verrel
Warning: Could not install krbV module. Kerberos support will be disabled.
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/fedpkg", line 16, in <module>
    main()
  File "/usr/lib64/python3.4/site-packages/fedpkg/__main__.py", line 47, in main
    client = fedpkg.cli.fedpkgClient(config)
AttributeError: 'module' object has no attribute 'cli'

You're right, it is needed just so that it could imported from here as well. Patch looks good to me.

Pull-Request has been merged by cqi

Thanks. Merged.

Metadata