From bde5bb35c7e85bc27fdb57d76afc608187e87774 Mon Sep 17 00:00:00 2001 From: Jeff Tratner Date: Thu, 15 Mar 2018 03:47:04 -0700 Subject: [PATCH] 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. --- pipenv/project.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipenv/project.py b/pipenv/project.py index 225914b6..51cfba08 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -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...