Skip to content

Commit 27d0061

Browse files
committed
Force encoding when reading setup.cfg. Fixes #760.
1 parent 8e74436 commit 27d0061

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/setuptools_scm/_integration/setuptools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def read_dist_name_from_setup_cfg(
1414
parser = configparser.ConfigParser()
1515

1616
if isinstance(input, (os.PathLike, str)):
17-
parser.read([input])
17+
parser.read([input], encoding='utf-8')
1818
else:
1919
parser.read_file(input)
2020

testing/test_integration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def test_distribution_procides_extras() -> None:
156156

157157

158158
@pytest.mark.issue(760)
159-
@pytest.mark.xfail('platform.system() == "Windows"', reason="#760")
160159
def test_unicode_in_setup_cfg(tmp_path: Path) -> None:
161160
cfg = tmp_path / "setup.cfg"
162161
cfg.write_text(

0 commit comments

Comments
 (0)