[issue7783] test_normalization fails when NormalizationTest.txt is outdated
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7783 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8216] Nur jetzt beste Software zu besten Preisen!
Changes by Ezio Melotti ezio.melo...@gmail.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8216] Nur jetzt beste Software zu besten Preisen!
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file16633/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8216] spam
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: open - closed title: Nur jetzt beste Software zu besten Preisen! - spam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8187] spam
Changes by Ezio Melotti ezio.melo...@gmail.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8187] spam
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file16603/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8186] spam
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file16602/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8186] spam
Changes by Ezio Melotti ezio.melo...@gmail.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8217] typo unterlying
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed in r79358 (trunk), r79359 (release26-maint), r79360 (py3k) and r79361 (release31-maint), thanks for the report! -- assignee: georg.brandl - ezio.melotti nosy: +ezio.melotti priority: - normal resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: georg.brandl - ezio.melotti nosy: +ezio.melotti priority: - normal resolution: - accepted versions: +Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
Ezio Melotti ezio.melo...@gmail.com added the comment: Some more typos: The benefit from this approach is that WSGI applications can be deployed much easier as is is specially designed to host WSGI applications s/is is/it is/ Pylons is much like TurboGears with ab even s/ab/an/ Once you finish reading it I'll fix them all at once. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8225] Wrong link in xml.etree documentation
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8203] IDLE about dialog credits raises UnicodeDecodeError
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8241] py2_test_grammar.py contains invalid syntax for 2.6
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - benjamin.peterson nosy: +benjamin.peterson priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8234] Spelling and text in howto/webservers
Ezio Melotti ezio.melo...@gmail.com added the comment: Closed as duplicate of #8218. -- nosy: +ezio.melotti resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
Ezio Melotti ezio.melo...@gmail.com added the comment: See also #8234 that has a patch with some rephrasing too. -- nosy: +ubershmekel stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8248] Add test cases for bool
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] typo currect
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is a patch that fixes the typos found by David and Yuv and rephrases a couple of parts. -- keywords: +easy, needs review, patch stage: needs patch - patch review Added file: http://bugs.python.org/file16686/issue8218.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Unicode nosy: +ezio.melotti priority: - normal stage: - test needed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8269] Missing return values for PyUnicode C/API functions
Ezio Melotti ezio.melo...@gmail.com added the comment: if you are referring to http://docs.python.org/dev/py3k/c-api/unicode.html#PyUnicode_FromFormat the return type is a PyObject. See also http://docs.python.org/dev/py3k/c-api/structures.html#PyObject -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8273] move test_support into the unittest package
Ezio Melotti ezio.melo...@gmail.com added the comment: I agree that some things can be moved in unittest, however several of the function in test_support are designed specifically for being used for the python test suite. For example temp_cwd is something that could be really useful in unittest in my opinion, however we designed it looking at our use cases. We limited its utility to what we needed and we didn't document it so that we are free to change it if/when the use cases change. On a side node, sortdict() is probably useless now that we have assertDictEqual(). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] Fix typos and phrasing in the Web servers howto
Ezio Melotti ezio.melo...@gmail.com added the comment: There's also an invalid link to an image just after the title The low-level view: -.. .. image:: http.png +.. image:: http.png The image is not there though, and in r66294 only the document has been added. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] Fix typos and phrasing in the Web servers howto
Ezio Melotti ezio.melo...@gmail.com added the comment: If the image is missing, then the whole line can be removed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] Fix typos and phrasing in the Web servers howto
Ezio Melotti ezio.melo...@gmail.com added the comment: The author is Marek Kubica, but he doesn't seem to be registered to this tracker. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: Having the 'high bit set' means that the first bit is set to 1. All the continuation bytes (i.e. the 2nd, 3rd or 4th byte in a sequence) have the first two bits set to 1 and 0 respectively, so if the first bit is not set to 1 then the byte shouldn't be considered part of the sequence. I'm trying to work on a patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: Yes, right now I'm considering valid all the bytes that start with '10...'. C2 starts with '11...' so it's a failing byte. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: That's why I'm writing tests that cover all the cases, including overlong sequences. If the test will fail I'll change the patch :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is an incomplete patch. It seems to solve the problem but I still have to add more tests and check it better. I also wonder if the sequences with the first byte in range F5-FD (start of 4/5/6-byte sequences, restricted by RFC 3629) should behave in the same way. Right now they just eat the following 4/5/6 chars without checking. -- keywords: +patch Added file: http://bugs.python.org/file16720/issue8271.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: Even if they are not valid they still eat all the 4/5/6 bytes, so they should be fixed too. I haven't see anything about these bytes in chapter 3 so far, but there are at least two possibilities: 1) consider all the bytes in range F5-FD as invalid without looking for the other bytes; 2) try to read the next 4/5/6 bytes and fail if they are no continuation bytes. We can also look at what others do (e.g. browsers and other languages). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8290] I HAVE A PROBLEM WITH PYTHON
Ezio Melotti ezio.melo...@gmail.com added the comment: HI! This is the wrong place where to ask help, try http://www.python.org/about/help/#got-a-python-problem-or-question -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8291] i have a doubt with using __init__ and .self and classes
Ezio Melotti ezio.melo...@gmail.com added the comment: Hi! This is the wrong place where to ask help, try http://www.python.org/about/help/#got-a-python-problem-or-question -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: Here's a new patch. Should be complete but I want to test it some more before committing. I decided to follow RFC 3629, putting 0 instead of 5/6 for bytes in range F5-FD (we can always put them back in the unlikely case that the Unicode Consortium changed its mind) and also for other invalid ranges (e.g. C0-C1). This lead to some simplification in the code. I also found out that, according to RFC 3629, surrogates are considered invalid and they can't be encoded/decoded, but the UTF-8 codec actually does it. I included tests and fix but I left them commented out because this is out of the scope of this patch, and it probably need a discussion on python-dev. -- stage: test needed - patch review versions: +Python 2.6 Added file: http://bugs.python.org/file16741/issue8271v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8304] strftime and Unicode characters
Ezio Melotti ezio.melo...@gmail.com added the comment: This seems to be fixed now, on both 3.1 and 3.2. Can you try with 3.1.2 and see if it works? What operating system are you using? -- nosy: +ezio.melotti priority: - normal status: open - pending versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8208] test_issue7820 fails: name '?' is not defined
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8208 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Ezio Melotti ezio.melo...@gmail.com added the comment: See also #8208. -- components: +Tests nosy: +ezio.melotti, haypo, l0nwlf, ned.deily priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - low stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8308] raw_bytes.decode('cp932') -- spurious mappings
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8308 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8304] strftime and Unicode characters
Ezio Melotti ezio.melo...@gmail.com added the comment: Actually the bug seems related to Windows. -- components: +Windows nosy: +brian.curtin status: pending - open versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8309] Sin(x) is Wrong
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +mark.dickinson stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8309 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4868] Faster utf-8 decoding
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4868 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: This new patch (v3) should be ok. I added a few more tests and found another corner case: '\xe1a'.decode('utf-8', 'replace') was returning u'\ufffd' because \xe1 is the start byte of a 3-byte sequence and there were only two bytes in the string. This is now fixed in the latest patch. I also unrolled all the loops except the first one because I haven't found an elegant way to unroll it (yet). Finally, I changed the error messages to make them clearer: unexpected code byte - invalid start byte; invalid data - invalid continuation byte. (I can revert this if the old messages are better or if it is better to fix this with a separate commit.) The performances seem more or less the same, I did some benchmarks without significant changes in the results. If you have better benchmarks let me know. I used a file of 320kB with some ASCII, ASCII mixed with some accented characters, Japanese and a file with a sample of several different Unicode chars. -- Added file: http://bugs.python.org/file16754/issue8271v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] Fix typos and phrasing in the Web servers howto
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed in r79781 (trunk), r79782 (release26-maint), r79783 (py3k) and r79784 (release31-maint). Thanks to all! -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6090] zipfile DeprecationWarning Python 2.5/2.6
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - needs patch type: - behavior versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8331] a documentation grammar fix in logging module
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: georg.brandl - ezio.melotti nosy: +ezio.melotti priority: - normal resolution: - accepted stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: The patch was causing a failure in test_codeccallbacks, issue8271v4 fixes the test. (The failing test in test_codeccallbacks was testing that registering error handlers works, using a function that replaced \xc0\x80 with \x00. Since now \xc0 is an invalid start byte regardless of what follows, the function is now receiving only \xc0 instead of \xc0\x80 so I had to change the test.) -- keywords: +needs review Added file: http://bugs.python.org/file16794/issue8271v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3672] Ill-formed surrogates not treated as errors during encoding/decoding
Changes by Ezio Melotti ezio.melo...@gmail.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8337] test_gdb fails on Sparc Ubuntu
Ezio Melotti ezio.melo...@gmail.com added the comment: See also #8330, same failure, different buildbot. Unless they need to be tracked separately I'll close this as duplicate -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8337 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7132] Regexp: capturing groups in repetitions
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5207] extend strftime/strptime format for RFC3339 and RFC2822
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5207 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7378] unexpected truncation of traceback
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7378 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8352] imp.find_module of a .py ending dir causes glibc double free crash
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +brett.cannon, ncoghlan priority: - high stage: - test needed type: - crash versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3985] removed string module from distutils [patch]
Ezio Melotti ezio.melo...@gmail.com added the comment: Patch looks good. There's only a missing space before the for in: +self.metadata.platforms = [kw.strip() + for kw in platformlist.split(',')] -- nosy: +ezio.melotti resolution: - accepted stage: - patch review versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - patch review versions: +Python 3.2 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8356] SyntaxError: integer assignment with leading zeros (only 8 and 9)
Ezio Melotti ezio.melo...@gmail.com added the comment: The leading 0 is used to indicate octal numbers, and 8 and 9 are not valid octal digits. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8362] Add Misc/maintainers.rst to 2.x branch
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8362 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8361] Remove assert in functools.total_ordering
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8361 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7621] Test issue
Ezio Melotti ezio.melo...@gmail.com added the comment: Some more testing: http://psf.upfronthosting.co.za/roundup/meta/issue254 [http://psf.upfronthosting.co.za/roundup/meta/issue254] (http://psf.upfronthosting.co.za/roundup/meta/issue254) {http://psf.upfronthosting.co.za/roundup/meta/issue254} http://psf.upfronthosting.co.za/roundup/meta/issue254. http://psf.upfronthosting.co.za/roundup/meta/issue254, http://psf.upfronthosting.co.za/roundup/meta/issue254; -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8026] strftime bug when timedelta is negative
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3143] Make the left sidebar in the doc collapsible
Ezio Melotti ezio.melo...@gmail.com added the comment: Even if I tested it only with Python documentation, the script should work for other docs generated by Sphinx (at least with the default theme). Last time I tried the script it wasn't working on Chrome, so there's still some work to do. If you want to try it and see if it works with your doc, it should be enough to copy the .js file and include it in the HTML page using a script tag. -- type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3143 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8398] Modules with a dot in the filename don't load
Ezio Melotti ezio.melo...@gmail.com added the comment: If you do import GetMy.com_MOD Python will search for the module named com_MOD in the package GetMy. The name of the module should be a valid Python identifier -- possibly all lowercase (see PEP8). GetMy.com_MOD is not a valid identifier, so you wouldn't even be able to do GetMy.com_MOD.some_func() once you imported it. See http://docs.python.org/reference/simple_stmts.html#the-import-statement for more information. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8344] test_tag_configure fails on FreeBSD
Ezio Melotti ezio.melo...@gmail.com added the comment: The buildbot seems happy starting from build 486 [1], can this be closed? [1]: http://www.python.org/dev/buildbot/builders/x86%20FreeBSD%207.2%20trunk/builds/486 -- nosy: +ezio.melotti priority: - normal resolution: - fixed stage: - commit review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8404] Set operations don't work for dictionary views
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8354] siginterrupt with flag=False is reset when signal received
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +needs review priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8354 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8414] Add test cases for assert
Ezio Melotti ezio.melo...@gmail.com added the comment: Wouldn't it be better to test e.args instead or in addition to str(e)? Skipping the whole test if __debug__ is False is also a good idea. -- nosy: +ezio.melotti priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8415] namedtuple vs tuple
Ezio Melotti ezio.melo...@gmail.com added the comment: You should propose this on the python-ideas mailing list first. Anyway it's already too late to do this on Python 2.x, and since it's not backward compatible for the 1-element case, it won't probably be accepted for 3.x either, so I suggest closing this as reject. Adding Raymond to the nosy so he can take a decision. -- components: +Library (Lib) -None nosy: +ezio.melotti, rhettinger priority: - low versions: +Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8415 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8401] Strange behavior of bytearray slice assignment
Ezio Melotti ezio.melo...@gmail.com added the comment: This happens because bytearray_ass_subscript() (Objects/bytearrayobject.c:588) calls PyByteArray_FromObject() (:641) that in turn calls bytearray_init() (:746), so the results are similar to the ones returned by calling bytearray(...) directly. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8401 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8401] Strange behavior of bytearray slice assignment
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is a proof of concept that fixes the problem. The doc of bytearray() says about its first arg: * If it is a string, you must also give the encoding [...]. * If it is an integer, the array will have that size and will be initialized with null bytes. * If it is an object conforming to the buffer interface, a read-only buffer of the object will be used to initialize the bytes array. * If it is an iterable, it must be an iterable of integers in the range 0 = x 256, which are used as the initial contents of the array. All these things except the string[1] and the integer seem OK to me while assigning to a slice, so in the patch I've special-cased ints to raise a TypeError (it fails already for unicode strings). [1]: note that string here means unicode string (the doc should probably be more specific about it.). Byte strings work fine, but for unicode strings there's no way to specify the encoding while doing ba[:] = u'ustring'. -- keywords: +patch stage: needs patch - unit test needed Added file: http://bugs.python.org/file16945/issue8401.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8401 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8408] need console/pager module
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8408 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8401] Strange behavior of bytearray slice assignment
Ezio Melotti ezio.melo...@gmail.com added the comment: Not really, chars are not ints and anyway the empty string fall in the first case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8401 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8417] bytes and bytearray constructors raise TypeError for very large ints
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - unit test needed versions: +Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8273] move generally useful test_support functions into the unittest package
Ezio Melotti ezio.melo...@gmail.com added the comment: Not the module as it is, but just some of the APIs that it provides, possibly after a cleanup to remove things specific to our test suite and to make them more general and forward-compatible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6095] os.curdir as the default argument for os.listdir
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8438] Codecs: surrogateescape error handler in Python 2.7
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8438 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8425] a -= b should be fast if a is a small set and b is a large set
Ezio Melotti ezio.melo...@gmail.com added the comment: Raymond, have you forgotten to attach the patch or have you just set the stage to 'patch review' by mistake? -- nosy: +ezio.melotti priority: - normal stage: patch review - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5650] Obsolete RFCs should be removed from doc of urllib.urlparse
Ezio Melotti ezio.melo...@gmail.com added the comment: The 'See also' in the documentation should also be updated: http://docs.python.org/dev/library/urlparse.html#urlparse.urldefrag -- nosy: +ezio.melotti priority: - normal status: closed - open versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5650 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8438] Codecs: surrogateescape error handler in Python 2.7
Ezio Melotti ezio.melo...@gmail.com added the comment: I consider this an important missing backport for 2.7, since without this handler, the UTF-8 codecs in 2.7 and 3.x are incompatible and there's no other way to work around this other than to make use of the errorhandler conditionally depend on the Python version. FWIW I tried to updated the UTF-8 codec on trunk from RFC 2279 to RFC 3629 while working on #8271, and found out this difference in the handling of surrogates (only on 3.x they are invalid). I didn't change the behavior of the codec in the patch I attached to #8271 because it was out of the scope of the issue, but I consider the fact that in Python 2.x surrogates can be encoded as a bug, because it doesn't follow RFC 3629. IMHO Python 2.x should provide an RFC-3629-compliant UTF-8 codec, however I didn't have time yet to investigate how Python 3 handles this and what is the best solution (e.g. adding another codec or change the default behavior). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8438 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8454] unittest Module Problem with different Kinds of Invocation
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, michael.foord versions: +Python 2.6, Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8273] move generally useful test_support functions into the unittest package
Ezio Melotti ezio.melo...@gmail.com added the comment: Also note that the test_support module is for some reason documented here: http://docs.python.org/library/test.html#module-test.test_support This means that there are probably developers out there that are already using these functions even if some of them are not intended/designed to be used outside the Python test suite. This situation is sub-optimal for two reasons: 1) test_support can't evolve quickly because the documented functions have to be backward-compatible; 2) other developers are using these python-test-suite-specific functions in their tests; It would be better to keep test_support for our test suite only and provide/move useful function in unittest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8472] itertools.filterfalse() function missing
Ezio Melotti ezio.melo...@gmail.com added the comment: That line has been added first on py3k where the function is called 'itertools.filterfalse' and then ported to 2.x. Most likely the 'i' has been forgotten. A new filterfalse function can't be added to 2.7 because it's already in beta. I fixed the link to point to itertools.ifilterfalse() in r80270 and r80271. Raymond, if you think that sentence should be rephrased, feel free to change it or reopen the issue. -- assignee: - georg.brandl components: +Documentation nosy: +ezio.melotti, georg.brandl, rhettinger priority: - normal resolution: - fixed stage: - committed/rejected status: open - closed versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8474] Duplicate tests in email test suite
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed in r80350 (trunk), r80352 (release26-maint), r80353 (py3k) and r80354 (release31-maint), thanks for the patch! -- nosy: +ezio.melotti priority: - normal resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8500] Erroneous Invalid Syntax Error
Ezio Melotti ezio.melo...@gmail.com added the comment: Except the report :) -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed type: compile error - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8325] improve regrtest command line help
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8325 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8511] Small mistake in tutorial web page
Ezio Melotti ezio.melo...@gmail.com added the comment: Duplicate of #4570. -- nosy: +ezio.melotti, rhettinger resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4570] Bad example in set tutorial
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +mdcowles priority: - normal stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1379416] email.Header encode() unicode P2.6
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1379416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8514] Create fs_encode() and fs_decode() functions in os.path
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - patch review type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8516] Speed difference between Python 2.5 and 2.6 during filling bsddb database.
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +jcea priority: - normal stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8517] Apple Style Guide link is broken in the Documenting Python chapter
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8517 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created
New submission from Ezio Melotti [EMAIL PROTECTED]: Problem: when you have Unicode characters with a code point greater than U+ written directly in the source file (that is, not in the form u'\U' but as normal chars in a u'' string) the interpreter uses surrogate pairs for representing these characters only if the pyc doesn't exist. When the pyc is created it uses a normal character (\U instead of the pair \u\u). This could lead to an unexpected behavior while comparing Unicode strings or in other situations (even if it could be solved without problems in different ways - using u'\Uxxx' or u'\uxxx' instead of the characters, encoding them before comparing - there shouldn't be differences between a py and its pyc). Tested on: Ubuntu 8.04 with python 2.4: Uses a surrogate pair. Ubuntu 8.04 with python 2.5: Uses a surrogate pair. Windows XP SP2 with python 2.4: Uses a normal character. Steps to reproduce the problem: 1a. download the attached file or create it following the next step; 1b. in a UTF-8-aware console write `print unichr(int('10123', 16))` (or any codepoint = 1), copy the printed character (depending on the console it could be a box, two box or a character) in a file with the lines `# -*- coding: utf-8 -*-`, `print 'Result:', u'paste here the char' == u'\U00010123'` and `print 'Repr:', repr(u'paste here the char'), repr(u'\U00010123')`. Save the file in UTF-8; 2. open a python interpreter and import the file (`import unicodetest`). It should print `Result: False` and `Repr: u'\ud800\udd23' u'\U00010123'` (the character is represented as a surrogate pair). During this step the pyc file is created. 3. from the python interpreter write `reload(unicodetest)`. Now it should print `Result: True` and `Repr: u'\U00010123' u'\U00010123'` (the char is represented as a normal character). Any other reload will print True. If you delete the pyc and reload again it will print False. (Instead of using reload() is also possible to create a function and call it from the module when it's loaded and again with unicodetest.func(), the result will be the same.) Expected behavior: The interpreter should use the same representation in both the situation (and print True in both the tests). Another solution could be to change the behavior of == to return True if a normal char is compared with its surrogate pair (if it makes sense). Further informations: The character used for the test is part of the Unicode Plane 1 (see http://en.wikipedia.org/wiki/Basic_Multilingual_Plane). More information about the surrogate pairs can be found here: http://en.wikipedia.org/wiki/Surrogate_pair#Encoding_of_characters_outside_the_BMP -- components: Unicode files: unicodetest.py messages: 69321 nosy: ezio.melotti, lemburg severity: normal status: open title: Python interpreter uses Unicode surrogate pairs only before the pyc is created type: behavior versions: Python 2.4, Python 2.5 Added file: http://bugs.python.org/file10826/unicodetest.py ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created
Ezio Melotti [EMAIL PROTECTED] added the comment: On my Linux box sys.maxunicode == 1114111 and len(u'\U00010123') == 1, so it should be a UTF-32 build. On windows instead sys.maxunicode == 65535 and len(u'\U00010123') == 2, so it should be a UTF-16 build. The problem seems then related to UTF-32 builds. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3672] Ill-formed surrogates not treated as errors during encoding/decoding
Changes by Ezio Melotti [EMAIL PROTECTED]: -- nosy: +ezio.melotti ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6289] compile() raises SyntaxError with confusing message for some decoding problems
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked
New submission from Ezio Melotti ezio.melo...@gmail.com: Try this code (youtube.com uses transfer-encoding: chunked): import httplib url = 'www.youtube.com' conn = httplib.HTTPConnection(url) conn.request('HEAD', '/') # send an HEAD request res = conn.getresponse() print res.getheader('transfer-encoding') so far it works fine, but when you try: res.read() it just hung there, where there is: Traceback (most recent call last): File stdin, line 1, in module File C:\Programs\Python26\lib\httplib.py, line 517, in read return self._read_chunked(amt) File C:\Programs\Python26\lib\httplib.py, line 553, in _read_chunked line = self.fp.readline() File C:\Programs\Python26\lib\socket.py, line 395, in readline data = recv(1) KeyboardInterrupt If instead of youtube.com we replace the url with the one of a site that doesn't use transfer-encoding: chunked (e.g. url = 'dpaste.com'), res.read() returns an empty string. When an HEAD request is sent, the content of the page is not returned, so there should be no point in calling .read(), but try this: import urllib2 class HeadRequest(urllib2.Request): def get_method(self): return 'HEAD' url = 'http://www.youtube.com/watch?v=tCVqx2b-c7U' # Note: I had this problem with this URL, the video # is not available in my country (Finland) and it # may work fine for other countries req = HeadRequest(url) page = urllib2.urlopen(req) This is what happens here with Python 2.5: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/urllib2.py, line 124, in urlopen return _opener.open(url, data) File /usr/lib/python2.5/urllib2.py, line 387, in open response = meth(req, response) File /usr/lib/python2.5/urllib2.py, line 498, in http_response 'http', request, response, code, msg, hdrs) File /usr/lib/python2.5/urllib2.py, line 419, in error result = self._call_chain(*args) File /usr/lib/python2.5/urllib2.py, line 360, in _call_chain result = func(*args) File /usr/lib/python2.5/urllib2.py, line 579, in http_error_302 fp.read() File /usr/lib/python2.5/socket.py, line 291, in read data = self._sock.recv(recv_size) File /usr/lib/python2.5/httplib.py, line 509, in read return self._read_chunked(amt) File /usr/lib/python2.5/httplib.py, line 548, in _read_chunked chunk_left = int(line, 16) ValueError: invalid literal for int() with base 16: '' With Python 2.6 the error is slightly different: Traceback (most recent call last): File stdin, line 1, in module File C:\Programs\Python26\lib\urllib2.py, line 124, in urlopen return _opener.open(url, data, timeout) File C:\Programs\Python26\lib\urllib2.py, line 389, in open response = meth(req, response) File C:\Programs\Python26\lib\urllib2.py, line 502, in http_response 'http', request, response, code, msg, hdrs) File C:\Programs\Python26\lib\urllib2.py, line 421, in error result = self._call_chain(*args) File C:\Programs\Python26\lib\urllib2.py, line 361, in _call_chain result = func(*args) File C:\Programs\Python26\lib\urllib2.py, line 594, in http_error_302 fp.read() File C:\Programs\Python26\lib\socket.py, line 327, in read data = self._sock.recv(rbufsize) File C:\Programs\Python26\lib\httplib.py, line 517, in read return self._read_chunked(amt) File C:\Programs\Python26\lib\httplib.py, line 563, in _read_chunked raise IncompleteRead(value) httplib.IncompleteRead With Py3.0 it is the same: [...] http.client.IncompleteRead: b'' In this case self.fp.readline() (and the data = recv(1) in socket.py) returns and the error happens a few lines later. This seems to happen when there's a redirection in between (the video is not available in my country, the server sends back a 303 status code, and redirects me to the home page). The redirection is not handled by httplib so there might be something wrong in urllib2 too (why it's trying to read the content if we sent and HEAD request and if there is a redirection in between?), but fixing httplib to return an empty string or something similar could be enough to solve this problem too. If there's actually a problem another issue should probably be created. With the same code and the url of a working youtube video (no redirections in between), page = urllib2.urlopen(req) works even if there's the transfer-encoding: chunked but it fails later if we do page.read(): Traceback (most recent call last): File C:\Programs\Python30\lib\http\client.py, line 520, in _read_chunked chunk_left = int(line, 16) ValueError: invalid literal for int() with base 16: '' During handling of the above exception, another exception occurred: Traceback (most recent call last): File stdin, line 1, in module File C:\Programs\Python30\lib\http\client.py, line 479, in read return self._read_chunked(amt) File C:\Programs\Python30\lib\http\client.py, line 525, in _read_chunked raise IncompleteRead(value
[issue6331] Add unicode script info to the unicode database
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6334] 3.0/3.1: Bad bug in range() computation (or possible Integer problem)
Ezio Melotti ezio.melo...@gmail.com added the comment: Simpler test case: Py2.6: n = 46349**2 n 2148229801L range(n-10, n, 3) [2148229791L, 2148229794L, 2148229797L, 2148229800L] Py3.0: n = 46349**2 n 2148229801 list(range(n-10, n, 3)) [2148229791, 2148229794, 2148229797] -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6346] Rstrip Incorrectly Strips Some Strings
Ezio Melotti ezio.melo...@gmail.com added the comment: And you should probably use http://docs.python.org/library/os.path.html#os.path.splitext instead of .rstrip(). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com