[Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/init.py (original) (raw)
Guido van Rossum guido at python.org
Wed Mar 15 19:33:14 CET 2006
- Previous message: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py
- Next message: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <thomas at python.org> wrote:
On 3/15/06, guido.van.rossum <python-checkins at python.org> wrote: > > Use relative imports in a few places where I noticed the need. > (Ideally, all packages in Python 2.5 will use the relative import > syntax for all their relative import needs.) You should be aware that using relative imports (or absolute imports) in the standard library may cause custom import's that don't take the optional fifth argument to break, whereas using 'old-style' imports does not. I don't know how common custom import hooks are, and adding the optional fifth argument is backwardly compatible, but I would personally not add absolute or relative imports to the oft-used parts of the stdlib until after 2.5. On the other hand, code using sys.pathhooks (like zipimport) don't need any tweaking, as the absolute/relative choice is made before they are queried, so I don't know howmuch impact this has, all in all. -- Thomas Wouters <thomas at python.org> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py
- Next message: [Python-Dev] [Python-checkins] r43033 - in python/trunk/Lib: distutils/sysconfig.py encodings/__init__.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]