mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
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:
+1
-2
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user