Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Thomas Wouters
On 3/15/06, guido.van.rossum [EMAIL PROTECTED] wrote: Use relative imports in a few places where I noticed the need.(Ideally, all packages in Python 2.5 will use the relative importsyntax for all their relative import needs.)You should be aware that using relative imports (or absolute imports) in

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Guido van Rossum
Well, absolute imports without the future statement will not use the 5th argument, so they won't break, right? That's what MAL also says. Someone please fix this. On 3/15/06, Thomas Wouters [EMAIL PROTECTED] wrote: On 3/15/06, guido.van.rossum [EMAIL PROTECTED] wrote: Use relative imports

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Phillip J. Eby
At 10:33 AM 3/15/2006 -0800, Guido van Rossum wrote: Well, absolute imports without the future statement will not use the 5th argument, so they won't break, right? That's what MAL also says. Someone please fix this. Why is a 5th argument needed to do absolute imports? Shouldn't it suffice to

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Guido van Rossum
Because Thomas designed it this way. :-) I believe his design makes sense though: import foo translates to __import__(foo, ...). There's a separate setting, only known to the compiler, that says whether from __future__ import absolute_import is in effect (there's no way to slip a flag into

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Phillip J. Eby
At 01:34 PM 3/15/2006 -0800, Guido van Rossum wrote: Because Thomas designed it this way. :-) I believe his design makes sense though: import foo translates to __import__(foo, ...). There's a separate setting, only known to the compiler, that says whether from __future__ import absolute_import

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Guido van Rossum
On 3/15/06, Phillip J. Eby [EMAIL PROTECTED] wrote: Ah, so it's *relative* imports that require a 5th argument. I was thinking it was there to support absolute imports. I was thinking that relative imports could be implemented by popping bits off of __name__ to get an absolute location.

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Jeremy Hylton
On 3/15/06, Guido van Rossum [EMAIL PROTECTED] wrote: Well, absolute imports without the future statement will not use the 5th argument, so they won't break, right? That's what MAL also says. Someone please fix this. I'd much rather see us change imports to use absolute imports than to use

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Barry Warsaw
On Wed, 2006-03-15 at 17:33 -0500, Jeremy Hylton wrote: On 3/15/06, Guido van Rossum [EMAIL PROTECTED] wrote: Well, absolute imports without the future statement will not use the 5th argument, so they won't break, right? That's what MAL also says. Someone please fix this. I'd much rather

Re: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py

2006-03-15 Thread Guido van Rossum
Done. Index: pep-0008.txt === --- pep-0008.txt(revision 42952) +++ pep-0008.txt(working copy) @@ -156,8 +156,9 @@ - Relative imports for intra-package imports are highly discouraged. Always use the