Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ $ pip install --user --upgrade --pre libvcs

- _Add your latest changes from PRs here_

### Breaking changes

- {issue}`343`: `libvcs.cmd.core` (including {func}`~libvcs.utils.run.run`) have been moved to
`libvcs.utils.run`. It will be supported as an unstable, internal API.

### Internals

- `StrOrPath` -> `StrPath`
Expand Down
8 changes: 0 additions & 8 deletions docs/cmd/core.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/cmd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ versions.
git
hg
svn
core
```
1 change: 1 addition & 0 deletions docs/internals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ exc
types
dataclasses
query_list
run
subprocess
```
9 changes: 9 additions & 0 deletions docs/internals/run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `libvcs.utils.run`

```{eval-rst}
.. autoapimodule:: libvcs.utils.run
:members:
:show-inheritance:
:undoc-members:
:exclude-members: StrOrBytesPath, StrPath, logger
```
2 changes: 1 addition & 1 deletion libvcs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Project package for libvcs."""
import logging

from .cmd.core import CmdLoggingAdapter
from .utils.run import CmdLoggingAdapter
from .projects.base import BaseProject
from .projects.git import GitProject
from .projects.hg import MercurialProject
Expand Down
2 changes: 1 addition & 1 deletion libvcs/cmd/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any, Literal, Optional, Sequence, Union

from ..types import StrOrBytesPath, StrPath
from .core import run
from libvcs.utils.run import run

_CMD = Union[StrOrBytesPath, Sequence[StrOrBytesPath]]

Expand Down
2 changes: 1 addition & 1 deletion libvcs/cmd/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Optional, Sequence, Union

from ..types import StrOrBytesPath, StrPath
from .core import run
from libvcs.utils.run import run

_CMD = Union[StrOrBytesPath, Sequence[StrOrBytesPath]]

Expand Down
2 changes: 1 addition & 1 deletion libvcs/cmd/svn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Literal, Optional, Sequence, Union

from ..types import StrOrBytesPath, StrPath
from .core import run
from libvcs.utils.run import run

_CMD = Union[StrOrBytesPath, Sequence[StrOrBytesPath]]

Expand Down
2 changes: 1 addition & 1 deletion libvcs/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from faker import Faker

from libvcs.cmd.core import run, which
from libvcs.utils.run import run, which
from libvcs.projects.git import GitProject, GitRemoteDict

skip_if_git_missing = pytest.mark.skipif(
Expand Down
2 changes: 1 addition & 1 deletion libvcs/projects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import NamedTuple
from urllib import parse as urlparse

from libvcs.cmd.core import CmdLoggingAdapter, mkdir_p, run
from libvcs.utils.run import CmdLoggingAdapter, mkdir_p, run
from libvcs.types import StrPath

logger = logging.getLogger(__name__)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/cmd/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from libvcs.cmd.core import mkdir_p, which
from libvcs.utils.run import mkdir_p, which


def test_mkdir_p(tmp_path: pathlib.Path):
Expand Down
2 changes: 1 addition & 1 deletion tests/projects/test_conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from libvcs.cmd.core import which
from libvcs.utils.run import which
from libvcs.conftest import CreateProjectCallbackFixtureProtocol


Expand Down
2 changes: 1 addition & 1 deletion tests/projects/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pytest_mock import MockerFixture

from libvcs import exc
from libvcs.cmd.core import run, which
from libvcs.utils.run import run, which
from libvcs.conftest import CreateProjectCallbackFixtureProtocol
from libvcs.projects.git import (
GitFullRemoteDict,
Expand Down
2 changes: 1 addition & 1 deletion tests/projects/test_hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from libvcs.cmd.core import run, which
from libvcs.utils.run import run, which
from libvcs.shortcuts import create_project, create_project_from_pip_url

if not which("hg"):
Expand Down
2 changes: 1 addition & 1 deletion tests/projects/test_svn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from libvcs.cmd.core import which
from libvcs.utils.run import which
from libvcs.conftest import CreateProjectCallbackFixtureProtocol
from libvcs.projects.svn import SubversionProject
from libvcs.shortcuts import create_project_from_pip_url
Expand Down