Skip to content

Commit

Permalink
Avoid f-strings for now
Browse files Browse the repository at this point in the history
This commit removes the use of f strings from tomlgen module. The package
metadata didn't set a minimum python version and fstrings don't work
with python 3.5. To enable having the last release of setuptools-rust
prior to setting the python_requires work with python 3.5 we need to
have a release which will work for 3.5. With this change setuptools-rust
should work fine with Python 3.5. So we can release this and then set
the minimum supported python version to 3.6 and reintroduce the use of
fstrings.

Fixes PyO3#85
  • Loading branch information
mtreinish committed Nov 7, 2020
1 parent 75fa9ab commit 2e4279b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools_rust/tomlgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def iter_dependencies(self, ext=None):
for section in sections:
if self.cfg.has_section(section):
for dep, options in self.cfg.items(section):
yield dep, toml.loads(f"{dep} = {options}")[dep]
yield dep, toml.loads("%s = %s" % (dep, options))[dep]


def _slugify(name):
Expand Down

0 comments on commit 2e4279b

Please sign in to comment.