File tree 4 files changed +32
-8
lines changed
4 files changed +32
-8
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
6
+ * fix #668: harden the selftest for distribution extras
2
7
3
8
6.4.0
4
9
======
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 ):
Original file line number Diff line number Diff line change @@ -142,11 +142,11 @@ def testwarn_on_broken_setuptools():
142
142
143
143
144
144
@pytest .mark .issue (611 )
145
- def test_provides_toml_exta ():
145
+ def test_distribution_procides_extras ():
146
146
try :
147
147
from importlib .metadata import distribution
148
148
except ImportError :
149
149
from importlib_metadata import distribution
150
150
151
151
dist = distribution ("setuptools_scm" )
152
- assert "toml" in dist .metadata [ "Provides-Extra" ]
152
+ assert sorted ( dist .metadata . get_all ( "Provides-Extra" )) == [ "test" , "toml " ]
You can’t perform that action at this time.
0 commit comments