#280 Porting to Python 3
Merged by cqi. Opened by cqi.
cqi/rpkg py3  into  master

Download 280.patch

Fix #45

Run tox to run tests with Python 2.7, 3.5 and 3.6. An known issue is rpm-py-installer does not work Python 2.6. It will be fixed. So, Test env 2.6 is not included in this PR.

The code change looks good to me. Trying to run the tox tests locally I'm however getting errors on Python 3 (both versions).


  File "/home/lsedlar/repos/rpkg/tests/test_cli.py", line 34, in <module>
    import utils
ModuleNotFoundError: No module named 'utils'

  File "/home/lsedlar/repos/rpkg/tests/test_commands.py", line 22, in <module>
    from utils import CommandTestCase
ModuleNotFoundError: No module named 'utils'

I'm running tox from the root of the repository, but switching to tests/ does not seem to help.

Changing the import lines to from . import utils fixes the tests on my machine.

ModuleNotFoundError: No module named 'utils'

I cannot reproduce this error. Is there a __init__.py in tests directory? from . import utils will cause error ImportError: attempted relative import with no known parent package.

Ah, you're right, I had tests/__init__.py there. :thumbsup:

pretty please pagure-ci rebuild

Tests fails because of an known issue of rpm-py-installer https://github.com/junaruga/rpm-py-installer/issues/104, which impacts a few projects that require rpm-py-installer.

1 new commit added

  • Add dependent packages for Python 2.6 in setup.py

Added a new commit to allow adding dependent py26 packages easily. This was detected while trying to configure Jenkins job to workaround rpm-py-installer issue.

So far, job fails in EL6 because of missing rpm-devel in slave. fedora-infra #6624 was filed for this issue. Job fails in EL7 because of package version conflict when installing a newer version of flake8, that can be fixed in job configuration in Jenkins.

pretty please pagure-ci rebuild

Just tried to switch Jenkins job to run tests by tox. Luckily, all required Python version interpreter are installed in F25 slave, and job in F25 succeeded. So, going to merge this PR. :tada:

Commit ac377516 fixes this pull-request

Pull-Request has been merged by cqi

Pull-Request has been merged by cqi

Metadata