1. fanstatic
  2. fanstatic
  3. fanstatic
  4. Issues
Issue #15 resolved

is LibraryRegistry pulling its weight?

faassen
created an issue

I know I am the one who suggested a class in the first place, but it doesn't look like it's pulling its weight. There is only one place where the library registry is used, and that's in wsgi.py to construct the Fanstatic middleware. There it could just as well call a function that gets all libraries from entry points.

Comments (4)

  1. Jan-Wijbrand Kolman
    • changed status to open

    The idea was - AFAICT - to have an API for dynamically adding libraries that are not defined in entry points. There's multiple use cases for this, for one in testing.

    We did have such an API, being a set of module-level functions. Now we have contained this (small) set of functions in a "singleton" instance. I think that containment is not bad at all.

    BTW, it is not just the Fanstatic middleware in wsgi.py that is calling for the registered libraries. The support/glue libraries (like zope.fanstatic) needs to call for the registered libraries as well.

  2. faassen reporter

    We need to be get more clarity for the use cases of the registry. I had trouble writing coherent API documentation for it. Do we really need a full dictionary API? What is actually being used by support libraries? We know Fanstatic only needs to get a list of libraries.

  3. Log in to comment