Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions pipenv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
import importlib.util
import os
import sys
import warnings


def _ensure_modules():
spec = importlib.util.spec_from_file_location(
"typing_extensions",
location=os.path.join(
os.path.dirname(__file__), "patched", "pip", "_vendor", "typing_extensions.py"
),
)
typing_extensions = importlib.util.module_from_spec(spec)
sys.modules["typing_extensions"] = typing_extensions
spec.loader.exec_module(typing_extensions)


_ensure_modules()

from pipenv.__version__ import __version__ # noqa
from pipenv.cli import cli
from pipenv.patched.pip._vendor.urllib3.exceptions import DependencyWarning
from pipenv.cli import cli # noqa
from pipenv.patched.pip._vendor.urllib3.exceptions import DependencyWarning # noqa

warnings.filterwarnings("ignore", category=DependencyWarning)
warnings.filterwarnings("ignore", category=ResourceWarning)
Expand Down
9 changes: 9 additions & 0 deletions pipenv/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@


def _ensure_modules():
spec = importlib.util.spec_from_file_location(
"typing_extensions",
location=os.path.join(
os.path.dirname(__file__), "patched", "pip", "_vendor", "typing_extensions.py"
),
)
typing_extensions = importlib.util.module_from_spec(spec)
sys.modules["typing_extensions"] = typing_extensions
spec.loader.exec_module(typing_extensions)
spec = importlib.util.spec_from_file_location(
"pipenv", location=os.path.join(os.path.dirname(__file__), "__init__.py")
)
Expand Down