kwdoc processing with decorators

It appears that the docstring.py module somehow got omitted from the rev5
patch (I was working from two different machines, and one didn't have it
added to SVN).

So I'm attaching missing_docstring.patch which is a patch against the latest
trunk to include the latest version of docstring.py. It's functionally the
same as the version that Eric has tested against in rev 4, but a
documentation string has changed in the last method.

Sorry for the mixup.

Jason

missing_docstring.patch (4.28 KB)

···

-----Original Message-----
From: Eric Firing [mailto:efiring@…229…]
Sent: Thursday, 13 August, 2009 21:33
To: Jason R. Coombs
Cc: matplotlib development list
Subject: Re: [matplotlib-devel] kwdoc processing with decorators

Jason R. Coombs wrote:

I'm about to upload a new patch that implements some of the ideas John and
Darren have sent. Would you mind running the performance tests against

that

one also? This new change has the potential to increase performance drag.

Jason,

There is a problem with rev4, running "ipython -pylab":

In [1]:plot([1,2])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/home/efiring/<ipython console> in <module>()

/usr/local/lib/python2.6/dist-packages/matplotlib/docstring.pyc in
<lambda>(target)
     334 # language" - GVR. I think functools might help when
Python 2.5

     335 # is required.

--> 336 return lambda target: dedent(copy(source)(target))
     337 from matplotlib import cbook
     338

/usr/local/lib/python2.6/dist-packages/matplotlib/docstring.pyc in
do_copy(target)
     422 def do_copy(target):
     423 if source.__doc__:
--> 424 target.__doc__ = source.__doc__
     425 return target
     426 return do_copy

AttributeError: 'list' object attribute '__doc__' is read-only

Eric

Jason R. Coombs wrote:

It appears that the docstring.py module somehow got omitted from the rev5
patch (I was working from two different machines, and one didn't have it
added to SVN).

So I'm attaching missing_docstring.patch which is a patch against the latest
trunk to include the latest version of docstring.py. It's functionally the
same as the version that Eric has tested against in rev 4, but a
documentation string has changed in the last method.

Sorry for the mixup.

Jason

Thank you. When I committed the rev5 patch earlier, I did not notice that I needed to do "svn add docstring.py", so it was not included at all. Now I think everything is in place, as of 7496.

Eric