homepage

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 jaraco
Recipients brett.cannon, eric.snow, jaraco
Date 2012年01月30日.19:31:05
SpamBayes Score 1.0928885e-08
Marked as misclassified No
Message-id <1327951866.42.0.131744955264.issue13912@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry for the mistake.
I corrected the pkgB package, but the result is the same:
 jaraco@devjaraco:~$ tree master
 master
 ├── __init__.py
 ├── __init__.pyc
 ├── pkgA
 │  ├── foo.py
 │  ├── foo.pyc
 │  ├── __init__.py
 │  └── __init__.pyc
 └── pkgB
 ├── bar.py
 └── __init__.py
 2 directories, 8 files
 jaraco@devjaraco:~$ python2.7 -c 'import master.pkgA; print("pkgA.__package__ is {}".format(master.pkgA.__package__)); import master.pkgA.foo'
 pkgA.__package__ is None
 Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "master/pkgA/foo.py", line 2, in <module>
 bar = __import__('pkgB', level=1).bar
 ImportError: No module named pkgB
As you can see, __package__ for pkgA is None. Same is true for master.__package__.
History
Date User Action Args
2012年01月30日 19:31:06jaracosetrecipients: + jaraco, brett.cannon, eric.snow
2012年01月30日 19:31:06jaracosetmessageid: <1327951866.42.0.131744955264.issue13912@psf.upfronthosting.co.za>
2012年01月30日 19:31:05jaracolinkissue13912 messages
2012年01月30日 19:31:05jaracocreate

AltStyle によって変換されたページ (->オリジナル) /