Commit Graph

13 Commits

Author SHA1 Message Date
Markus Unterwaditzer 93216afbaf Add information about the package stub 2015-04-24 15:29:19 +02:00
Markus Unterwaditzer b7fc3a1250 Import aliases for Debian
Alternative to #2375
2015-04-24 12:05:19 +02:00
Ian Cordasco 3e3fc7683c Remove VendorAlias meta_path hook 2015-04-22 16:26:14 -05:00
Ian Cordasco 1b5bfe681b Place VendorAlias first in meta_path
When other libraries or tools add items to the meta_path, we need to preempt
some of their import hooks to be sure modules can be properly found. This also
prevents problems importing built-in modules on Python 2 where it will first
attempt to import something like:

    requests.packages.chardet.sys

By placing our VendorAlias first, the above will fail and then it will fall
back to trying to import sys directly instead.

Closes #2465
2015-04-05 20:48:36 -05:00
Ian Cordasco 2669f0c0b1 Fix when packages are unvendored
When working these changes back upstream to pip, we realized that the
previous fix wasn't ideal since unvendoring the packages broke the
imports. For example, if urllib3 were unvendored, then the following
would fail:

    from requests.packages import urllib3
2015-02-28 23:04:24 -06:00
Ian Cordasco 6ea3f2ada8 Only alias the imports for vendored dependencies
While discussion the issue, Donald Stufft (@dstufft) and I realized the
simplest solution is to simply add an alias per vendored dependency. The
resulting changes are simple and effective. It prevents the issue in
2.5.2 and 2.5.3 where the following would work:

    from requests.packages import webbrowser

This now appropriately raises an ImportError.

Closes #2465
2015-02-28 20:13:46 -06:00
Ian Cordasco da82fb4b1d Give proper attribution to pip 2014-12-12 21:12:31 -06:00
Ian Cordasco d615405519 Copy pip's import machinery wholesale 2014-12-08 20:48:40 -06:00
Kenneth Reitz 69e7e94c4c updated urllib3 2011-11-12 07:35:55 -08:00
Kenneth Reitz 34ca692c9c from __future__ import absolute_imports 2011-02-16 12:47:58 -05:00
Kenneth Reitz 4c192ec5ac absolute imports 2011-02-14 09:36:14 -05:00
Kenneth Reitz 127bbbb18d Worth a shot 2011-02-14 09:04:41 -05:00
Kenneth Reitz df419fa6fa vendorized poster 2011-02-14 08:55:55 -05:00