Mark Dickinson wrote:
What are the current plans for PEP 328 (the absolute imports PEP) in Python 2.x?
The PEP says:
"""In Python 2.6, any import statement that results in an
intra-package import will raise DeprecationWarning (this also applies
to from <> import that fails to use the relative import syntax). In
Python 2.7, import will always be an absolute import (and the
__future__ directive will no longer be needed)."""
As far as I can tell, there's no DeprecationWarning in 2.6.
I'm wondering whether this decision was revised at some point (I
wasn't able to find anything by searching the archives), or whether
the DeprecationWarning just got forgotten about.
If the latter, should the DeprecationWarning be introduced in 2.7?
Not sure about the decision one way or the other. But if there's not
going to be a 2.8, and if DeprecationWarnings are off by default anyway,
I'm not sure it makes any sense to add a DeprecationWarning in 2.7. From
my quick testing, -3 doesn't warn about relative imports. Perhaps a
better strategy in this particular case is to make -3 give that warning?
Aside:
We really need a better way to track things we need to do in the next
version of Python so things like this don't fall through the cracks. We
added a 3.2 version tag before 3.1 was released so that we could add a
few "remember to do this in 3.2" issues dealing with deprecations.
Perhaps it's time to add a 3.3 version tag? I don't think we should add
a 2.8 tag, that would give false hope.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com