[TIP] suggestion to change tox's --pre defaults

holger krekel holger at merlinux.eu
Fri Oct 3 00:09:57 PDT 2014

Marius, Ned, Carl, all,

see below for my suggestion how to change the default for tox.

On Tue, Sep 30, 2014 at 08:50 +0300, Marius Gedminas wrote:
> On Mon, Sep 29, 2014 at 06:32:49PM +0000, holger krekel wrote:
> > Carl Meyer wrote:
> > > I am not in a good position to evaluate the likely back-compat effects,
> > > since I don't ever use tox in a way that relies on --pre (if I want to
> > > test against a pre-release version of a dependency, I specify the
> > > precise pre-release I want to test against).
> > 
> > I don't know how many people would really be hit by tox changing its
> > defaults.  For sure, if a tox.ini specifies "easy_install" you could not
> > run "tox --pre" but when "pip" is used you would need to use "--pre" in
> > certain situations.  Currently, there is no need to talk about this as
> > the default works the same way for both installers.
> A tox.ini option to turn this on/off, with a backwards compatible
> default and a big note that the default is going to change with the next
> major version number bump (tox 2.0?) seems like the way to go.

I'd like to avoid the deprecation step and land at something
like this directly (with tox-1.9):

- a testenv setting ``pip_pre``, defaulting to False. If True
  it will add "--pre" to {opts}.

- a new option "--pre" to force adding "--pre" to {opts}
  (overriding any pip_pre settings)

- (unsure) a new option "--final" to force ``pip_pre`` to
  be False (overriding any pip_pre settings)

- both options should be clear in their help that they only
  are effective if you use pip in your install_command.

- CHANGELOG and release announement note that the default 
  for invoking the default pip installer changed.

Given the reactions here and on twitter (virtually everybody
expects tox to use the pip defaults these days), i guess tox-1.9
is not going to practically break for many.

If everybody is fine with that and Carl still offers to write
a little PR implementing it, I'd be glad to review and incorporate it.


> I think it's useful to be able to test both with prereleases (to catch
> upcoming issues, if PyPI prereleases catch on) and with final package
> versions (to make sure your package works when your users attempt to pip
> install it today).  For this reason I think it would be good to have
> both a command-line switch and a tox.ini option to set the maintainer's
> preferred default.
> Marius Gedminas
> -- 
> My point today is that, if we wish to count lines of code, we should not regard
> them as "lines produced" but as "lines spent": the current conventional wisdom
> is so foolish as to book that count on the wrong side of the ledger.
>         -- E. W. Dijkstra

> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list