[Python-Dev] Overriding stdlib http package

Demian Brecht demianbrecht at gmail.com
Wed Jan 14 17:32:23 CET 2015


Hi all,

As part of the work I'm doing on httplib3 (now that I've actually gotten
a bit of time), one of the things I'm trying to get done is injection of
httplib3 over http in order to not have to modify all import paths in
modules and such. Here's the gist of what I have so far:
https://gist.github.com/demianbrecht/bc6530a40718e4fcbf90.

It's greatly simplified over importlib2's inject mechanism, but I'm
assuming that's largely due to requirements of that package (i.e. Python
2) in contrast to this one.

My questions are: Does this look sane? Is there anything that I might be
not accounting for? It /does/ seem to work as expected when running
tests, but I'm curious if there's anything that I might be missing that
might jump out at someone more intimately familiar with the mechanics of
importlib.

Thanks,
Demian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150114/63497b03/attachment.sig>


More information about the Python-Dev mailing list