Message8590

Author Arfrever
Recipients Arfrever, fwierzbicki, tkanerva, zyasoft
Date 2014-06-02.01:31:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401672677.78.0.529653548023.issue2158@psf.upfronthosting.co.za>
In-reply-to
Content
$ rm -fr /tmp/tests
$ mkdir /tmp/tests
$ cd /tmp/tests
$ echo "from .b import *" > a.py

  1. Incorrect exception for relative import in non-package:

$ python2.7 -c 'import a'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "a.py", line 1, in <module>
    from .b import *
ValueError: Attempted relative import in non-package
$ jython2.7 -c 'import a'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "a.py", line 1, in <module>
    from .b import *
ImportError: No module named b
$ 

  2. Incorrect success of searching for module:

$ touch b.py
$ python2.7 -c 'import a'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "a.py", line 1, in <module>
    from .b import *
ValueError: Attempted relative import in non-package
$ jython2.7 -c 'import a'
$
History
Date User Action Args
2014-06-02 01:31:17Arfreversetrecipients: + Arfrever, fwierzbicki, zyasoft, tkanerva
2014-06-02 01:31:17Arfreversetmessageid: <1401672677.78.0.529653548023.issue2158@psf.upfronthosting.co.za>
2014-06-02 01:31:17Arfreverlinkissue2158 messages
2014-06-02 01:31:16Arfrevercreate