Fwd: [Zope3-dev] Re: RFC: Zope Configuration Egg Support
Jim Fulton
jim at zope.com
Mon Oct 23 10:28:05 EDT 2006
Fred Drake wrote:
> Resending; something went wrong along the way...
>
> ---------- Forwarded message ----------
> From: Fred Drake <fdrake at gmail.com>
> Date: Oct 23, 2006 9:44 AM
> Subject: Re: [Zope3-dev] Re: RFC: Zope Configuration Egg Support
> To: Jim Fulton <jim at zope.com>
> Cc: Rocky Burt <rocky at serverzen.com>, Zope 3 Development
> <zope3-dev at zope.org>
>
>
> On 10/23/06, Jim Fulton <jim at zope.com> wrote:
>> Perhaps we should change the package option so that it uses the
>> pkg_resources
>> API to load ZCML files from packages. There are still cases where egg
>> != package
>> that would need to be addressed specifically.
>
> There's this draft proposal; I guess it's time for me to finish this:
>
> http://zope3.zwiki.org/ZIPImportSupportForZope3
>
> This reflects work I did at the Goldegg packaging sprint in San Jose.
> The changes from the branch should be easy to move forward if people
> agree that it's a reasonable approach. It offers the advantages that
> 1) there's already code, with tests, and 2) it works with all imports
> from ZIP files, not just eggs.
So I guess for loading configuration files, it uses a more general API.
I think this is good for the case where we load from a package.
I think we need to think harder about the file-access API. I'm not sure
what the point of making file references string subclasses is. Some other
questions on the file-resource API:
- What is the basepath argument to the new method used for?
- What is the "context" of the caller to packageReference?
Finally, we need to be able to deal with some cases that pkg_resources
will deal with that I think the API you used won't, namely:
- setuptools namespace packages, and
- loading from eggs who's names are not package names.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list