Skip to content

Commit 887fbad

Browse files
committed
Fix, toml wants a string, while tomllib wants bytes
1 parent 41863fd commit 887fbad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rsconnect/pyproject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def parse_pyproject_python_requires(pyproject_file: pathlib.Path) -> typing.Opti
3939
4040
Returns None if the field is not found.
4141
"""
42-
with pyproject_file.open("rb") as f:
43-
pyproject = tomllib.load(f)
42+
content = pyproject_file.read_text()
43+
pyproject = tomllib.loads(content)
4444

4545
return pyproject.get("project", {}).get("requires-python", None)

0 commit comments

Comments
 (0)