[issue1065986] Fix pydoc crashing on unicode strings

2014-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf077fc97fdd by R David Murray in branch '2.7': #1065986: Make pydoc handle unicode strings. http://hg.python.org/cpython/rev/bf077fc97fdd -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-05 Thread R. David Murray
R. David Murray added the comment: Committed, thanks Akira. The support for --disable-unicode is not fully tested. I tried running the tests but the _io module wasn't built, so regrtest doesn't work. A command line invocation of pydoc worked fine, though. -- resolution: - fixed

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset e57660acc6d4 by R David Murray in branch '2.7': #1065986: add missing error handler in pydoc unicode fix. http://hg.python.org/cpython/rev/e57660acc6d4 -- ___ Python tracker rep...@bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-04 Thread R. David Murray
R. David Murray added the comment: Made some review comments. Looks good in general and it seems like the tests are fairly comprehensive. I haven't tried to run any additional experiments, but I don't see how it could make things worse, since the new code paths will only do something

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-04 Thread Akira Kitada
Akira Kitada added the comment: Made a few more adjustments to fix things r.david.murray pointed out. -- Added file: http://bugs.python.org/file33316/issue1065986-6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list mailing

[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread R. David Murray
R. David Murray added the comment: Benjamin: the patch looks pretty good to me, for fixing the problem of docstrings that are explicitly unicode. But before I go to the trouble of a full review and test, is this a level of change you think is acceptable in 2.7 at this point it its lifecycle?

[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Akira Kitada
Akira Kitada added the comment: Added meta charset=utf-8 to html pydoc generates. -- Added file: http://bugs.python.org/file32721/issue1065986-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay with me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list mailing list

[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Éric Araujo
Éric Araujo added the comment: LGTM. One thing: did you mean assertEqual in Lib/test/test_pydoc.py:466: self.assertTrue(open('pipe').read(), pydoc._encode(doc)) ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue1065986] Fix pydoc crashing on unicode strings

2013-11-20 Thread Akira Kitada
Akira Kitada added the comment: Good catch. Fixed. -- Added file: http://bugs.python.org/file32738/issue1065986-5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-21 Thread Akira Kitada
Akira Kitada added the comment: Updated the previous patch to test unicode strings in __{version,date,author,credits}__ don't crash. -- Added file: http://bugs.python.org/file31832/issue1065986-3.patch ___ Python tracker rep...@bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-21 Thread Akira Kitada
Akira Kitada added the comment: Now we have a working fix for 2.7. Could someone please review the attached patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-17 Thread Akira Kitada
Akira Kitada added the comment: With this patch applied, the example from issue15791 works fine. $ echo __author__ = u'Michele Orr\xf9' foo.py ./python -c import foo; print foo.__author__; help(foo) Michele Orrù Help on module foo: NAME foo FILE /tmp/cpython/foo.py DATA

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-16 Thread Akira Kitada
Akira Kitada added the comment: Attaching a modified version of issue1065986.patch. The differences are: - Added _binstr(), which is str() that works with unicode objects. - Changed getdoc() to return encoded docstrings/comments - Used _binstr() to convert __version__, __date__, __author__ and

[issue1065986] Fix pydoc crashing on unicode strings

2013-09-07 Thread Akira Kitada
Changes by Akira Kitada akit...@gmail.com: -- nosy: +akitada ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-11 Thread David Barnett
David Barnett added the comment: I guess it must be more complicated than it looks, because I thought checking for unicode strings and doing .encode('utf-8') would help at least some cases without making anything worse. Anyways, if it's too hard or not worth fixing correctly, couldn't we at

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread David Barnett
Changes by David Barnett davidbarne...@gmail.com: -- nosy: +mu_mind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread David Barnett
David Barnett added the comment: I just ran into this, and I'd like to communicate how unfortunate it is that it's not a priority to fix this fairly trivial (?) bug. It means there's no way to define a unicode string literal with non-ascii characters that won't crash the builtin help()

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread David Barnett
David Barnett added the comment: Also, the resolution is still marked as fixed, which is not correct... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread R. David Murray
R. David Murray added the comment: It is not so much that it isn't a priority, as that no one has suggested a working fix that is suitable for 2.7. Do you have a suggestion? -- resolution: fixed - ___ Python tracker rep...@bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2012-08-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: I fail to see how this patch solves this issue. Taking the example from issue15791, I still get the traceback of that issue, namely in the line result = result + self.section('AUTHOR', str(object.__author__)) If __author__ is a unicode object, it's the

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-27 Thread Stefano Taschini
Stefano Taschini tasch...@ieee.org added the comment: Here's my patch, along the lines of the work-around I posted earlier. A few remarks: 1. The modifications in pydoc only touch the four console pagers and the html pager (html.page). 2. A module-wide default encoding is initialized

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-26 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread Stefano Taschini
Stefano Taschini tasch...@ieee.org added the comment: Shouldn't this be reopened for Python 2.7 ? -- type: - behavior versions: +Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't think so. We aren't promising unicode support in pydoc in 2.x, and it is too late to add it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread Stefano Taschini
Stefano Taschini tasch...@ieee.org added the comment: Oh well, in that case I guess we'll have to work around it. Here's the monkey patch I use to overcome this limitation in pydoc, in case others wish to add it to their PYTHONSTARTUP or sitecustomize: def pipepager(text, cmd): Page

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Hmm. Making it not raise an error while still producing useful output would be acceptable as a bug fix if that's all it takes, I think. -- status: closed - open ___ Python tracker

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-23 Thread Stefano Taschini
Changes by Stefano Taschini tasch...@ieee.org: -- nosy: +taschini ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986 ___ ___ Python-bugs-list

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-12 Thread Tom Bachmann
Tom Bachmann e_mc...@web.de added the comment: Hello, [this is my first bug report, so I'm sorry if I'm not adhering to some conventions] in what versions of python is this supposed to be fixed? Consider: % python Python 2.7.2+ (default, Nov 30 2011, 19:22:03) [GCC 4.6.2] on linux2 Type

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-12 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It is fixed in Python3. Apparently Raymond was wrong about it having been fixed earlier (or perhaps he was referring to the unicode being removed from the pydoc __credits__ string). -- nosy: +r.david.murray

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-12 Thread Tom Bachmann
Tom Bachmann e_mc...@web.de added the comment: I see. Thank you. On 12.04.2012 16:08, R. David Murray wrote: R. David Murrayrdmur...@bitdance.com added the comment: It is fixed in Python3. Apparently Raymond was wrong about it having been fixed earlier (or perhaps he was referring to