[Zope3-dev] Zope3 vs CVS Python

Tim Peters tim_one@email.msn.com
Tue, 6 Aug 2002 23:55:45 -0400


[Guido]
> You realize that 'UNKNOWN' is a constant in httplib.py and used to
> initialize self.length, right?  (In __init__.)

Yes.

> It looks like the read() method is simply not expecting this when it
> tests for "if self.length is not None" a few lines before line 431
> (the crash point).

I don't know; as I said, the other problem with the NULL-pointer crash under
a debug build looked more important to me, and I assume (with nearly 100%
chance of being correct <wink>) that dozens of people would be more
efficient in tracking down an httplib-related glitch than I would be (while
I'm more likely to make progress on the NULL-pointer crash).

> Hm, didn't you say that this doesn't fail under Python 2.2.1?

Right, that's true under Win98SE.  I didn't try that under Win2K, but would
be surprised if it weren't also true there.

> And that it started failing about a month ago?

I didn't say that, no.  Yesterday was the first time in a long time I had
completely clean checkouts of both Zope3 and CVS Python, and I just reported
what I saw then.  As far as I can remember, the pipelining test has never
passed when I've tried it, but used to fail in a different way (something
about an "unprintable instance object").

> Maybe the recent changes to socket.py or socketmodule.c for timeout
sockets
> have broken this, by changing the way buffering is done.  The HTTPResponse
> class uses sock.makefile(), whose Windows implementation *did* change as
part
> of the timeout changes; and I don't have 100% faith in the changes.
>
> You could try reverting socket.py to revision 1.19; this will break
> the timeout feature, but AFAIK Zope doesn't use that, and it should
> revert any changes introduced by that feature to the _fileobject class
> returned (on Windows only) by s.makefile().

OK, I'll try this, but not today.

> If that makes the failures go away, we can do a close reading of the
> changes to _fileobject tomorrow.  (We'll make you a socket expert
> yet. :-)

Offhand I expect the "fails if and only if count > 1" clue is a direct clue
that hasn't been mined:

        to_send = ''
        count = 25
        for n in range(count):
            body = "Response #%d\r\n" % (n + 1)
            if n + 1 < count:
                conn = 'keep-alive'
            else:
                conn = 'close'
            to_send += s % (conn, len(body), body)

I don't know what this is doing, but somebody does <wink>.