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 Rosuav
Recipients Arfrever, Rosuav, auslander1970, brett.cannon, eric.snow, flox, fossilet, ncoghlan, pitrou
Date 2016-01-15.02:53:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452826405.65.0.159687172335.issue18018@psf.upfronthosting.co.za>
In-reply-to
Content
If someone made a new way of importing and had it raise ValueError on some issue or other, I think there'd be complete consensus that that's the wrong exception. Yes, this is incompatible with Python 2 - but there are a lot of corner cases in the 3.3+ import code that differ from 2.7. What we have is a code error ("relative imports outside of packages don't make sense, dummy!") and the only difference is which exception is being raised (ValueError, SystemError, ImportError). It's not like working code has different semantics.

But even if ValueError is chosen, I would still greatly prefer that to SystemError. When my student told me he was getting SystemError, I started trying to diagnose a corrupted venv, not a buggy script.
History
Date User Action Args
2016-01-15 02:53:25Rosuavsetrecipients: + Rosuav, brett.cannon, ncoghlan, pitrou, fossilet, Arfrever, flox, eric.snow, auslander1970
2016-01-15 02:53:25Rosuavsetmessageid: <1452826405.65.0.159687172335.issue18018@psf.upfronthosting.co.za>
2016-01-15 02:53:25Rosuavlinkissue18018 messages
2016-01-15 02:53:25Rosuavcreate