Skip to content
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

detox --version doesn't print detox version #284

Closed
pytoxbot opened this issue Sep 17, 2016 · 13 comments
Closed

detox --version doesn't print detox version #284

pytoxbot opened this issue Sep 17, 2016 · 13 comments
Labels
area:reporting bug:minor does not affect many people or has no big impact level:easy rought estimate that this might be quite easy to implement

Comments

@pytoxbot
Copy link

pytoxbot commented Sep 17, 2016

$ detox --version
2.1.1 imported from /home/mg/.venv/local/lib/python2.7/site-packages/tox/__init__.pyc

$ tox --version
2.1.1 imported from /home/mg/.venv/local/lib/python2.7/site-packages/tox/__init__.pyc

$ pip list | grep tox
detox (0.10.0)
tox (2.1.1)

It's nice that detox --version prints the version of tox, but it should also print its own version.

@mgedmin
Copy link
Contributor

mgedmin commented Mar 13, 2017

Is this really an enhancement and not a bug?

@obestwalter
Copy link
Member

point taken :)

@obestwalter obestwalter added area:reporting bug:minor does not affect many people or has no big impact level:easy rought estimate that this might be quite easy to implement and removed bug labels Sep 4, 2017
@markhu
Copy link

markhu commented May 9, 2018

Here we are a year later, and still no version info.

$ ./node_modules/.bin/detox --version
error: unknown option `--version'

Workaround: npm list | grep detox

├─┬ detox@7.3.6
│ ├─┬ detox-server@7.0.0

@mgedmin
Copy link
Contributor

mgedmin commented May 10, 2018

@markhu I think you have a different detox there.

@gaborbernat
Copy link
Member

Yeah that's node detox not python. 😀

@mgedmin
Copy link
Contributor

mgedmin commented May 11, 2018

Huh, the (Python) detox's --version is, you could argue, sort of fixed?

$ detox --version
3.0.0 imported from /tmp/sandbox/local/lib/python2.7/site-packages/tox/__init__.pyc
registered plugins:
    detox-0.12 at /tmp/sandbox/local/lib/python2.7/site-packages/detox/tox_proclimit.pyc

$ pip list | grep tox
detox      0.12   
tox        3.0.0  

@obestwalter
Copy link
Member

obestwalter commented May 11, 2018

Hi @mgedmin, detox is a both a a tox plugin, that registers itself with tox and adds an entry point that calls tox in a distributed way (code). It acts as a wrapper around tox, which also means that if you use functionality from tox it will work in the context of tox. So asking for the non existing version functionality in detox, will result in tox --version be executed, which reports its version and all plugin versions (of which one is guaranteed to be detox). What you see here is the functionality we added last year to tox to show the versions of plugins.

AFAICT detox is pretty abandoned at the moment - at least I don't know of anyone that feels responsible for it, so I think it should really be merged into core, if enough people use it, so that it is a proper part of tox, instead of this odd one out. See #439.

@obestwalter
Copy link
Member

If detox should stay a plugin I think it should also be turned into a "real" one that as called tox-xdist or something like that, deprecating detox as a standalone tool. That would clear up this confustion also.

@obestwalter
Copy link
Member

obestwalter commented May 11, 2018

Here we are a year later, and still no version info.

Hi @markhu, if you have the energy to complain about the task priorization in a volunteer-driven project, maybe next time you want to use that energy to check first if you are complaining in the right project? Or even better: don't complain at all and ask how you can help, if it is really important for you? Thanks.

@obestwalter
Copy link
Member

obestwalter commented May 11, 2018

reopened - because it is still a bug if I ask detox for its version and it gives me the tox version instead. Even if the detox version is also shown. If I have a lot of plugins installed it might drown in the visual noise and it is at the very least confusing for the user.

@obestwalter obestwalter reopened this May 11, 2018
@pawamoy
Copy link

pawamoy commented May 11, 2018

@obestwalter if there is a hook for the --version option, maybe we can simply override it in detox's code to print both tox's and detox's versions (and nothing else)?

@obestwalter
Copy link
Member

obestwalter commented May 11, 2018

Hi @pawamoy, no nothing like that. It uses the prepare function from tox directly, so asking for the version or help ends up directly in tox:

https://github.com/tox-dev/detox/blob/0a9fb58ebbf73015f055c549d0c6d68455c335b3/detox/main.py#L10-L13

which goes to:

https://github.com/tox-dev/detox/blob/0a9fb58ebbf73015f055c549d0c6d68455c335b3/detox/main.py#L6-L8

You would have to catch the version arg before and print it out directly.

@obestwalter
Copy link
Member

Kamino closed and cloned this issue to tox-dev/detox

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:reporting bug:minor does not affect many people or has no big impact level:easy rought estimate that this might be quite easy to implement
Projects
None yet
Development

No branches or pull requests

6 participants