keep foreground in proc

This commit is contained in:
Hugo Wang 2017-02-12 17:16:42 +08:00
parent ab2c60a77e
commit 67caabd8d0
5 changed files with 9 additions and 9 deletions

View file

@ -2,7 +2,7 @@
**Changed:**
* Moved decorators ``unthreadable``, ``foreground``, ``uncapturable`` from
* Moved decorators ``unthreadable``, ``uncapturable`` from
``xonsh.proc`` to ``xonsh.tools``.
**Deprecated:** None

View file

@ -15,7 +15,7 @@ from xonsh.foreign_shells import foreign_shell_data
from xonsh.jobs import jobs, fg, bg, clean_jobs
from xonsh.platform import (ON_ANACONDA, ON_DARWIN, ON_WINDOWS, ON_FREEBSD,
ON_NETBSD)
from xonsh.tools import foreground
from xonsh.tools import unthreadable
from xonsh.replay import replay_main
from xonsh.timings import timeit_alias
from xonsh.tools import argvquote, escape_windows_cmd_string, to_bool
@ -350,7 +350,7 @@ def xonfig(args, stdin=None):
return xonfig_main(args)
@foreground
@unthreadable
def trace(args, stdin=None):
"""Runs the xonsh tracer utility."""
from xonsh.tracer import tracermain # lazy import

View file

@ -32,7 +32,10 @@ from xonsh.lazyasd import lazyobject, LazyObject
from xonsh.jobs import wait_for_active_job
from xonsh.lazyimps import fcntl, termios, _winapi, msvcrt, winutils
# these decorators are imported for users back-compatible
from xonsh.tools import unthreadable, foreground, uncapturable # NOQA
from xonsh.tools import unthreadable, uncapturable # NOQA
# foreground has be deprecated
foreground = unthreadable
@lazyobject

View file

@ -1784,9 +1784,6 @@ def unthreadable(f):
return f
foreground = unthreadable
def uncapturable(f):
"""Decorator that specifies that a callable alias should not be run with
any capturing. This is often needed if the alias call interactive

View file

@ -1,11 +1,11 @@
"""Matplotlib xontribution."""
from xonsh.tools import foreground
from xonsh.tools import unthreadable
__all__ = ()
@foreground
@unthreadable
def mpl(args, stdin=None):
"""Hooks to matplotlib"""
from xontrib.mplhooks import show