On Tue, Jun 8, 2010 at 3:56 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On 09/06/10 05:33, Terry Reedy wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 6/7/2010 5:20 PM, Eric Smith wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
pip could use the new features in 3.4, and it could get the new features<br>
in 2.x if the users were willing to install the updated library, since<br>
it's not in the stdlib. But for 3.3 you'd be stuck.<br>
</blockquote>
<br>
I see no reason why 3.3 users could not also download the 3.4 version of<br>
something just as well as user of earlier versions (who well might<br>
already have the 3.3 version).<br>
</blockquote>
<br></div>
I believe Eric was pointing out the fact that, by default, there is no directory on sys.path that will override the standard library versions of a module or package for all applications using that interpreter installation.<br>


<br>
So you're forced to either resort to destructive replacement (actually overwriting the standard library module on disk) or else tinkering with sys.path in each app or a library to insert an "override" directory before the normal standard library paths.<br>


<br>
It sometimes seems to me that, for the advocates of a more granular standard library, proposing standardisation of such an override directory would be an interesting way to test the waters (since it would make it much easier to drop in backported updates to standard library modules).<br>

</blockquote><div><br>Setuptools uses .pth file hackery to handle this case (not to intentionally override the stdlib, but it would also do that), and I think it could apply here as well.  Also the way Setuptools installs eggs might be useful in this case, as it makes it very obvious in tracebacks what version of a module is being used (and if it is from the standard library).  Even if the particular mechanics were revisited, I think these basic ideas would be helpful. <br>

</div></div><br>-- <br>Ian Bicking  |  <a href="http://blog.ianbicking.org">http://blog.ianbicking.org</a><br>