From bfdb90a6afc8d9d65186f053d21a65e9caea1fd9 Mon Sep 17 00:00:00 2001 From: Oz N Tiram Date: Mon, 25 Jul 2022 16:26:42 +0200 Subject: [PATCH] Patch dparse locally - remove top level yaml import We don't use this yaml import (only used for conda file parsing). Hence, we can remove this. --- .../patches/vendor/dparse-local-yaml.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tasks/vendoring/patches/vendor/dparse-local-yaml.patch diff --git a/tasks/vendoring/patches/vendor/dparse-local-yaml.patch b/tasks/vendoring/patches/vendor/dparse-local-yaml.patch new file mode 100644 index 00000000..896b9ee0 --- /dev/null +++ b/tasks/vendoring/patches/vendor/dparse-local-yaml.patch @@ -0,0 +1,20 @@ +diff --git a/dparse/parser.py b/dparse/parser.py +index c01ebab..18689a5 100644 +--- a/pipenv/vendor/dparse/parser.py ++++ b/pipenv/vendor/dparse/parser.py +@@ -2,7 +2,6 @@ + from __future__ import unicode_literals, absolute_import + from collections import OrderedDict + import re +-import yaml + + from io import StringIO + +@@ -301,6 +300,7 @@ class CondaYMLParser(Parser): + + :return: + """ ++ import yaml + try: + data = yaml.safe_load(self.obj.content) + if data and 'dependencies' in data and isinstance(data['dependencies'], list):