[Web-SIG] entry points, etc

Jim Fulton jim at zope.com
Sat Jul 7 17:15:12 CEST 2007

On Jul 6, 2007, at 11:55 PM, Ian Bicking wrote:

> Incidentally, something that would be nice with wsgiconfig is if we
> could all agree on how to specify things like entry points and  
> objects.
>   Specifically Paste Deploy uses egg:Distribution#ep_name, and
> zc.buildout uses Distribution:ep_name.  And Paste Deploy defaults to
> ep_name=main while zc.buildout defaults to ep_name=default.


Some notes.  # is unattractive to me because it looks like a  
comment.  ConfigParser is a bit odd in it's treatment of #s.  It  
treates them as comments after empty lines and after section names,  
but not after comments.

I used ":" because setuptools uses module:name when defining entry  
points.  That may not have been a good reason.

If we agree on some standard, I'll support it.  That should happen  
over on the distutils-sig list.

> Paste Deploy uses "entry_point_type = object.name" when you aren't  
> using
> an entry point, but I'd like to switch to just "object.name" with an
> optional "object.name [ep_type]".  This helps out those people who  
> have
> some hangup with writing their own setup.py.  So having a clear way to
> distinguish between an object reference and an entry point reference
> would be ideal.  I still would prefer the entry points, as they  
> make it
> easier to search the system for providing objects and easier to handle
> backward compatibility, but I don't have any reason to *require* entry
> points in my code generally.

It is hard to assess this out of context. I will note that setuptools  
uses dotted_module_name:dotted_object_name to name objects and I'd be  
inclined to be consistent with that. If we used a different delimiter  
between eggs and entry points and between modules and names, then  
we'd be able to tell the refrecnes apart.  Again, I think this is  
more general than web applications.


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 Web-SIG mailing list