[openstack-dev] Please do *NOT* use "vendorized" versions of anything (here: glanceclient using requests.packages.urllib3)

Donald Stufft donald at stufft.io
Thu Sep 18 13:10:32 UTC 2014


> On Sep 18, 2014, at 9:00 AM, Chmouel Boudjnah <chmouel at enovance.com> wrote:
> 
> 
> On Thu, Sep 18, 2014 at 1:58 PM, Donald Stufft <donald at stufft.io <mailto:donald at stufft.io>> wrote:
> Distributions are not the only place that people get their software from,
> unless you think that the ~3 million downloads requests has received
> on PyPI in the last 30 days are distributions downloading requests to
> package in their OSs.
> 
> 
> I think Thomas was speaking in the context of how OpenStack is used by the end user and that probably the point of debate here, requests ships libraries inside to make it easy for users that doen't use Linux distro packages, when in OpenStack (or at least in prod) packagers are something we generally very much care about.

Even then, my statement holds true, just with different numbers.

Every distribution modifies upstream in different ways, I think it's insane to
do contortions which will break things for people *not* getting things through
those channels. If distributions are going to modify one upstream project they
should expect to need to modify things that depend on that project in ways that
are sensitive to what they've modified.

The only real sane thing IMO is for openstack to consider requests as it is on
PyPI. If openstack wants to make it easier for downstream to de-vendor urllib3
from requests then when openstack wants to import from requests.packages.* it
can instead do:

    try:
        from requests.packages import urllib3
    except ImportError:
        import urllib3

This will cause it to work correctly when requests is installed in a pristine
state, and will fallback to handling the modifications that some downstream
redistributors make.

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140918/0f3d199e/attachment.html>


More information about the OpenStack-dev mailing list