Re: [sphinx-dev] Autodoc munging \n in function signatures

2011-01-08 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 19.03.2010 20:12, schrieb Jeff Forcier:
 Hi, and thanks for Sphinx! It's great.
 
 I've encountered what seems like an odd problem with the autodoc
 plugin: a function signature with \n in a default value has the '\'
 stripped away, and thus any generated autodocs appear to claim that
 the string instead just reads n.
 
 This happens regardless of whether the string is *just* \n or
 contains other text as well; it does *not* happen for e.g. \k; and
 it works correctly if the string is a raw string (r\n). (Except, of
 course, that now the default value is a literal \n instead of a
 newline -- which is incorrect.)
 
 It could be worked around by manually specifying the function
 signature in the .rst document that calls autodoc, but that's
 undesirable as it breaks DRY.
 
 Is this a bug? I haven't found anything in the Bitbucket issues that
 appears to correlate with it. I can file a new ticket if desired, but
 wanted to check beforehand in case I'm missing something stupid.

Hi,

while this was somewhat fixed in Sphinx 1.0, I've just fixed another bug
that caused backslashes to be incorrectly stripped from signatures.  This
will be in Sphinx 1.0.7.

cheers,
Georg
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk0o1OYACgkQN9GcIYhpnLApzwCfZSWVCyZF/DJETKa94gVkFyyA
f1UAnRasE3xROwt0Yd5OqOy12xI4Xbfr
=pZe4
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Autodoc munging \n in function signatures

2010-03-20 Thread Jeff Forcier
Hi, and thanks for Sphinx! It's great.

I've encountered what seems like an odd problem with the autodoc
plugin: a function signature with \n in a default value has the '\'
stripped away, and thus any generated autodocs appear to claim that
the string instead just reads n.

This happens regardless of whether the string is *just* \n or
contains other text as well; it does *not* happen for e.g. \k; and
it works correctly if the string is a raw string (r\n). (Except, of
course, that now the default value is a literal \n instead of a
newline -- which is incorrect.)

It could be worked around by manually specifying the function
signature in the .rst document that calls autodoc, but that's
undesirable as it breaks DRY.

Is this a bug? I haven't found anything in the Bitbucket issues that
appears to correlate with it. I can file a new ticket if desired, but
wanted to check beforehand in case I'm missing something stupid.

This problem occurs for me with Sphinx 0.6.3 and 0.6.5 under the stock
Python 2.5.1 on Mac OS X 10.5, and also under Python 2.5.2 on Ubuntu
8.04.

Thanks,
Jeff

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.