[Python-Dev] Bug #537450 Improper object initialization for type.__new__

Guido van Rossum guido@python.org
Mon, 07 Oct 2002 09:23:12 -0400


> == Socket.py ==
> 
> Revision 1.35 :On Windows, make sure SocketType is the same as socket.  (SF bug
> 598097)
> 
> Revision 1.34: Delete junk attributes left behind by _socketobject class construction.
> 
> Revision 1.33:  The _socketobject class has no need for a __del__ method: all it did was
> to delete the reference to self._sock, and the regular destructor will
> do that just fine.  This made some hacks in close() unnecessary.
> The _fileobject class still has a __del__ method, because it must flush.
> 
> Revision 1.32: OK, one more hack: speed up the case of readline() in unbuffered mode.
> This is important IMO because httplib reads the headers this way.

Most of these build upon major restructuring of socket.py that I did
for 2.3.  Backporting would be too much of a hassle, so I'll skip them
all.


> == Pickle.py ==
> 
> Revision 1.70:  whichmodule() should skip dummy package entries in sys.modules.
> This fixes the charming, but unhelpful error message for
> >>> pickle.dumps(type.__new__)
> Can't pickle <built-in method __new__ of type object at 0x812a440>: it's not the same object as datetime.math.__new__
> Bugfix candidate.

Fixed (together with 1.71 which was a cleanup of 1.70).

> Revision 1.69:  Patch #505705: Remove eval in pickle and cPickle.

MvL already said this is a no-go; it depends on a new encoding that
knows about string literal escape sequences.


> == pydoc.py ==
> 
> Revision 1.63 :In both spilldata() functions, pretend that the docstring for
> non-callable objects is always None.  This makes for less confusing
> output and fixes the problem reported in SF patch #550290.

This applies cleanly so I'll check it in.

> Revision 1.68: Extend stripid() to handle strings ending in more than one '>'.
> Add resolve() to handle looking up objects and names (fix SF bug 586931).
> Add a nicer error message when given a filename that doesn't exist.

Looks messy, I'm not an expert on pydoc.  Ping, should this be
backported?



> == ref5.tex ==
> 
> Revision 1.63: Simplify the production for argument list, making sure that it
> actually allows all the legal syntax, and nothing else.  Previously,
> it did not allow a call like func(arg, **dictionary).
> This closes (again!) SF bug #493243.
> 
> Revision 1.62: Played contortionist games with the argument_list production so it
> might be easier to understand.
> This relates to SF bug #493243, which will be closed.

I've forwarded these two to Fred Drake.

--Guido van Rossum (home page: http://www.python.org/~guido/)