Commit 6340374 1 parent 4a1b43a commit 6340374 Copy full SHA for 6340374
File tree 3 files changed +29
-6
lines changed
3 files changed +29
-6
lines changed Original file line number Diff line number Diff line change
1
+ v6.4.1
2
+ =======
3
+
1
4
5
+ * fix regression #669: restore get_version signature
2
6
3
7
6.4.0
4
8
======
Original file line number Diff line number Diff line change @@ -111,16 +111,32 @@ def _version_missing(config) -> NoReturn:
111
111
)
112
112
113
113
114
- @_types .transfer_input_args (Configuration )
115
- def get_version (** kw ) -> str :
114
+ def get_version (
115
+ root = "." ,
116
+ version_scheme = DEFAULT_VERSION_SCHEME ,
117
+ local_scheme = DEFAULT_LOCAL_SCHEME ,
118
+ write_to = None ,
119
+ write_to_template = None ,
120
+ relative_to = None ,
121
+ tag_regex = DEFAULT_TAG_REGEX ,
122
+ parentdir_prefix_version = None ,
123
+ fallback_version = None ,
124
+ fallback_root = "." ,
125
+ parse = None ,
126
+ git_describe_command = None ,
127
+ dist_name = None ,
128
+ version_cls = None ,
129
+ normalize = True ,
130
+ search_parent_directories = False ,
131
+ ):
116
132
"""
117
133
If supplied, relative_to should be a file from which root may
118
134
be resolved. Typically called by a script or module that is not
119
135
in the root of the repository to direct setuptools_scm to the
120
136
root of the repository by supplying ``__file__``.
121
137
"""
122
138
123
- config = Configuration (** kw )
139
+ config = Configuration (** locals () )
124
140
maybe_version = _get_version (config )
125
141
if maybe_version is None :
126
142
_version_missing (config )
Original file line number Diff line number Diff line change @@ -58,9 +58,12 @@ def test_version_from_scm(wd):
58
58
setuptools_scm .version_from_scm (str (wd ))
59
59
60
60
61
- def test_root_parameter_pass_by (monkeypatch , tmpdir ):
62
- assert_root (monkeypatch , tmpdir )
63
- setuptools_scm .get_version (root = tmpdir .strpath )
61
+ def test_root_parameter_pass_by (monkeypatch : pytest .MonkeyPatch , tmp_path : Path ):
62
+ assert_root (monkeypatch , os .fspath (tmp_path ))
63
+ setuptools_scm .get_version (root = os .fspath (tmp_path ))
64
+ setuptools_scm .get_version (
65
+ os .fspath (tmp_path )
66
+ ) # issue 669 - posarg difference between Configuration and get_version
64
67
65
68
66
69
def test_parentdir_prefix (tmpdir , monkeypatch ):
You can’t perform that action at this time.
0 commit comments