Re: [Python-Dev] is sys.modules not meant to be replaced?

2011-07-24 Thread Petri Lehtinen
Eric Snow wrote: > p.s. I tried opening a tracker ticket on this, but it wouldn't go > through. I'll try again later. Adding the following line to /etc/hosts makes the bug tracker fast when python.org is down: 127.0.0.1 python.org This is because bugs.python.org works fine, but it links to CSS

Re: [Python-Dev] [PEPs] Rebooting PEP 394 (aka Support the /usr/bin/python2 symlink upstream)

2011-07-24 Thread Antoine Pitrou
On Wed, 20 Jul 2011 01:53:09 -0500 Kerrick Staley wrote: > On Mon, Jul 18, 2011 at 3:03 AM, Ned Deily wrote: > > I think adding the requirement to mandate hard link vs soft link usage > > is an unnecessary and unwarranted attempt at optimization. For > > instance, IIRC, the OS X installers don't

Re: [Python-Dev] [PEPs] Rebooting PEP 394 (aka Support the /usr/bin/python2 symlink upstream)

2011-07-24 Thread Antoine Pitrou
On Sun, 24 Jul 2011 23:16:55 +0200 Antoine Pitrou wrote: > > I think the recommendation should be symbolic links for all systems. > Hard links are generally harder to discover, while it is trivial to > find out that a given file is a symbolink link, and to which other file. > The optimization is

[Python-Dev] Comments of the PEP 3151

2011-07-24 Thread Victor Stinner
Arguments in favor of specific errors - Using specific errors avoids the need of "import errno". The import is sometimes done in the except block, which may raise a new error (and may be slow). I like specific exceptions because it avoids the need of re-raise

Re: [Python-Dev] Comments of the PEP 3151

2011-07-24 Thread Antoine Pitrou
Hello, > By the way, is it faster to not handle and than re-raise unwanted > exceptions? You mean "is it faster to not handle than re-raise unwanted exceptions?". It probably is, yes. > I don't understand how Antoine decided which errno should have an > exception or not. Mostly experience with

Re: [Python-Dev] Comments of the PEP 3151

2011-07-24 Thread Stephen J. Turnbull
Antoine Pitrou writes: > > Did someone test Blender, Django or another major applications on the > > implementation of the PEP 3151? > > Does Django have a working Python 3 port yet? Define "working". Martin ported Django to Python 3 years ago as proof of concept, but never claimed it was r

Re: [Python-Dev] is sys.modules not meant to be replaced?

2011-07-24 Thread Eric Snow
On Sun, Jul 24, 2011 at 12:54 AM, Nick Coghlan wrote: > On Sun, Jul 24, 2011 at 3:05 PM, Eric Snow > wrote: >> Are there other objects in the interpreter state that are exposed in >> sys that would have the same problem? > > Rebinding (rather than mutating) any global state in any module is > al

Re: [Python-Dev] Comments of the PEP 3151

2011-07-24 Thread Nick Coghlan
On Mon, Jul 25, 2011 at 9:56 AM, Victor Stinner wrote: > By the way, is it faster to not handle and than re-raise unwanted > exceptions? Yes, but probably not that much faster given the overhead of instantiating the exception and unwinding the stack in the first place. > Choice of the specific e

Re: [Python-Dev] is sys.modules not meant to be replaced?

2011-07-24 Thread Nick Coghlan
On Mon, Jul 25, 2011 at 2:50 PM, Eric Snow wrote: > I agree with what you are saying wholeheartedly, but still think there > is something fishy with the way that sys.modules works.  I'll take it > from here to a tracker issue though. :) Yup - the import system has a whole mess of interrelated glo

Re: [Python-Dev] is sys.modules not meant to be replaced?

2011-07-24 Thread Martin v. Löwis
> I agree with what you are saying wholeheartedly, but still think there > is something fishy with the way that sys.modules works. I'll take it > from here to a tracker issue though. :) Well, there is a short answer to you question: sys.modules is *not* meant to be replaced. Doing so will result