refactoring: move jobs to procs (#5547)

#5538

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Andy Kipp 2024-06-29 08:51:10 +02:00 committed by GitHub
parent 87fb03c5c7
commit 0bece0f5e4
Failed to generate hash of commit
11 changed files with 9 additions and 10 deletions

View file

@ -2488,7 +2488,7 @@ v0.8.10
terminal to close. This was problematic for certain command terminal to close. This was problematic for certain command
pipelines. For example, ``pv /dev/urandom | head`` now works. pipelines. For example, ``pv /dev/urandom | head`` now works.
* Prevents recursive errors from being raised when there is no child process * Prevents recursive errors from being raised when there is no child process
in ``xonsh.jobs.wait_for_active_job()``. in ``xonsh.procs.jobs.wait_for_active_job()``.
* Tweaked ``xonsh.completers.commands.complete_skipper()`` to insert a space following * Tweaked ``xonsh.completers.commands.complete_skipper()`` to insert a space following
certain tokens (``&&``, ``||``, ``|``, ``and``, ``or``) to avoid overwriting existing tokens certain tokens (``&&``, ``||``, ``|``, ``and``, ``or``) to avoid overwriting existing tokens
with completer output. with completer output.

View file

@ -31,7 +31,6 @@ For those of you who want the gritty details.
xonsh.environ xonsh.environ
xonsh.aliases xonsh.aliases
xonsh.dirstack xonsh.dirstack
xonsh.jobs
xonsh.procs xonsh.procs
xonsh.inspectors xonsh.inspectors
xonsh.history xonsh.history

View file

@ -1,6 +1,6 @@
import pytest import pytest
from xonsh import jobs from xonsh.procs import jobs
@pytest.mark.parametrize( @pytest.mark.parametrize(

View file

@ -13,7 +13,7 @@ from xonsh.pytest.tools import skip_if_on_unix, skip_if_on_windows
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def patched_events(monkeypatch, xonsh_events, xonsh_session): def patched_events(monkeypatch, xonsh_events, xonsh_session):
from xonsh.jobs import get_tasks from xonsh.procs.jobs import get_tasks
get_tasks().clear() get_tasks().clear()
# needed for ci tests # needed for ci tests

View file

@ -20,7 +20,6 @@ from xonsh.cli_utils import Annotated, Arg, ArgParserAlias
from xonsh.dirstack import _get_cwd, cd, dirs, popd, pushd from xonsh.dirstack import _get_cwd, cd, dirs, popd, pushd
from xonsh.environ import locate_binary, make_args_env from xonsh.environ import locate_binary, make_args_env
from xonsh.foreign_shells import foreign_shell_data from xonsh.foreign_shells import foreign_shell_data
from xonsh.jobs import bg, clean_jobs, disown, fg, jobs
from xonsh.lazyasd import lazyobject from xonsh.lazyasd import lazyobject
from xonsh.platform import ( from xonsh.platform import (
IN_APPIMAGE, IN_APPIMAGE,
@ -32,6 +31,7 @@ from xonsh.platform import (
ON_OPENBSD, ON_OPENBSD,
ON_WINDOWS, ON_WINDOWS,
) )
from xonsh.procs.jobs import bg, clean_jobs, disown, fg, jobs
from xonsh.procs.specs import SpecAttrModifierAlias, SpecModifierAlias from xonsh.procs.specs import SpecAttrModifierAlias, SpecModifierAlias
from xonsh.timings import timeit_alias from xonsh.timings import timeit_alias
from xonsh.tools import ( from xonsh.tools import (

View file

@ -17,11 +17,11 @@ from xonsh.environ import get_home_xonshrc_path, make_args_env, xonshrc_context
from xonsh.events import events from xonsh.events import events
from xonsh.execer import Execer from xonsh.execer import Execer
from xonsh.imphooks import install_import_hooks from xonsh.imphooks import install_import_hooks
from xonsh.jobs import ignore_sigtstp
from xonsh.lazyasd import lazyobject from xonsh.lazyasd import lazyobject
from xonsh.lazyimps import pyghooks, pygments from xonsh.lazyimps import pyghooks, pygments
from xonsh.lib.pretty import pretty from xonsh.lib.pretty import pretty
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS
from xonsh.procs.jobs import ignore_sigtstp
from xonsh.shell import Shell from xonsh.shell import Shell
from xonsh.timings import setup_timings from xonsh.timings import setup_timings
from xonsh.tools import ( from xonsh.tools import (

View file

@ -9,9 +9,9 @@ import sys
import threading import threading
import time import time
import xonsh.jobs as xj
import xonsh.lazyasd as xl import xonsh.lazyasd as xl
import xonsh.platform as xp import xonsh.platform as xp
import xonsh.procs.jobs as xj
import xonsh.tools as xt import xonsh.tools as xt
from xonsh.built_ins import XSH from xonsh.built_ins import XSH
from xonsh.procs.readers import ConsoleParallelReader, NonBlockingFDReader, safe_fdclose from xonsh.procs.readers import ConsoleParallelReader, NonBlockingFDReader, safe_fdclose

View file

@ -14,7 +14,7 @@ import xonsh.lazyimps as xli
import xonsh.platform as xp import xonsh.platform as xp
import xonsh.tools as xt import xonsh.tools as xt
from xonsh.built_ins import XSH from xonsh.built_ins import XSH
from xonsh.jobs import proc_untraced_waitpid from xonsh.procs.jobs import proc_untraced_waitpid
from xonsh.procs.readers import ( from xonsh.procs.readers import (
BufferedFDParallelReader, BufferedFDParallelReader,
NonBlockingFDReader, NonBlockingFDReader,

View file

@ -13,10 +13,10 @@ import subprocess
import sys import sys
import xonsh.environ as xenv import xonsh.environ as xenv
import xonsh.jobs as xj
import xonsh.lazyasd as xl import xonsh.lazyasd as xl
import xonsh.lazyimps as xli import xonsh.lazyimps as xli
import xonsh.platform as xp import xonsh.platform as xp
import xonsh.procs.jobs as xj
import xonsh.tools as xt import xonsh.tools as xt
from xonsh.built_ins import XSH from xonsh.built_ins import XSH
from xonsh.procs.pipelines import ( from xonsh.procs.pipelines import (

View file

@ -19,9 +19,9 @@ from xonsh.built_ins import XSH, XonshSession
from xonsh.completer import Completer from xonsh.completer import Completer
from xonsh.events import events from xonsh.events import events
from xonsh.execer import Execer from xonsh.execer import Execer
from xonsh.jobs import get_tasks
from xonsh.main import setup from xonsh.main import setup
from xonsh.parsers.completion_context import CompletionContextParser from xonsh.parsers.completion_context import CompletionContextParser
from xonsh.procs.jobs import get_tasks
from .tools import DummyHistory, DummyShell, copy_env, sp from .tools import DummyHistory, DummyShell, copy_env, sp