Skip to content

Commit 97b8bdf

Browse files
refactor: remove _get_version_impl.py shim
The _get_version_impl.py module was just re-exporting from vcs_versioning. Now we import directly from vcs_versioning in __init__.py and tests. This removes another unnecessary layer of indirection.
1 parent 057c509 commit 97b8bdf

File tree

4 files changed

+4
-48
lines changed

4 files changed

+4
-48
lines changed

src/setuptools_scm/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
from vcs_versioning._config import DEFAULT_VERSION_SCHEME
1414
from vcs_versioning._dump_version import dump_version # soft deprecated
1515
from vcs_versioning._get_version_impl import _get_version
16-
17-
from ._get_version_impl import get_version
16+
from vcs_versioning._get_version_impl import get_version # soft deprecated
1817

1918
# Public API
2019
__all__ = [

src/setuptools_scm/_get_version_impl.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

testing/test_better_root_errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
import pytest
1212

13+
from vcs_versioning._get_version_impl import _find_scm_in_parents
14+
from vcs_versioning._get_version_impl import _version_missing
1315
from vcs_versioning.test_api import WorkDir
1416

1517
from setuptools_scm import Configuration
1618
from setuptools_scm import get_version
17-
from setuptools_scm._get_version_impl import _find_scm_in_parents
18-
from setuptools_scm._get_version_impl import _version_missing
1919

2020
# No longer need to import setup functions - using WorkDir methods directly
2121

testing/test_regressions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_entrypoints_load() -> None:
199199
def test_write_to_absolute_path_passes_when_subdir_of_root(tmp_path: Path) -> None:
200200
c = Configuration(root=tmp_path, write_to=tmp_path / "VERSION.py")
201201
v = meta("1.0", config=c)
202-
from setuptools_scm._get_version_impl import write_version_files
202+
from vcs_versioning._get_version_impl import write_version_files
203203

204204
with pytest.warns(DeprecationWarning, match=".*write_to=.* is a absolute.*"):
205205
write_version_files(c, "1.0", v)

0 commit comments

Comments
 (0)