Hi Ronny,

thanks for the write up.

On Wed, Feb 18, 2015 at 18:23 +0100, Ronny Pfannschmidt wrote:
> Hi ,
> 
> this is a status and a rfc for the copy-in-cache branch.
> its mostly relevant for the pytest core developers
> 
> current status:
>  the pytest-cache branch with the --looponfail/--looponchange
>  modes is copyed in and adapted to the codebase

You mentioned elsewhere that you want to use some filewatch package
for detecting file changes.  If you do that --looponfail cannot 
move to pytest-core because core should have the least possible
dependencies, ideally zero.  The reason is that pytest runs "in-process"
and thus pytest's dependencies might interfere with the program under
test.  Anything that requires third party deps should thus be in a plugin
so users have a choice about which dependencies contaminate their test
environment.

Alternatively, we could vendor select dependencies into the pytest namespace
to avoid clashes but that'd probably give trouble with fedora/debian
maintainers who generally don't like vendoring.

> futher plan:
>  also include logcapture

makes sense because "logging" is part of the stdlib anyway.
We need a new option to disable logcapture because previously
you could disable it by not installing pytest-logcapture.
Maybe "-p-logcapture" is enough, needs to be tested.

> backward compat plan:
>  * ignore the cache/logcapture plugins as disabled
>    and warn if they are installed

OK.

>  * override the --looponfail option to be a callback,
>    setting the lastfailed and looponchange options and
>    allow pytest-xdist to override it
>    (but warn if a xdist of the current series is found,
>    explaining that the new better behaviour
>    is still availiable
>    using the --looponchange option combined with --lf)

note sure i understand.  I think pytest-xdist-NEXTVERSION should
use pytest-2.7 and its cache/lastfail mechanisms to implement
--looponfail (and maybe depend on a "watch" package if you will, see above).

>  note: the current idea is,  
>        to implement this in a _pytest.deprecation plugin

Not sure a "deprecation" plugin is needed -- we have deprecated bits
all over the place and cannot easily move it to a plugin.

> intentionally left out:
>  * the --boxed option - it should eventually
>    be reimplemeted on top of xdist,
>    current xdist does still include it,
>    (i'd prefer a major xdist release droping all features)

pytest-xdist is generally free to implement boxed otherwise.
It's not clear, however, if using execnet/xdist code to implement
boxed is fully backward compatible but we can try and see about
user feedback, i guess.

To summarize:

- pytest-2.7 to contain pytest-cache and pytest-logcapture code
  and ignore their installation with a warning
- pytest-xdist-2.0 to depend on pytest-2.7 and to (possibly)
  re-implement boxed as "-n1".

When moving pytest-cache and pytest-logcapture to core please
please make sure you also move/have some docs.  I can review
your work beginning next week if tests pass on linux/windows with py2/py3.

best,
holger
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to