From f75a0d36c0b40ec1ae9cad0e4328783d460d43df Mon Sep 17 00:00:00 2001
From: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com>
Date: Tue, 2 Feb 2021 08:27:47 +0000
Subject: [PATCH] Drop the example based on using pip's internals
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

pip's documentation explicitly states to not use `import pip`:

> While it is implemented in Python, and so is available from your Python code via
> `import pip`, you must not use pip’s internal APIs in this way.

This example is in direct contradiction with the documentation's guidance and, thus, has
been removed.
---
 examples.md | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/examples.md b/examples.md
index 20a4a9d..d364e54 100644
--- a/examples.md
+++ b/examples.md
@@ -389,23 +389,6 @@ jobs:
       ${{ runner.os }}-pip-
 ```
 
-### Using a script to get cache location
-
-> Note: This uses an internal pip API and may not always work
-```yaml
-- name: Get pip cache dir
-  id: pip-cache
-  run: |
-    python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
-
-- uses: actions/cache@v2
-  with:
-    path: ${{ steps.pip-cache.outputs.dir }}
-    key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
-    restore-keys: |
-      ${{ runner.os }}-pip-
-```
-
 ## Python - pipenv
 
 ```yaml