8000 `run`: Move libvcs to new `SubprocessCommand`, document + test overriding · Issue #340 · vcs-python/libvcs · GitHub
[go: up one dir, main page]

Skip to content
10000
run: Move libvcs to new SubprocessCommand, document + test overriding #340
Open
@tony

Description

@tony

requires #337

  • run() should convert to Popen params for compatibility with SubprocessCommand

  • run() should support legacy_params (existing) to deprecate safely

class CommandPopenMixin:
    _run_fn = Subprocess.Popen


class CommandRunMixin:
    _run_fn = Subprocess.run

class Command:
    _run_fn = SubprocessCommand




class Command:
    _run_fn = SubprocessCommand

This turns git command into a subprocess command factory:

class Git(Command):
   ...


git_factory = Git(url='...')
status_cmd = git_factory.status()
status_cmd.run()
status_cmd.Popen()

Subprocess.Popen
Subprocess.run

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0