Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to tomlkit for parsing and writing #3191

Closed
wants to merge 16 commits into from
2 changes: 1 addition & 1 deletion pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ def write_toml(self, data, path=None):
formatted_data = tomlkit.dumps(data).rstrip()
techalchemy marked this conversation as resolved.
Show resolved Hide resolved
else:
encoder = toml.encoder.TomlPreserveInlineDictEncoder()
formatted_data = toml.dumps(data, encoder=encoder)
formatted_data = toml.dumps(data, encoder=encoder).rstrip()
except Exception:
document = tomlkit.document()
for section in ("packages", "dev-packages"):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ def test_token_date(dt, content):


def test_dump_nonascii_string():
content = 'name = "Stažené"\n'
content = u'name = "Stažené"\n'
toml_content = tomlkit.dumps(tomlkit.loads(content))
assert toml_content == content
techalchemy marked this conversation as resolved.
Show resolved Hide resolved