Re: How to improve the usability of nested packages

2012-11-05 Thread Rouslan Korneychuk
On 11/02/2012 12:11 PM, Michael Schwarz wrote: … which doesn't work. Some of the modules reference other modules in the same package. I'm not talking about cyclic references, but, for example, the "dialog" module uses the "transaction" module. The problem is that the "dialog" module uses the same

Re: How to improve the usability of nested packages

2012-11-03 Thread Michael Schwarz
Hi Stefan On 2012-W44-5, at 19:23, Stefan H. Holek wrote: > That said, there are ways to avoid import cycles. One is to very carefully > craft your modules so they do not have to import from each other. Another is > to not have imports at the module level, but move them into the functions > wh

Re: How to improve the usability of nested packages

2012-11-03 Thread Michael Schwarz
Hi Terry On 2012-W44-5, at 18:56, Terry Reedy wrote: >> or would you maybe structure the library entirely different? > > Based on my limited experience with subpackages* plus reports on this list > about problems, such as yours, I have concluded that subpackages are an > attractive nuisance th

Re: How to improve the usability of nested packages

2012-11-02 Thread Stefan H. Holek
Hi Michael, What we have learned from creating the Zope Toolkit (formerly Zope 3), is that __init__.py files in namespace packages should be empty, and imports should be absolute. [1] That said, there are ways to avoid import cycles. One is to very carefully craft your modules so they do not h

Re: How to improve the usability of nested packages

2012-11-02 Thread Terry Reedy
nested package == subpackage or would you maybe structure the library entirely different? Based on my limited experience with subpackages* plus reports on this list about problems, such as yours, I have concluded that subpackages are an attractive nuisance that are generally more trouble tha