Issue2070

classification
Title: Relative star import does not work
Type: Severity: critical
Components: Core Versions: Jython 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: driax, epiasini, sisi, tkanerva, zyasoft
Priority: Keywords:

Created on 2013-07-22.11:47:25 by driax, last changed 2014-04-03.18:26:19 by zyasoft.

Messages
msg8071 (view) Author: Adrian Tejn Kern (driax) Date: 2013-07-22.11:47:24
import .configuration import *

does not work with the error

SyntaxError: ("'import *' not allowed with 'from .'", ('__pyclasspath__/IPython/config/__init__.py', 16, 0, ''))

As you can see such code is used in IPython and is supported both by Python 2.7 and Python 3.3. Is there any good reason why Jython 2.7 beta does not support it?
msg8095 (view) Author: (sisi) Date: 2013-08-28.11:14:05
relative imports are basic Python 2.7 and therefor, in my opinion, must be supported in jython as well.
Also this prevents from using ipython with jython
msg8193 (view) Author: (epiasini) Date: 2013-12-09.22:07:24
No other Python implementation does this. My understanding is that this restriction was proposed at some point, but ultimately lifted.

Guido Van Rossum, in March 2008, asked about why it got there in the first place, and if he would have considered lifting it, said:
"I don't recall the reason; it may simply be due to the complexity, or
possibly it would have made the _import__ API even uglier.
I'm fine with removing the restriction[...]."

(from the python-3000 mailing list - https://mail.python.org/pipermail/python-3000/2008-March/012565.html)
msg8248 (view) Author: topi kanerva (tkanerva) Date: 2014-03-07.11:16:36
Apparently this is a duplicate of bug #1973
msg8249 (view) Author: (epiasini) Date: 2014-03-07.11:31:42
The bug is the same, even though the descriptions are different (and in my opinion this one is more accurate and easier to find). Anyway, thanks for pointing this out and providing a patch. It would be great if this bug could be marked as a duplicate and your patch accepted, but I don't think that's gonna happen anytime soon..
msg8269 (view) Author: Jim Baker (zyasoft) Date: 2014-04-03.18:26:18
Duplicate of #1973
History
Date User Action Args
2014-04-03 18:26:19zyasoftsetstatus: open -> closed
resolution: duplicate
messages: + msg8269
nosy: + zyasoft
2014-03-07 11:31:42epiasinisetmessages: + msg8249
2014-03-07 11:16:36tkanervasetnosy: + tkanerva
messages: + msg8248
2013-12-09 22:07:25epiasinisetmessages: + msg8193
2013-12-09 22:00:04epiasinisetnosy: + epiasini
2013-08-28 11:14:05sisisetnosy: + sisi
messages: + msg8095
severity: normal -> critical
2013-07-22 11:47:25driaxcreate