[Python-Dev] Re: PEP 328 -- relative and multi-line import (original) (raw)
Aahz aahz at pythoncraft.com
Mon Apr 5 12:11:09 EDT 2004
- Previous message: [Python-Dev] Re: PEP 328 -- relative and multi-line import
- Next message: [Python-Dev] Re: PEP 328 -- relative and multi-line import
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Apr 05, 2004, Bernhard Herzog wrote:
Aahz <aahz at pythoncraft.com> writes:
You may use relative imports freely. In Python 2.5, any
importstatement that results in an intra-package import will generate aPendingDeprecationwarning (this also applies tofrom <> importthat fails to use the relative import syntax). In Python 2.6,importwill always be an absolute import. Why PendingDeprecation? If the import semantics change in incompatible ways in 2.6, 2.5 should generate a "normal" DeprecationWarning, I think.
Guido can overrule this, but my take is that there will be few enough cases where this is a significant issue. People who want to write cross-version libraries and applications shouldn't have to deal with suppressing the DeprecationWarning. If we were serious about issuing a DeprecationWarning, I think that would need to be in Python 2.6, pushing the default of absolute imports to Python 2.7. That seems too long a timeline to me.
Other opinions?
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Why is this newsgroup different from all other newsgroups?
- Previous message: [Python-Dev] Re: PEP 328 -- relative and multi-line import
- Next message: [Python-Dev] Re: PEP 328 -- relative and multi-line import
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]