New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI tests on CI fail without future library installed #2704

Closed
squiddy opened this Issue Jun 5, 2017 · 10 comments

Comments

Projects
None yet
5 participants
@squiddy
Member

squiddy commented Jun 5, 2017

I was cleaning up the requirements, and as we don't need the future library anymore, I removed it. But now the GUI tests are failing:

https://travis-ci.org/unknown-horizons/unknown-horizons/builds/239494227

________________________________ test_save_map _________________________________
fatal: No names found, cannot describe anything.
Traceback (most recent call last):
  File "run_uh.py", line 376, in <module>
    main()
  File "run_uh.py", line 114, in main
    import horizons.main
  File "/home/travis/build/unknown-horizons/unknown-horizons/horizons/main.py", line 46, in <module>
    from horizons.gui import Gui
  File "/home/travis/build/unknown-horizons/unknown-horizons/horizons/gui/__init__.py", line 22, in <module>
    from .gui import Gui
  File "/home/travis/build/unknown-horizons/unknown-horizons/horizons/gui/gui.py", line 26, in <module>
    from fife.extensions.pychan.widgets import Icon
  File "/home/travis/virtualenv/python3.4.4/lib/python3.4/site-packages/fife/extensions/pychan/__init__.py", line 267, in <module>
    from .widgets import *
  File "/home/travis/virtualenv/python3.4.4/lib/python3.4/site-packages/fife/extensions/pychan/widgets/__init__.py", line 33, in <module>
    from .widget import Widget
  File "/home/travis/virtualenv/python3.4.4/lib/python3.4/site-packages/fife/extensions/pychan/widgets/widget.py", line 33, in <module>
    from fife.extensions.pychan import events
  File "/home/travis/virtualenv/python3.4.4/lib/python3.4/site-packages/fife/extensions/pychan/events.py", line 67, in <module>
    from future.utils import itervalues
ImportError: No module named 'future'

I'm not sure where the problem is. Either our debian package for fife is missing this dependency, or its missing in fifengine itself. Any ideas @LinuxDonald @MasterofJOKers ?

For now, I'm going to re-add this dependency in our requirements to keep the tests running.

squiddy added a commit that referenced this issue Jun 5, 2017

Temporarily add future library in our requirements
It's needed for pychan but should be fixed somewhere else. See #2704 for
more details.
@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 5, 2017

Member

As you can see in the log. It seems that pychan needs future. Have we in UH replaced future? Maybe we/Belair could do it on fife side?

Member

LinuxDonald commented Jun 5, 2017

As you can see in the log. It seems that pychan needs future. Have we in UH replaced future? Maybe we/Belair could do it on fife side?

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Jun 5, 2017

Member

I think future was needed in the Python2 code for some Py3 features. Perhaps later, when FIFE moves completely to Python3, this will be removed. Alternatively, we could make this a conditional import in fifechan.

Member

AndyMender commented Jun 5, 2017

I think future was needed in the Python2 code for some Py3 features. Perhaps later, when FIFE moves completely to Python3, this will be removed. Alternatively, we could make this a conditional import in fifechan.

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 5, 2017

Member

When I remember correctly future lib come with port to python3.

Member

LinuxDonald commented Jun 5, 2017

When I remember correctly future lib come with port to python3.

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 5, 2017

Member

LinuxDonald, it is for the compatibility between python 2 and 3

Member

LinuxDonald commented Jun 5, 2017

LinuxDonald, it is for the compatibility between python 2 and 3

@Beliaar

This comment has been minimized.

Show comment
Hide comment
@Beliaar

Beliaar Jun 5, 2017

In short, it allows to use the same code in for both python 2 and 3.

Beliaar commented Jun 5, 2017

In short, it allows to use the same code in for both python 2 and 3.

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy Jun 5, 2017

Member

As you can see in the log. It seems that pychan needs future.

Well, yeah. I can see that. But just because pychan needs it, a installed fife debian package shouldn't require us to include that dependency when we don't need it.

Member

squiddy commented Jun 5, 2017

As you can see in the log. It seems that pychan needs future.

Well, yeah. I can see that. But just because pychan needs it, a installed fife debian package shouldn't require us to include that dependency when we don't need it.

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 5, 2017

Member

@Beliaar could you maybe change that when fife gets compiled with python3 support that it dont need future?

Member

LinuxDonald commented Jun 5, 2017

@Beliaar could you maybe change that when fife gets compiled with python3 support that it dont need future?

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy Jun 5, 2017

Member

@Beliaar could you maybe change that when fife gets compiled with python3 support that it dont need future?

The idea is to support both python 2 and 3 with the same code base. Also I feel kinda misunderstood. I don't really care whether fife needs the library or not.

I'm just saying that for CI, currently we can't use the fife package (installed system-wide) without installing the library separately, which feels wrong.

Member

squiddy commented Jun 5, 2017

@Beliaar could you maybe change that when fife gets compiled with python3 support that it dont need future?

The idea is to support both python 2 and 3 with the same code base. Also I feel kinda misunderstood. I don't really care whether fife needs the library or not.

I'm just saying that for CI, currently we can't use the fife package (installed system-wide) without installing the library separately, which feels wrong.

@Beliaar

This comment has been minimized.

Show comment
Hide comment
@Beliaar

Beliaar Jun 5, 2017

The problem is with the extensions code, not the main module. Unless someone wants to maintain 2 versions of them it is not possible.

Beliaar commented Jun 5, 2017

The problem is with the extensions code, not the main module. Unless someone wants to maintain 2 versions of them it is not possible.

@squiddy squiddy added this to the 2017.3 milestone Jun 8, 2017

@MasterofJOKers MasterofJOKers self-assigned this Feb 26, 2018

@MasterofJOKers

This comment has been minimized.

Show comment
Hide comment
@MasterofJOKers

MasterofJOKers Feb 26, 2018

Contributor

Fixed by adding a python3-future dependency to the python3-fife package and also copying what gets installed globally for python3-future to the travis user's virtualenv.

Contributor

MasterofJOKers commented Feb 26, 2018

Fixed by adding a python3-future dependency to the python3-fife package and also copying what gets installed globally for python3-future to the travis user's virtualenv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment