Skip to content

Commit 66217cd

Browse files
authored
refactor!: libvcs.utils -> libvcs._internal (#345)
This should make it more clear we're dealing with internal machinery
2 parents 908dc98 + a03cfc9 commit 66217cd

24 files changed

+31
-28
lines changed

CHANGES

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ $ pip install --user --upgrade --pre libvcs
1515

1616
### Breaking changes
1717

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

2121
### Internals
2222

23+
- {issue}`345` `libvcs.utils` -> `libvcs._internal` to make it more obvious the APIs are strictly
24+
closed.
2325
- `StrOrPath` -> `StrPath`
24-
- {issue}`#336`: {class}`~libvcs.utils.subprocess.SubprocessCommand`: Encapsulated {mod}`subprocess`
25-
call in a {func}`dataclasses.dataclass` for introspecting, modifying, mocking and controlling
26-
execution.
27-
- Dataclass helper: {class}`~libvcs.utils.dataclasses.SkipDefaultFieldsReprMixin`
26+
- {issue}`#336`: {class}`~libvcs._internal.subprocess.SubprocessCommand`: Encapsulated
27+
{mod}`subprocess` call in a {func}`dataclasses.dataclass` for introspecting, modifying, mocking
28+
and controlling execution.
29+
- Dataclass helper: {class}`~libvcs._internal.dataclasses.SkipDefaultFieldsReprMixin`
2830

2931
Skip default fields in object representations.
3032

docs/internals/dataclasses.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# `libvcs.utils.dataclasses`
1+
# `libvcs._internal.dataclasses`
22

33
```{eval-rst}
4-
.. autoapimodule:: libvcs.utils.dataclasses
4+
.. autoapimodule:: libvcs._internal.dataclasses
55
:members:
66
:special-members:
77

docs/internals/query_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `libvcs.utils.query_list`
1+
# `libvcs._internal.query_list`
22

33
```{eval-rst}
4-
.. autoapimodule:: libvcs.utils.query_list
4+
.. autoapimodule:: libvcs._internal.query_list
55
:members:
66
```

docs/internals/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# `libvcs.utils.run`
1+
# `libvcs._internal.run`
22

33
```{eval-rst}
4-
.. autoapimodule:: libvcs.utils.run
4+
.. autoapimodule:: libvcs._internal.run
55
:members:
66
:show-inheritance:
77
:undoc-members:

docs/internals/subprocess.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# `libvcs.utils.subprocess`
1+
# `libvcs._internal.subprocess`
22

33
```{eval-rst}
4-
.. autoapimodule:: libvcs.utils.subprocess
4+
.. autoapimodule:: libvcs._internal.subprocess
55
:members:
66
:exclude-members:
77
StrOrBytesPath, F, args, bufsize,

libvcs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Project package for libvcs."""
22
import logging
33

4-
from .utils.run import CmdLoggingAdapter
4+
from ._internal.run import CmdLoggingAdapter
55
from .projects.base import BaseProject
66
from .projects.git import GitProject
77
from .projects.hg import MercurialProject
File renamed without changes.
File renamed without changes.
File renamed without changes.

libvcs/utils/run.py renamed to libvcs/_internal/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Misc. legacy helpers :mod:`subprocess` and finding VCS binaries.
22
3-
:class:`libvcs.utils.run.run` will be deprecated by :mod:`libvcs.utils.subprocess`.
3+
:class:`libvcs._internal.run.run` will be deprecated by
4+
:mod:`libvcs._internal.subprocess`.
45
56
Note
67
----

0 commit comments

Comments
 (0)