[Zope3-dev] Zope3 vs CVS Python

Shane Hathaway shane@zope.com
Tue, 06 Aug 2002 09:49:35 -0400


Jeremy Hylton wrote:
>>>>>>"TP" == Tim Peters <tim@zope.com> writes:
>>>>>
> 
>   TP> [Jeremy Hylton]
>   >> Can you run httplib.py as a script?  There's a bit of test code
>   >> that is run if __name__ == "__main__".  I've made a bunch of
>   >> changes to httplib recently, but haven't tested then on Windows.
> 
>   TP> Cool!  It's not immediately obvious to me whether running it
>   TP> failed or passed, but it didn't raise any exceptions.  I'll
>   TP> attach the output (there's some binary data in it, so maybe it
>   TP> won't come across intact).
> 
> Thanks!  That looks okay by me.  You should really ship OpenSSL with
> Python on Windows so that the test produces more output <wink>.
> 
> I guess I'll wait for Shane to point a finger at someone who changed
> httplib before looking at it more.

Is "someone" the same as "whoever"? ;-)

Just for kicks I once set up Zope3 in Wine to see if I could reproduce 
some of the HTTP bugs I'd heard about.  I had to make changes to the C 
code to get it to compile, but once it compiled, all the tests passed. 
(In fact the Pystones were higher under Wine than they were under normal 
Linux!)  I guess this method wouldn't uncover Win9x-specific bugs, 
though. ;-)

That brings me to a slightly different topic that still fits the subject 
line.  If anyone can help, I'd like to understand why gcc 2.95.3 under 
Wine doesn't think PyType_GenericNew, PyType_GenericAlloc, 
_PyObject_GC_Del are constants.  Compiling the Zope3 modules that use 
these constants in the PyTypeObject struct results in errors like this:

wrapper.c:228: initializer element is not constant
wrapper.c:228: (near initialization for `WrapperType.tp_alloc')
wrapper.c:230: initializer element is not constant
wrapper.c:230: (near initialization for `WrapperType.tp_free')
error: command 'gcc' failed with exit status 1

I got around this in my own sandbox by setting the slots in the module 
initialization function instead.  Have you guys seen this before, and do 
you know why Unix gcc behaves differently?

Shane