On Dec 28, 2010, at 8:33 PM, Philip Jenvey wrote:

> 
> On Dec 28, 2010, at 11:54 AM, Michael Bayer wrote:
> 
>> 
>> On Dec 28, 2010, at 2:22 AM, Wichert Akkerman wrote:
>> 
>>> On 2010-12-28 08:18, Hong Minhee wrote:
>>>> I don’t know why setuptools provides pkg_resources, implements another
>>>> incompatible way to declare namespace packages, additionally in spite of
>>>> existence of pkgutil.extend_path, the standard way to do it. IMO
>>>> sqlalchemy.contrib namespace have to be declared by using
>>>> pkgutil.extend_path, because it is a part of Python standard library so
>>>> it don’t force users to install setuptools.
>>> 
>>> The vast majority of packages using namespaces that I have seen support 
>>> both with this snippet:
>>> 
>>> try:
>>>  __import__('pkg_resources').declare_namespace(__name__)
>>> except ImportError:
>>>  from pkgutil import extend_path
>>>  __path__ = extend_path(__path__, __name__)
>>> 
>>> 
>>> I would suggest that SQLAlchemy does the same thing.
>> 
>> what are some of these packages ?   Can I see some examples so I can get a 
>> feel for how this is used and what naming schemes are common ?
> 
> Paste/Script/Deploy and the repoze projects come to mind. Here's some others:
> 
> http://www.google.com/codesearch?hl=en&lr=&q=file%3A__init__%5C.py%24+pkg_resources+pkgutil&sbtn=Search

Here's what I see in all of those - its in the root package, not a ".contrib".  
 That seems a little curious ?    Our root package has a lot of names pulled in 
already so I don't suppose we can/should really go that route.



> 
> --
> Philip Jenvey
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to