RE: [Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Tim Peters
[Evan Simpson] > ... > While creating the test, though, I ran across some disturbing > behavior. In interactive mode (and when running unit tests) > something is getting confused: ... [examples snipped] ... I copied the rest into a Python bug report, since it didn't appear to have anything to do

Re: [Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Jamie Heilman
Evan Simpson wrote: > Argh. Scripts need a __name__ defined, or various activities choke. It > can't be the Id of the Script, since that can contain '.', which screws > up imports in the Script. It can't be None, since that will cause this > problem. > > Are there hidden gotchas lurking arou

Re: [Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Evan Simpson
Tim Peters wrote: it *looks* like you could leave name None, but set '__file__' to something (non-None) explicitly. Thanks! This seems to do the trick, and I have a unit test that fails before and passes after the change. While creating the test, though, I ran across some disturbing behavior. I

RE: [Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Tim Peters
[Tim Peters] >> The globals set up for running the script appear not to contain a >> '__file__' key, and have a '__name__' key explicitly set to None. >> If it set either of these to something useful, or didn't have a >> '__name__' key explicitly set to None, warning.warn() would have >> been able