Remove legacy pip_import (#726)

* Remove legacy pip_import

* Remove legacy pip_import

* Generate docs
diff --git a/README.md b/README.md
index 0055b6d..d880b0a 100644
--- a/README.md
+++ b/README.md
@@ -231,23 +231,10 @@
 
 [requirements-drawbacks]: https://github.com/bazelbuild/rules_python/issues/414
 
-#### 'Extras' requirement consumption
+#### 'Extras' dependencies
 
-When using the legacy `pip_import`, you must specify the extra in the argument to the `requirement` macro. For example:
-
-```python
-py_library(
-    name = "mylib",
-    srcs = ["mylib.py"],
-    deps = [
-        requirement("useful_dep[some_extra]"),
-    ]
-)
-```
-
-If using `pip_install` or `pip_parse`, any extras specified in the requirements file will be automatically
-linked as a dependency of the package so that you don't need to specify the extra. In the example above,
-you'd just put `requirement("useful_dep")`.
+Any 'extras' specified in the requirements lock-file will be automatically added as transitive dependencies of the 
+package. In the example above, you'd just put `requirement("useful_dep")`.
 
 ### Consuming Wheel Dists Directly
 
diff --git a/docs/pip.md b/docs/pip.md
index 13cade4..732d391 100644
--- a/docs/pip.md
+++ b/docs/pip.md
@@ -249,17 +249,3 @@
 | kwargs |  Additional arguments to the [<code>pip_repository</code>](./pip_repository.md) repository rule.   |  none |
 
 
-<a name="#pip_repositories"></a>
-
-## pip_repositories
-
-<pre>
-pip_repositories()
-</pre>
-
-    Obsolete macro to pull in dependencies needed to use the pip_import rule.
-
-**PARAMETERS**
-
-
-
diff --git a/examples/BUILD b/examples/BUILD
index c6a57c4..a1789f9 100644
--- a/examples/BUILD
+++ b/examples/BUILD
@@ -39,11 +39,6 @@
 )
 
 bazel_integration_test(
-    name = "py_import_example",
-    timeout = "long",
-)
-
-bazel_integration_test(
     name = "relative_requirements_example",
     timeout = "long",
 )
diff --git a/examples/py_import/BUILD b/examples/py_import/BUILD
deleted file mode 100644
index c3312c6..0000000
--- a/examples/py_import/BUILD
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2020 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-load("@rules_python//python:defs.bzl", "py_import", "py_test")
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"])  # Apache 2.0
-
-# Adapt helloworld.egg so it can be depended on as if it were a
-# py_library target
-py_import(
-    name = "py_import",
-    # Note: this .egg file can be regenerated using zipper:
-    # $ third_party/ijar/zipper Cc \
-    #   examples/py_import/helloworld.egg \
-    #   examples/py_import/helloworld.py=examples/legacy_pip_import/helloworld/helloworld.py \
-    #   examples/__init__.py= \
-    #   examples/py_import/__init__.py=
-    # TODO: we should construct an egg from local sources, or to make
-    # the example more meaningful for users, find an egg on the internet.
-    # Also it would help illustrate the rules if the egg has some other
-    # dependency, requiring deps here.
-    srcs = ["helloworld.egg"],
-)
-
-py_test(
-    name = "py_import_test",
-    srcs = ["py_import_test.py"],
-    deps = [":py_import"],
-)
diff --git a/examples/py_import/WORKSPACE b/examples/py_import/WORKSPACE
deleted file mode 100644
index 9fead7b..0000000
--- a/examples/py_import/WORKSPACE
+++ /dev/null
@@ -1,10 +0,0 @@
-workspace(name = "py_import")
-
-local_repository(
-    name = "rules_python",
-    path = "../..",
-)
-
-load("@rules_python//python:pip.bzl", "pip_install")
-
-pip_install(requirements = "//:requirements.txt")
diff --git a/examples/py_import/helloworld.egg b/examples/py_import/helloworld.egg
deleted file mode 100644
index f41f396..0000000
--- a/examples/py_import/helloworld.egg
+++ /dev/null
Binary files differ
diff --git a/examples/py_import/py_import_test.py b/examples/py_import/py_import_test.py
deleted file mode 100644
index 1f5aa71..0000000
--- a/examples/py_import/py_import_test.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2017-2019 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import unittest
-
-from examples.py_import import helloworld
-
-
-class HelloWorldTest(unittest.TestCase):
-    def test_helloworld(self):
-        hw = helloworld.HelloWorld()
-        hw.SayHello()
-
-    def test_helloworld_async(self):
-        hw = helloworld.HelloWorld()
-        hw.SayHelloAsync()
-        hw.Stop()
-
-    def test_helloworld_multiple(self):
-        hw = helloworld.HelloWorld()
-        hw.SayHelloAsync()
-        hw.SayHelloAsync()
-        hw.SayHelloAsync()
-        hw.SayHelloAsync()
-        hw.Stop()
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/examples/py_import/requirements.txt b/examples/py_import/requirements.txt
deleted file mode 100644
index e69de29..0000000
--- a/examples/py_import/requirements.txt
+++ /dev/null
diff --git a/examples/py_import/some_library.egg b/examples/py_import/some_library.egg
deleted file mode 100644
index f41f396..0000000
--- a/examples/py_import/some_library.egg
+++ /dev/null
Binary files differ
diff --git a/python/pip.bzl b/python/pip.bzl
index 9813fd5..954317f 100644
--- a/python/pip.bzl
+++ b/python/pip.bzl
@@ -210,14 +210,3 @@
         incremental = True,
         **kwargs
     )
-
-def pip_repositories():
-    """
-    Obsolete macro to pull in dependencies needed to use the pip_import rule.
-
-    Deprecated:
-        the pip_repositories rule is obsolete. It is not used by pip_install.
-    """
-
-    # buildifier: disable=print
-    print("DEPRECATED: the pip_repositories rule has been replaced with pip_install, please see rules_python 0.1 release notes")