On Wed, 27 Aug 2014, Sean Dague wrote:

Here is the problem when it comes to working with code from git, in
python, that uses namespaces, it's kind of a hack that violates the
principle of least surprise.

It's true this problem does happen...

So I'd like us to revisit using a namespace for glance, and honestly,
for other places in OpenStack, because these kinds of violations of the
principle of least surprise is something that I'd like us to be actively
minimizing.

...but on the otherhand using namespaces can be really handy. For
sake of example, the thing I used to work on (TiddlyWeb) using
namespace packages for plugins. The namespace is (surprise)
'tiddlywebplugins'[1].

To get around the issues you're describing, especially during
development, we cooked up an ugly hack called the "mangler" that
establishes the namespace properly. You can see a sample in Tank,
which is a plugin for TiddlyWeb:

   https://github.com/cdent/tank/blob/master/mangler.py

Yes, it's ooogly, but if you want namespaces (and under the right
circumstances they can be "one honking great idea"), it helps. May
be something to steal there.

[1] I do think, when using namespaces, that you must have a namespace
    for the extensions different from whatever the thing being
    extended is using.

--
Chris Dent tw:@anticdent freenode:cdent
https://tank.peermore.com/tanks/cdent

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to