Issue2259
Created on 2015-01-21.23:59:21 by Arfrever, last changed 2015-05-24.07:28:16 by jeff.allen.
msg9438 (view) |
Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) |
Date: 2015-01-21.23:59:21 |
|
This problem is absent without "from __future__ import absolute_import".
$ cd /tmp
$ mkdir test
$ touch test/__init__.py
$ echo $'from __future__ import absolute_import\nfrom . import *' > test/x.py
$ echo $'from __future__ import absolute_import\nfrom .z import *' > test/y.py
$ touch test/z.py
$ tree test
test
├── __init__.py
├── x.py
├── y.py
└── z.py
0 directories, 4 files
$ cat test/x.py
from __future__ import absolute_import
from . import *
$ cat test/y.py
from __future__ import absolute_import
from .z import *
$ python2.7 -c 'import test.x'
$ python2.7 -c 'import test.y'
$ jython2.7 -c 'import test.x'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "test/x.py", line 2, in <module>
from . import *
ValueError: Empty module name
$ jython2.7 -c 'import test.y'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "test/y.py", line 2, in <module>
from .z import *
ImportError: No module named z
$
|
msg9997 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2015-05-03.20:11:21 |
|
Turns out to be a duplicate of #2158, currently fixed on my local repo:
> type test\x.py
from __future__ import absolute_import
from . import *
> type test\y.py
from __future__ import absolute_import
from .z import *
> type test\z.py
#
> type test\__init__.py
#
> %jt%\dist\bin\jython -c"import test.x"
> %jt%\dist\bin\jython -c"import test.y"
>
|
msg10075 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2015-05-24.07:28:15 |
|
Fixed at: https://hg.python.org/jython/rev/9483b3252bd5
|
|
Date |
User |
Action |
Args |
2015-05-24 07:28:16 | jeff.allen | set | status: open -> closed resolution: fixed messages:
+ msg10075 |
2015-05-03 20:11:21 | jeff.allen | set | messages:
+ msg9997 |
2015-05-03 11:53:23 | jeff.allen | set | assignee: jeff.allen nosy:
+ jeff.allen |
2015-01-22 00:49:54 | Arfrever | set | components:
+ Core |
2015-01-21 23:59:21 | Arfrever | create | |
|