On 11 Apr, 08:39 pm, exar...@divmod.com wrote:
On Sat, 11 Apr 2009 21:54:08 +0200, Esteve Fernandez <est...@sindominio.net> wrote:

Shouldn't twisted and twisted/plugins be non-importable? I thought twisted and twisted/plugins must not have __init__.py files in order for the plugin system to be able to find them (through getPlugins). Or did that behavior
change in recent versions?

They must not have __init__.py files, indeed.  However, the files in
twisted/plugins/ still define sub-modules of the twisted.plugins package
due to the code in Twisted's twisted/plugins/__init__.py.

They must not have __init__.py files specifically to avoid *conflicting* with this Twisted's twisted/plugins/__init__.py. Since the idea is that, during installation, your foo_plugin.py will go into the site's twisted/plugins directory, we forbid projects to make twisted/plugins a package because otherwise one package would stomp over the other's __init__.py and break things.

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to