Re: [sqlalchemy] Advice on multiple ORM classes in multiple files and imports

2015-03-02 Thread Martino Io
Thanks for your help Simon, I've found the issue to be related to mixed source imports and duplicate paths set in eclipse, which both lead to a double import situation; again thanks for the useful links. -- Marcin 2015-03-02 13:19 GMT+01:00 Simon King si...@simonking.org.uk: Hi Martin,

Re: [sqlalchemy] Advice on multiple ORM classes in multiple files and imports

2015-03-02 Thread Simon King
Hi Martin, Normally, Python caches modules after they are imported, so when you import a module for the second time it doesn't actually execute the code again. If you have 3 modules, one, two and common, and one and two both import common, common should only be loaded once. However, there are a

Re: [sqlalchemy] Advice on multiple ORM classes in multiple files and imports

2015-03-02 Thread Martino Io
Hi Simon, definitely multiple imports is the issue here, however I don't know how to get rid of it, let's say I have a module which i named ormstuff inside it I have a class named mybase, I do have 2 other modules which are using this class, and to do so I import it in both places. Now this might

[sqlalchemy] Advice on multiple ORM classes in multiple files and imports

2015-03-02 Thread Martino Io
Hello, I've been busy writing an application which now has grown considerably, it spans across several packages/modules totalling 200K lines of python code. Recently I made some changes to the structure and decided to split several classes into separate modules for greater flexibility; the

Re: [sqlalchemy] Advice on multiple ORM classes in multiple files and imports

2015-03-02 Thread Simon King
On Mon, Mar 2, 2015 at 11:29 AM, Martino Io martino8...@gmail.com wrote: Hello, I've been busy writing an application which now has grown considerably, it spans across several packages/modules totalling 200K lines of python code. Recently I made some changes to the structure and decided to