diff --git a/pipenv/vendor/tomlkit/container.py b/pipenv/vendor/tomlkit/container.py index 5ddd72e7..987a0790 100644 --- a/pipenv/vendor/tomlkit/container.py +++ b/pipenv/vendor/tomlkit/container.py @@ -196,8 +196,7 @@ class Container(dict): self._body[idx] = (None, Comment(Trivia(comment_ws="", comment=trivia.comment))) else: self._body[idx] = (None, Null()) - super(Container, self).__delitem__(key.key) - + super(Container, self).__delitem__(key.key) return self diff --git a/tasks/vendoring/patches/vendor/tomlkit-update-items.patch b/tasks/vendoring/patches/vendor/tomlkit-update-items.patch index 51f6006a..c996cb96 100644 --- a/tasks/vendoring/patches/vendor/tomlkit-update-items.patch +++ b/tasks/vendoring/patches/vendor/tomlkit-update-items.patch @@ -9,11 +9,11 @@ index 37014921..5ddd72e7 100644 +from .items import Trivia from .items import Whitespace from .items import item as _item - + @@ -189,9 +190,14 @@ class Container(dict): if idx is None: raise NonExistentKey(key) - + - self._body[idx] = (None, Null()) + old_data = self._body[idx][1] + trivia = getattr(old_data, "trivia", None) @@ -21,9 +21,8 @@ index 37014921..5ddd72e7 100644 + self._body[idx] = (None, Comment(Trivia(comment_ws="", comment=trivia.comment))) + else: + self._body[idx] = (None, Null()) -+ super(Container, self).__delitem__(key.key) - ++ super(Container, self).__delitem__(key.key) + - super(Container, self).__delitem__(key.key) - + return self -