[Python-Dev] provisional status for asyncio
Donald Stufft
donald at stufft.io
Fri Aug 28 17:09:04 CEST 2015
On August 28, 2015 at 6:36:21 AM, Paul Moore (p.f.moore at gmail.com) wrote:
> On 28 August 2015 at 10:46, Gustavo Carneiro wrote:
> > I think this is a packaging problem.
> >
> > In an ideal world, Python would ship some version of asyncio, but you would
> > also be able to pip install a newer version into your virtual environment,
> > and it would override the version in stdlib.
> >
> > As it stands now, however, if you pip install another version of asyncio,
> > the version in stdlib still takes precedence. What I end up doing in my
> > (non open source) projects is to include a copy of asyncio and manually
> > modify sys.path to point to it.
> >
> > Can we fix pip/virtualenv instead?
>
> It's not a pip/virtualenv issue - it's a result of the way sys.path is
> set (in site.py IIRC). And it was a deliberate decision to put the
> stdlib before user installed packages, precisely so that random PyPI
> packages can't override the standard behaviour. (Setuptools included
> some hacks to circumvent this, but they are pretty nasty, and TBH not
> widely liked...)
>
Right, the default sys.path is stdlib > user-packages > site-packages. I would personally prefer it if looked more like user-packages > site-packages > stdlib but I’m not sure how popular that opinion is :)
-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
More information about the Python-Dev
mailing list