mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Remove vistir.misc.dedup
This function is a nice to have alias for one line of code. Also, it uses OrderedDict, which is no longer needed. `dict`s after Python3.6 are guaranteed to be ordered (bonus: dict is faster than ordered dict). If we really want, we can also import it from zipp or python finder.
This commit is contained in:
+1
-1
@@ -1395,7 +1395,7 @@ def get_pip_args(
|
||||
arg_set.extend(arg_map.get(key))
|
||||
elif key == "selective_upgrade" and not locals().get(key):
|
||||
arg_set.append("--exists-action=i")
|
||||
return list(vistir.misc.dedup(arg_set))
|
||||
return list(dict.fromkeys(arg_set))
|
||||
|
||||
|
||||
def get_requirement_line(
|
||||
|
||||
@@ -131,7 +131,6 @@ def translate_markers(pipfile_entry):
|
||||
if not isinstance(pipfile_entry, Mapping):
|
||||
raise TypeError("Entry is not a pipfile formatted mapping.")
|
||||
from pipenv.vendor.packaging.markers import default_environment
|
||||
from pipenv.vendor.vistir.misc import dedup
|
||||
|
||||
allowed_marker_keys = ["markers"] + list(default_environment().keys())
|
||||
provided_keys = list(pipfile_entry.keys()) if hasattr(pipfile_entry, "keys") else []
|
||||
@@ -153,7 +152,8 @@ def translate_markers(pipfile_entry):
|
||||
new_pipfile["markers"] = str(
|
||||
Marker(
|
||||
" or ".join(
|
||||
f"{s}" if " and " in s else s for s in sorted(dedup(marker_set))
|
||||
f"{s}" if " and " in s else s
|
||||
for s in sorted(dict.fromkeys(marker_set))
|
||||
)
|
||||
)
|
||||
).replace('"', "'")
|
||||
|
||||
Reference in New Issue
Block a user