mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #115 from nateprewitt/fixing_build
fixing OrderedDict
This commit is contained in:
+6
-7
@@ -102,7 +102,7 @@ def ensure_proper_casing():
|
||||
casing_changed = False
|
||||
|
||||
if section in p:
|
||||
old_keys = []
|
||||
changed_values = []
|
||||
|
||||
# Replace each package with proper casing.
|
||||
for dep in p[section].keys():
|
||||
@@ -115,14 +115,13 @@ def ensure_proper_casing():
|
||||
|
||||
# Mark casing as changed, if it did.
|
||||
casing_changed = True
|
||||
old_keys.append(dep)
|
||||
changed_values.append((new_casing, dep))
|
||||
|
||||
for new, old in changed_values:
|
||||
# Replace old value with new value.
|
||||
old_value = p[section][dep]
|
||||
p[section][new_casing] = old_value
|
||||
|
||||
for key in old_keys:
|
||||
del p[section][key]
|
||||
old_value = p[section][old]
|
||||
p[section][new] = old_value
|
||||
del p[section][old]
|
||||
|
||||
return casing_changed
|
||||
|
||||
|
||||
+2
-4
@@ -1,11 +1,9 @@
|
||||
import os
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
from ordereddict import OrderedDict
|
||||
|
||||
import toml
|
||||
|
||||
from requests.compat import OrderedDict
|
||||
|
||||
from . import _pipfile as pipfile
|
||||
from .utils import format_toml, multi_split
|
||||
from .utils import convert_deps_from_pip, convert_deps_to_pip
|
||||
|
||||
Reference in New Issue
Block a user