Apparently you cannot deepcopy TOMLFile objects

Weirdly (seems like) it only fails in test suite but not in actual
usage, but manual vetting suggests we don't modify the pipfile without
writing it to disk pretty much immediately.
This commit is contained in:
Jeff Tratner
2018-03-15 03:47:04 -07:00
parent 511561122b
commit bde5bb35c7
+1 -2
View File
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
import copy
import json
import os
import re
@@ -304,7 +303,7 @@ class Project(object):
parsed = self._parse_pipfile(contents)
_cache.pipfile_cache[cache_key] = parsed
# deepcopy likely unnecessary but why not avoid bugs?
return copy.deepcopy(_cache.pipfile_cache[cache_key])
return _cache.pipfile_cache[cache_key]
def _parse_pipfile(self, contents):
# If any outline tables are present...