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.
This commit is contained in:
Oz N Tiram
2022-07-25 16:26:42 +02:00
parent 882a3a2cde
commit bfdb90a6af
+20
View File
@@ -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):