Re: reloading modules (was Re: [Zope3-dev] Re: Google SoC Project)

2006-05-12 Thread Jim Fulton
Shane Hathaway wrote: ... 2) Make reloadable code fundamentally different. Yes. If module X is supposed to be reloadable, and X creates a module-level global variable Y, and module Z imports Y, then Y needs to be decorated in such a way that Z's view of Y can change automatically when X is

Re: reloading modules (was Re: [Zope3-dev] Re: Google SoC Project)

2006-05-12 Thread Shane Hathaway
Jim Fulton wrote: I also think there is a real opportunity in allowing reload to fail. That is, it should be possible for reload to visibly fail so the user knows that they have to restart. Then we only reload when we *know* we can make changes safely and fail otherwise. For example, in the

Re: reloading modules (was Re: [Zope3-dev] Re: Google SoC Project)

2006-05-10 Thread Adam Groszer
Hi Shane, Please have a look at http://www.pythomnic.org/. As I get it, it puts proxies around 'imported' modules. My idea would be, without thinking it any further/deeper is what about putting proxies before any imported stuff. Modules, callables, variables, everything and evaluate the

reloading modules (was Re: [Zope3-dev] Re: Google SoC Project)

2006-05-09 Thread Shane Hathaway
Adam Groszer wrote: What about pushing the problem then to the lower level, to Python itself. I think all developers are fighting the same problem, so all Python developers would benefit from the solution. As I know (that may be wrong) not many even if any language supports that, so that would