Skip to content

Commit

Permalink
Update pytoml and use new object_pairs_hook to load venvs
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jun 9, 2018
1 parent c184e0f commit 338cbf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mkenv/converge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Converge the set of installed virtualenvs.
"""
import collections
import os
import sys

Expand Down Expand Up @@ -37,7 +38,10 @@ def _do_not_fail(virtualenv):
)
def main(filesystem, locator, link_dir, handle_error):
with filesystem.open(locator.root.descendant("virtualenvs.toml")) as venvs:
contents = pytoml.load(venvs)
contents = pytoml.load(
venvs,
object_pairs_hook=collections.OrderedDict,
)

for name, config in contents["virtualenv"].items():
config.setdefault("sys.version", sys.version)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ attrs==17.1.0
click==6.6
git+https://github.com/Julian/Filesystems@fb36337a597bd43f91815ff0b80f3bd3f9e61f09
packaging==16.8
pytoml==0.1.13
pytoml==0.1.16
virtualenv==15.1.0

0 comments on commit 338cbf7

Please sign in to comment.