A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-January/137761.html below:

[Python-Dev] Overriding stdlib http package

[Python-Dev] Overriding stdlib http package [Python-Dev] Overriding stdlib http packageAntoine Pitrou solipsis at pitrou.net
Wed Jan 14 17:54:47 CET 2015
On Wed, 14 Jan 2015 08:32:23 -0800
Demian Brecht <demianbrecht at gmail.com> wrote:
> 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.

What don't you simply monkeypatch sys.modules, e.g.:

  import myhttplib

  sys.modules['http'] = myhttplib

or doesn't it work as desired?

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4