On 28 August 2015 at 10:46, Gustavo Carneiro <gjcarne...@gmail.com> 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...)

Paul
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to