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

Version check breaks on tmux dev #199

Closed
fourjay opened this Issue Jan 17, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@fourjay

fourjay commented Jan 17, 2017

I (possibly foolishly) build tmux from source.
Late updates of tmuxp do a version check has_required_tmux_version() that throws an exception.
I'm pretty sure this because with the source tmux -V in my environment returns tmux master with no version number.
I can work around this by commenting out the call to has_required_tmux_version() and tmuxp runs without issue.
Is there potentially a way to disable the version check?

@tony

This comment has been minimized.

Member

tony commented Jan 18, 2017

@fourjay I'm open to a fix for that.

@tony tony added the bug label Jan 18, 2017

@sloria

This comment has been minimized.

sloria commented Feb 8, 2017

I just ran into this as well. I installed the latest tmux on OSX using brew install tmux --HEAD. Therefore, my tmux version is 'master'.

~ ❯ tmux -V
tmux master
~ ❯ tmuxp load -y play
Traceback (most recent call last):
  File "/Users/sloria/miniconda/bin/tmuxp", line 11, in <module>
    sys.exit(cli.cli())
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/tmuxp/cli.py", line 315, in cli
    has_required_tmux_version()
  File "/Users/sloria/miniconda/lib/python3.5/site-packages/libtmux/common.py", line 417, in has_required_tmux_version
    if StrictVersion(version) <= StrictVersion("1.7"):
  File "/Users/sloria/miniconda/lib/python3.5/distutils/version.py", line 58, in __le__
    c = self._cmp(other)
  File "/Users/sloria/miniconda/lib/python3.5/distutils/version.py", line 170, in _cmp
    if self.version != other.version:
AttributeError: 'StrictVersion' object has no attribute 'version'

If I get some free time soon, I'll send a PR to libtmux.

@tony

This comment has been minimized.

Member

tony commented Feb 8, 2017

Can you do a tmuxp -V and try seeing if pip install -U tmuxp fixes it?

@sloria

This comment has been minimized.

sloria commented Feb 8, 2017

That doesn't fix it.

The problem is here: https://github.com/tony/libtmux/blob/2f8a925d1b4a83e21dee9debdaf725dc9984304b/libtmux/common.py#L415-L422

The version passed to that function is 'master'.

sloria added a commit to sloria/libtmux that referenced this issue Feb 8, 2017

Fix has_required_tmux_version when latest tmux HEAD is installed
When the latest tmux is installed, `tmux -V` returns 'tmux master',
which wasn't properly handled by has_required_tmux_version().

Closes tmux-python/tmuxp#199
@tony

This comment has been minimized.

Member

tony commented Feb 8, 2017

tony added a commit to tmux-python/libtmux that referenced this issue Feb 8, 2017

Fix has_required_tmux_version when latest tmux HEAD is installed (#25)
When the latest tmux is installed, `tmux -V` returns 'tmux master',
which wasn't properly handled by has_required_tmux_version().

Closes tmux-python/tmuxp#199

tony added a commit that referenced this issue Feb 8, 2017

tony added a commit that referenced this issue Feb 8, 2017

Merge pull request #213 from tony/libtmux-0.6.3
bump libtmux to 0.6.3 to fix #199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment