This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients J Richard Snape, Patrick Maupin, brett.cannon, docs@python, eric.snow, flatsieve, ncoghlan
Date 2015-10-07.03:52:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444189926.83.0.233354206198.issue25294@psf.upfronthosting.co.za>
In-reply-to
Content
We seem to be talking past each other, so let's take a step back and ensure we have a common understanding of the absolute/relative terminology:

"import x.y.z" is an absolute import
"from x.y import z" is still an absolute import.
"from . import z" is an explicit relative import of a child or sibling module
"from .y import z" is also an explicit relative import

The relevant change in behaviour is between the "import x.y.z" form and the "from x.y import z" form due to the change in the way the related name binding (and name lookup in 3.5+) works, not between absolute and relative imports.

The relevant terminology to distinguish between "from ... import ..." vs "import ..." is just "from import" vs "non-from import", and there are definitely cases where from imports will work, but non-from imports will fail. That's not a style issue, it's a use-whichever-one-works for your code issue.
History
Date User Action Args
2015-10-07 03:52:06ncoghlansetrecipients: + ncoghlan, brett.cannon, docs@python, eric.snow, Patrick Maupin, flatsieve, J Richard Snape
2015-10-07 03:52:06ncoghlansetmessageid: <1444189926.83.0.233354206198.issue25294@psf.upfronthosting.co.za>
2015-10-07 03:52:06ncoghlanlinkissue25294 messages
2015-10-07 03:52:06ncoghlancreate