This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ben.Wolfson
Recipients Ben.Wolfson, eric.araujo, eric.smith, mark.dickinson
Date 2011-05-10.22:07:53
SpamBayes Score 2.635001e-07
Marked as misclassified No
Message-id <1305065276.41.0.396737637776.issue12014@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, that's the wrong place in MarkupIterator_next to include that loop. The attached diff has it in the right place. The results of "make test" here are:

328 tests OK.
1 test failed:
    test_unicode
25 tests skipped:
    test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
    test_codecmaps_kr test_codecmaps_tw test_curses test_dbm_gnu
    test_epoll test_gdb test_largefile test_msilib test_ossaudiodev
    test_readline test_smtpnet test_socketserver test_startfile
    test_timeout test_tk test_ttk_guionly test_urllib2net
    test_urllibnet test_winreg test_winsound test_xmlrpc_net
    test_zipfile64
1 skip unexpected on darwin:
    test_readline
make: [test] Error 1 (ignored)

test_unicode fails because it expects "{0[}".format() to raise an IndexError; instead, it raises a ValueError ("unmatched '{' in format") because it interprets the "}" as an *index*.

This can be avoided by changing the line 

                while (self->str.ptr < self->str.end && *self->str.ptr != ']') {

to 

                while (self->str.ptr < self->str.end-1 && *self->str.ptr != ']') {

In which case the test passes as is, or, obviously, by changing the expected exception in test_unicode.py.
History
Date User Action Args
2011-05-10 22:07:56Ben.Wolfsonsetrecipients: + Ben.Wolfson, mark.dickinson, eric.smith, eric.araujo
2011-05-10 22:07:56Ben.Wolfsonsetmessageid: <1305065276.41.0.396737637776.issue12014@psf.upfronthosting.co.za>
2011-05-10 22:07:54Ben.Wolfsonlinkissue12014 messages
2011-05-10 22:07:54Ben.Wolfsoncreate