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 geryon
Recipients geryon
Date 2013-01-25.12:57:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359118666.97.0.0299772103321.issue17030@psf.upfronthosting.co.za>
In-reply-to
Content
$ cat a.py
import dbus
import b
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
print "Hello, World."
$ cat b.py
import dbus.mainloop.glib
$ python a.py
Hello, World.
$

If I remove the “import b” line, the output is:

$ python a.py
Traceback (most recent call last):
  File "a.py", line 3, in <module>
    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
AttributeError: 'module' object has no attribute 'mainloop'
$

In my opinion this is inconsistent. Either both versions should fail with that error, because “dbus.mainloop.glib” is imported in “b”, not “a”; or both should succeed, because “a” imports dbus.

This is Python 2.7.3 and python-dbus 1.0.0 on Ubuntu 12.4.2
History
Date User Action Args
2013-01-25 12:57:47geryonsetrecipients: + geryon
2013-01-25 12:57:46geryonsetmessageid: <1359118666.97.0.0299772103321.issue17030@psf.upfronthosting.co.za>
2013-01-25 12:57:46geryonlinkissue17030 messages
2013-01-25 12:57:46geryoncreate