[issue5310] operator precedence table is wrong
Georg Brandl ge...@python.org added the comment: Fixed in r69769. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5310 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3558] Operator precedence misdocumented
Georg Brandl ge...@python.org added the comment: Fixed in r69769. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3558 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5314] http client error
New submission from cober J jiaqi...@gmail.com: Try to use http to send multi-byte utf8 data. File E:\DEVELOP\python\lib\http\client.py, line 904, in _send_request self.endheaders(body.encode('ascii')) UnicodeEncodeError: 'ascii' codec can't encode character '\u7231' in position 119: ordinal not in range(128) I modified the lib/http/client.py document, and fix this problem. -- components: Library (Lib) files: client.py messages: 82465 nosy: cober severity: normal status: open title: http client error type: compile error versions: Python 3.1 Added file: http://bugs.python.org/file13136/client.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5314 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.
Pernici Mario pern...@users.sourceforge.net added the comment: The attached patch uses mul1 in long_mul in the version patched with 30bit_longdigit13+optimizations.patch Comparison between these two patches on hp pavilion Q8200 2.33GHz pybench patch new patch SimpleIntegerArithmetic 89 85 other tests equal pidigits_noprint 2000 998 947 -- nosy: +pernici Added file: http://bugs.python.org/file13137/30bit_longdigit13+optimizations1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5306] Python 3.1 won't compile under Visual Studio 2005
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Ah, I just saw this. Yes, looks like a missing file during porting. That should affect VS2008 as well. Cheers! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5306 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.
Mark Dickinson dicki...@gmail.com added the comment: Before such a version gets committed, I'd like to see it on Rietveld again. Sure. My original plan was to get the structural changes in first, and then worry about optimizations. But now I think the x_divrem fix has to be considered a prerequisite for the 30-bit digits patch. So I'll clean up the x_divrem code, include it in the basic patch and upload to Rietveld. The other optimization (to multiplication) is more optional, potentially more controversial (it adds 60 or so lines of extra code), and should wait until after the commit and get a separate issue and review. The x_divrem work actually simplifies the code (whilst not altering the underlying algorithm), as well as speeding it up. Still, it's changing a subtle core algorithm, so we need to be *very* sure that the new code's correct before it goes in. In particular, I want to add some tests to test_long that exercise the rare corner cases in the algorithm (which only become rarer when 30-bit digits are used). I also want to understand Gregory's problems with configure before committing anything. None of this is going to happen before the weekend, I'm afraid. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.
Mark Dickinson dicki...@gmail.com added the comment: http://codereview.appspot.com/14105/diff/1/2 File Python/marshal.c (right): http://codereview.appspot.com/14105/diff/1/2#newcode160 Line 160: w_long((long)(Py_SIZE(ob) 0 ? l : -l), p); On 2009/02/18 21:27:04, Martin v. Löwis wrote: Ok, so I'd waive this for this patch; please do create a separate report. Done. http://bugs.python.org/issue5308 http://codereview.appspot.com/14105 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5312] errno not being set
Georg Brandl ge...@python.org added the comment: The problem is in os.py. This patch fixes it: Index: Lib/os.py === --- Lib/os.py (Revision 69769) +++ Lib/os.py (Arbeitskopie) @@ -372,8 +372,8 @@ saved_exc = e saved_tb = tb if saved_exc: -raise error(saved_exc).with_traceback(saved_tb) -raise error(last_exc).with_traceback(tb) +raise saved_exc.with_traceback(saved_tb) +raise last_exc.with_traceback(tb) I suspect there may be other instances of this problem (I guess 2to3 converted that). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5287] logging package on IronPython
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fixes checked into trunk py3k. -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5287 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5192] Update log message formatting.
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- resolution: wont fix - rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5315] signal handler never gets called
New submission from Péter Szabó pts...@gmail.com: According to http://docs.python.org/dev/library/signal.html , if I set up a signal handler in the main thread, and then have the signal delivered to the process, then the signal handler will be called in the main thread. The attached Python script I've written, however, doesn't work that way: sometimes the signal is completely lost, and the signal handler is not called. Here is how it should work. The code has two threads: the main thread and the subthread. There is also a signal handler installed. The main thread is running select.select(), waiting for a filehandle to become readable. Then the subthread sends a signal to the process. The signal handler writes a byte to the pipe. The select wakes up raising 'Interrupted system call' because of the signal. I'm running Ubuntu Hardy on x86_64. With Python 2.4.5 and Python 2.5.2, sometimes the signal handler is not called, and the select continues waiting indefinitely. This is what I get on stdout in Python 2.4.5: main pid=8555 --- 0 A B S T U handler arg1=10 arg2=frame object at 0x79ab40 select got=(4, 'Interrupted system call') read str='W' --- 1 A B S T U This means that iteration 0 completed successfully: the signal handler got called, and the select raised 'Interrupted system call'. However, iteration 1 was stuck: the signal handler was never called, and the select waits indefinitely. The script seems to work in Python 2.4.3, but it hangs in iteration about 6. -- components: Interpreter Core, Library (Lib) files: tsig.py messages: 82472 nosy: pts severity: normal status: open title: signal handler never gets called type: behavior versions: Python 2.4, Python 2.5 Added file: http://bugs.python.org/file13138/tsig.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5315 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue949667] file write() method and non-blocking mode.
Antoine Pitrou pit...@free.fr added the comment: setblocking() doesn't exist in py3k either, so reopening. I agree it would be useful to set files as non-blocking in a portableway. -- nosy: +pitrou priority: low - normal status: pending - open versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue949667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue949667] setblocking() method on file objects
Changes by Antoine Pitrou pit...@free.fr: -- title: file write() method and non-blocking mode. - setblocking() method on file objects ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue949667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Antoine Pitrou pit...@free.fr added the comment: After rewrite the rest of StringIO in C, there's sanitize the destructor behaviour of IOBase (if at all possible). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Antoine Pitrou pit...@free.fr added the comment: Oh, and what to do of the now unused pure Python implementations in io.py? Easiest would be to dump them, as they will probably get hopelessly out of sync, but perhaps there's some genuine portability/educational advantage to keep them? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5316] Buildbot failures in test_site
New submission from Antoine Pitrou pit...@free.fr: Recently, some buildbot failures have started appearing on trunk and py3k with the following error: == FAIL: test_s_option (test.test_site.HelperFunctionsTests) -- Traceback (most recent call last): File /home/pybot/buildarea/3.x.klose-ubuntu-i386/build/Lib/test/test_site.py, line 105, in test_s_option self.assertEqual(rc, 1) AssertionError: 0 != 1 make: *** [buildbottest] Error 1 -- components: Library (Lib), Tests messages: 82477 nosy: pitrou priority: high severity: normal stage: needs patch status: open title: Buildbot failures in test_site type: behavior versions: Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5316 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add DTrace probes
Changes by Joe Ranieri j...@alacatialabs.com: -- nosy: +sirg3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()
Changes by Jesse Noller jnol...@gmail.com: -- assignee: - jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5317] URL given for IronPython in CPython documentation incorrect
New submission from David Fugate midnigh...@yahoo.com: http://docs.python.org/reference/introduction.html#alternate- implementations states that the IronPython project's website URL is http://workspaces.gotdotnet.com/ironpython. This site has actually been dead for quite some time and our official project page is http://www.ironpython.com/ which we plan on revamping shortly. Thanks, Dave -- assignee: georg.brandl components: Documentation messages: 82478 nosy: dfugate, georg.brandl severity: normal status: open title: URL given for IronPython in CPython documentation incorrect versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5317] URL given for IronPython in CPython documentation incorrect
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r69776. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5318] strip, rstrip lstrip bug
New submission from alexlc a...@niebla.co.uk: Examples of bad behaviour: 'abacde'.lstrip('ab') 'cde' 'abaaacde'.lstrip('ab') 'cde' 'aabacde'.lstrip('aab') 'cde' 'abcede'.rstrip( 'de' ) 'abc' 'abacdeaab'.strip('ab') 'cde' Probably a few more similar to these will fail as well. I have tested this with a fairly recent 2.5 (maybe 2.53 maybe 2.54), and with 2.6.1. I have commented this to a friend and he recalls problems similar to these with lstrip and rstrip a few years ago, so it might have been an early 2.4 version or a late 2.3. Thanks. -- components: Library (Lib) messages: 82480 nosy: alexlc severity: normal status: open title: strip, rstrip lstrip bug type: behavior versions: Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5318] strip, rstrip lstrip bug
Ezio Melotti ezio.melo...@gmail.com added the comment: This is not a bug: str.strip([chars]) ... The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped: ... http://docs.python.org/library/stdtypes.html#str.strip -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5319] I/O error during one-liner fails to return OS error status
New submission from Mike Coleman m...@users.sourceforge.net: $ python2.5 -c 'print((1, 2, 3))' /dev/full || echo error status close failed: [Errno 28] No space left on device $ The above sequence should also output 'error status' before the next prompt. That is, python should not be returning EXIT_SUCCESS in this situation. -- messages: 82482 nosy: mkc severity: normal status: open title: I/O error during one-liner fails to return OS error status type: behavior versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5318] strip, rstrip lstrip bug
alexlc a...@niebla.co.uk added the comment: Oh, thanks for letting me know and sorry for the trouble. I should had read the docs more carefully. I have actually been using for a long while the strip methods as I had described in the bug report. I was so completely convinced about this that I didn't even thought about checking again the docs. I have to fix my code but I am happy nonetheless as I was kind of 'losing my faith' in python after finding this. Regards, Alejandro 2009/2/19 Ezio Melotti rep...@bugs.python.org Ezio Melotti ezio.melo...@gmail.com added the comment: This is not a bug: str.strip([chars]) ... The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped: ... http://docs.python.org/library/stdtypes.html#str.strip -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5318 ___ Added file: http://bugs.python.org/file13139/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5318 ___Oh, thanks for letting me know and sorry for the trouble.brI should had read the docs more carefully. I have actually been using for a long while the strip methods as I had described in the bug report. I was so completely convinced about this that I didn#39;t even thought about checking again the docs.br I have to fix my code but I am happy nonetheless as I was kind of #39;losing my faith#39; in python after finding this.brbrRegards,brAlejandrobrbrbrdiv class=gmail_quote2009/2/19 Ezio Melotti span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/spanbr blockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;br Ezio Melotti lt;a href=mailto:ezio.melo...@gmail.com;ezio.melo...@gmail.com/agt; added the comment:br br This is not a bug:br str.strip([chars])br nbsp;... The chars argument is not a prefix or suffix; rather, allbr combinations of its values are stripped: ...br br a href=http://docs.python.org/library/stdtypes.html#str.strip; target=_blankhttp://docs.python.org/library/stdtypes.html#str.strip/abr br --br nosy: +ezio.melottibr divdiv/divdiv class=Wj3C7cbr ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue5318; target=_blankhttp://bugs.python.org/issue5318/agt;br ___br /div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5319] I/O error during one-liner fails to return OS error status
Mike Coleman m...@users.sourceforge.net added the comment: Oops, I should have used the old python print syntax. Nonetheless, the behavior is the same: $ python2.5 -c 'print 1, 2, 3' /dev/full || echo error status close failed: [Errno 28] No space left on device $ -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5320] I/O error during one-liner gives bad diagnostic (and fails to return OS error status)
New submission from Mike Coleman m...@users.sourceforge.net: $ python2.6 -c 'print 1, 2, 3' /dev/full || echo error status close failed in file object destructor: Error in sys.excepthook: Original exception was: $ It seems like something other than blank lines should be printed here. -- components: Interpreter Core messages: 82485 nosy: mkc severity: normal status: open title: I/O error during one-liner gives bad diagnostic (and fails to return OS error status) type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)
New submission from Mike Coleman m...@users.sourceforge.net: $ python3.0 -c 'print((1, 2, 3))' /dev/full || echo error status $ This command gives no indication whatsoever that anything has gone wrong. Following this with strace demonstrates that the interpreter is in fact ignoring these errors: 2589 write(1, (1, 2, 3)\n..., 10)= -1 ENOSPC (No space left on device) 2589 rt_sigaction(SIGINT, {SIG_DFL}, {0x47aa49, [], SA_RESTORER, 0x7fd5aa9da080}, 8) = 0 2589 write(1, (1, 2, 3)\n..., 10)= -1 ENOSPC (No space left on device) 2589 write(1, (1, 2, 3)\n..., 10)= -1 ENOSPC (No space left on device) 2589 write(1, (1, 2, 3)\n..., 10)= -1 ENOSPC (No space left on device) 2589 exit_group(0) = ? -- components: Interpreter Core messages: 82486 nosy: mkc severity: normal status: open title: I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) type: behavior versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5320] I/O error during one-liner gives bad diagnostic (and fails to return OS error status)
Mike Coleman m...@users.sourceforge.net added the comment: Also, as with the other python versions, notice that the error status is EXIT_SUCCESS (which it should not be). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5318] strip, rstrip lstrip bug
Daniel Diniz aja...@gmail.com added the comment: Thanks, Ezio! -- nosy: +ajaksu2 resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5306] Python 3.1 won't compile under Visual Studio 2005
Benjamin Peterson benja...@python.org added the comment: Could one of the Windows experts do the port? I can't properly resolve the conflicts or test the changes here. -- assignee: benjamin.peterson - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5306 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Benjamin Peterson benja...@python.org added the comment: I think we should just drop the Python implementations. There's no point in trying to keep two implementations around. Besides, if we don't backport IO in C, we can maintain them in the trunk. :) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5312] errno not being set
Changes by Benjamin Peterson benja...@python.org: -- assignee: - benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Jean-Paul Calderone exar...@divmod.com added the comment: Oh, and what to do of the now unused pure Python implementations in io.py? Easiest would be to dump them, as they will probably get hopelessly out of sync, but perhaps there's some genuine portability/educational advantage to keep them? The test suite should be run against both implementations. That way tested behavior will always be the same for both. And all of its behavior is tested, right? ;) The value in the Python implementation is manifold. For example: * It eases testing of new features/techniques. Rather than going straight to the C version when someone has an idea for a feature, it can be implemented and tried out in Python. If it's cool, then the extra effort of porting to C can be undertaken. * It helps other Python implementations immensely. PyPy, IronPython, and Jython are all going to have to provide this library eventually (one supposes). Forcing them each to re-implement it will mean it will be that much longer before they support it. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] test issue
Martin v. Löwis mar...@v.loewis.de added the comment: Does this still work? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Benjamin Peterson benja...@python.org added the comment: On Thu, Feb 19, 2009 at 1:57 PM, Jean-Paul Calderone rep...@bugs.python.org wrote: Jean-Paul Calderone exar...@divmod.com added the comment: Oh, and what to do of the now unused pure Python implementations in io.py? Easiest would be to dump them, as they will probably get hopelessly out of sync, but perhaps there's some genuine portability/educational advantage to keep them? The test suite should be run against both implementations. That way tested behavior will always be the same for both. And all of its behavior is tested, right? ;) The value in the Python implementation is manifold. For example: * It eases testing of new features/techniques. Rather than going straight to the C version when someone has an idea for a feature, it can be implemented and tried out in Python. If it's cool, then the extra effort of porting to C can be undertaken. * It helps other Python implementations immensely. PyPy, IronPython, and Jython are all going to have to provide this library eventually (one supposes). Forcing them each to re-implement it will mean it will be that much longer before they support it. We don't maintain any other features in two languages for those purposes. IMO, it will just be more of a burden to fix bugs in two different places as compared to the advantages you mention. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Jean-Paul Calderone exar...@divmod.com added the comment: We don't maintain any other features in two languages for those purposes. IMO, it will just be more of a burden to fix bugs in two different places as compared to the advantages you mention. Surely the majority of the burden is imposed by the C implementation. I expect that 90% of the time spent fixing bugs will be spent fixing them in C. So for only a slightly increased maintenance cost, a massive advantage is gained for other Python implementations. If the general well-being and popularity of Python isn't a concern of CPython developers, then perhaps the benefits can still be preserved at minimal cost to the CPython developers by letting some Jython, IronPython, or PyPy developers maintain the Python implementation of the io library in the CPython source tree (rather than making them copy it elsewhere where it will more frequently get out of sync, and where Jython/IronPython/PyPy might waste effort in duplicating maintenance). Or maybe none of them will care or object to the removal of the Python version from CPython. It might at least be worth asking first, though. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] test issue
Martin v. Löwis mar...@v.loewis.de added the comment: More testing. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] test issue
Martin v. Löwis mar...@v.loewis.de added the comment: Testing 1..2..3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty
New submission from Armin Ronacher armin.ronac...@active-4.com: In 2.6 a deprecation warning was added if `object.__new__` was called with arguments. Per se this is fine, but the detection seems to be faulty. The following code shows the problem: class A(object): ... def __new__(self): ... raise TypeError('i do not exist') ... class B(A): ... __new__ = object.__new__ ... def __init__(self, x): ... self.x = x ... B(1) __main__:1: DeprecationWarning: object.__new__() takes no parameters __main__.B object at 0x88dd0 In the `B` case `__new__` is not overridden (in the sense that it differs from object.__new__) but `__init__` is. Which is the default behaviour. Nonetheless a warning is raised. I used the pattern with the __new__ switch to achieve a cStringIO.StringIO behavior that supports typechecks: IterIO() returns either a IterI or IterO object, both instances of IterIO so that typechecks can be performed. Real-world use case here: http://dev.pocoo.org/projects/werkzeug/browser/werkzeug/contrib/iterio.py -- messages: 82497 nosy: aronacher severity: normal status: open title: Python 2.6 object.__new__ argument calling autodetection faulty type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue936813] fast modular exponentiation
Trevor Perrin tr...@users.sourceforge.net added the comment: Hi Mark, Let me know if I can give you any help with this. The original patch was split into 3 parts. The only part remaining unapplied is the Montgomery Reduction. It appeared to be a significant speedup when I was last testing, and is frequently used in other modular exponentiation libraries, but it does, admittedly, complicate the code. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue936813 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue936813] fast modular exponentiation
Changes by Gregory P. Smith g...@krypto.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue936813 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering
New submission from R. David Murray rdmur...@bitdance.com: The python 3.x io library appears to allow mixing calls to __next__ and calls to readline. As another consequence, where previously it was necessary to use 'readline' to read single lines from a pipe without blocking waiting for a buffer fill, now one can apparently use 'for'. Reading the code in io.py, it seems as though this is intentional: readline and __next__ use the same buffer, and the method on TextIOWrapper that fills the buffer calls 'read1', which in the one place where it has a docstring says that only as much data as is available is read, in contrast to 'read', which reads exactly n bytes (to EOF). Assuming this is the intended behavior, it should be documented, and if they do not exist (I didn't see any) tests should be added to confirm the behavior. If this behavior is an implementation artifact, then this should be documented so that code is less likely to depend on it. Once I know whether or not this behavior _should_ be part of the test suite, I'll be happy to work on doc and test patches. -- components: Library (Lib) messages: 82499 nosy: bitdancer severity: normal status: open title: document expected/required behavior of 3.x io subsystem with respect to buffering type: behavior versions: Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5176] Special-case string formatting in BINARY_MODULO implementation
Jeffrey Yasskin jyass...@gmail.com added the comment: Looks good to me. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Antoine Pitrou pit...@free.fr added the comment: Hello JP, Surely the majority of the burden is imposed by the C implementation. I expect that 90% of the time spent fixing bugs will be spent fixing them in C. Hmm, it depends. It's probably true in general, but I suspect a fair amount of work also went into getting the Python implementation correct, since there are things in there that are tricky regardless of the implementation language (I'm especially thinking of the TextIOWrapper seek() and tell() methods). (and there are still bugs in the Python implementation btw.) If the general well-being and popularity of Python isn't a concern of CPython developers, then perhaps the benefits can still be preserved at minimal cost to the CPython developers by letting some Jython, IronPython, or PyPy developers maintain the Python implementation of the io library in the CPython source tree Well, if it is part of the CPython source tree, we (CPython developers) can't realistically ignore it by saying it's someone else's job. Or maybe none of them will care or object to the removal of the Python version from CPython. It might at least be worth asking first, though. In any case, it must first be asked on python-dev. We're not gonna dump the code without telling anybody anything :) cheers Antoine. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: [Benjamin Peterson] I think we should just drop the Python implementations. There's no point in trying to keep two implementations around. I disagree. I've found great value in keeping a pure python version around for things I've converted to C. The former serves as documentation, as a tool for other implementations (like PyPy IronPython, and Jython), and as a precise spec. The latter case is especially valuable (otherwise, the spec becomes whatever CPython happens to do). Also, I've found that once the two are in-sync, keeping it that way isn't hard. And, there effort for keeping them in-sync is a good way to find bugs. In the heapqmodule, we do a little magic in the test suite to make sure the tests are run against both. It's not hard. Raymond -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Jean-Paul Calderone exar...@divmod.com added the comment: Hi Antoine, Surely the majority of the burden is imposed by the C implementation. I expect that 90% of the time spent fixing bugs will be spent fixing them in C. Hmm, it depends. It's probably true in general, but I suspect a fair amount of work also went into getting the Python implementation correct, since there are things in there that are tricky regardless of the implementation language (I'm especially thinking of the TextOWrapper seek() and tell() methods). (and there are still bugs in the Python implementation btw.) Indeed, I'm sure a lot of work went into the Python implementation - and hopefully that work *saved* a huge amount of work when doing the C implementation. That's why people prototype things in Python, right? :) So it seems to me that keeping the Python implementation is useful for CPython, since if it made working on the C implementation easier in the past, it will probably do so again in the future. Basically, my point is that maintaining C and Python versions is *cheaper* than just maintaining the C version alone. The stuff I said about other VMs is true too, but it doesn't seem like anyone here is going to be convinced by it ;) (and I haven't spoked to any developers for other VMs about whether they really want it, anyway). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5324] __subclasses__ undocumented
New submission from Michael Foord mich...@voidspace.org.uk: I can't find any documentation for the __subclasses__ magic method. At the very least needed for language implementors. -- assignee: georg.brandl components: Documentation messages: 82504 nosy: georg.brandl, mfoord severity: normal status: open title: __subclasses__ undocumented ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5324 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty
Armin Ronacher armin.ronac...@active-4.com added the comment: The problem seems to be caused by tp_new being slot_tp_new which then invokes whatever __new__ in the class dict is. I'm not so sure what would be the solution to this. One could of course check if tp_new is either object_new or slot_tp_new and in the latter case check if the class dict's __new__ item is object_new... ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5306] Python 3.1 won't compile under Visual Studio 2005
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - amaury.forgeotdarc nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5306 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5306] Python 3.1 won't compile under Visual Studio 2005
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I merged the change manually, and came to the same patch as ocean-city; Then I noticed that os.device_encoding() (new in python 3.0) needs the same check as well. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5306 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Basically, my point is that maintaining C and Python versions is *cheaper* than just maintaining the C version alone. Well said. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Gregory P. Smith g...@krypto.org added the comment: +1 to setting it up so that unit tests are always run against both and keeping both. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Antoine Pitrou pit...@free.fr added the comment: +1 to setting it up so that unit tests are always run against both and keeping both. If this is the way forward I recommend putting the pure Python versions into a separate module, eg pyio.py (although the name is not very elegant). It will make the separation clean and obvious. (and perhaps it will have the side-effect of improving startup time, although I'm not really worried about this) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue835176] [2.3.2] bz2 test failure on AIX 4.3.2, Tru64 UNIX
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue835176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1210326] comma separated cookie values
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1210326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1682241] Problems with urllib2 read()
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - invalid stage: test needed - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue775340] OSX 'freeze' bug
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: test needed - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue775340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue780354] socket.makefile() isn't compatible with marshal/cPickle/etc
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue780354 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1169633] Install fail code 2932 after fail to copy python_icon.exe
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - works for me status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1169633 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1111100] csv reader barfs encountering quote when quote_none is set
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue100 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue995956] TclError with intel's hypertheading
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: test needed - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue995956 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue815753] SCO_SV: many modules cannot be imported
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: test needed - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue815753 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue727732] getpath.c-generated prefix wrong for Tru64 scripts
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: test needed - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue727732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue875654] add support for installations compiled for debugging
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - rejected stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue875654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue872815] How to pass the proxy server use socket
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue872815 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue854918] Configurable SSL handshake
Changes by Daniel Diniz aja...@gmail.com: -- resolution: - out of date stage: test needed - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue854918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5305] imaplib should support international mailbox names
James Henstridge ja...@jamesh.id.au added the comment: I'll have a go at implementing the algorithm. It looks like the modifications to UTF-7 are large enough that you can't do a search and replace on the output of the existing UTF-7 codec, so it'll probably require new code. Would String2Mailbox and Mailbox2String utility functions be appropriate here? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5305 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale fails with unicode strings on Py2 and with byte strings on Py3
Ezio Melotti ezio.melo...@gmail.com added the comment: FWIW the type() is gone in Py3, now it is: if locale and not isinstance(locale, _builtin_str): where from builtins import str as _builtin_str (http://svn.python.org/view/python/branches/py3k/Lib/locale.py?view=markup) However Py3.0 now raises the same error when the second arg is a byte string: locale.setlocale(locale.LC_ALL, b'ja_JP.utf8') Traceback (most recent call last): File stdin, line 1, in module File C:\Programs\Python30\lib\locale.py, line 500, in setlocale locale = normalize(_build_localename(locale)) File C:\Programs\Python30\lib\locale.py, line 408, in _build_localename language, encoding = localetuple ValueError: too many values to unpack On Py3, locale.setlocale() should allow only unicode strings and reject byte strings. -- components: +Unicode nosy: +ezio.melotti title: setlocale Tracebacks on unicode locale strings - setlocale fails with unicode strings on Py2 and with byte strings on Py3 versions: +Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5312] errno not being set
Benjamin Peterson benja...@python.org added the comment: Thanks for the diagnostic, Georg! Fixed in r69794. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5325] SyntaxError: None when the name of the dir contains non-ascii chars
New submission from Ezio Melotti ezio.melo...@gmail.com: Step to reproduce: 1) create a directory with non-ascii chars in the name 2) create a python module with a syntax error (I used an unclosed '(') 3) execute the module.py directly ('module.py', not 'python module.py') I tested this only on Windows, with Python3 as the default interpreter used to execute *.py files, this is the output: # ascii dir, works fine D:\module1.py File D:\module1.py, line 21 ^ SyntaxError: invalid syntax # moving to non-ascii dir D:\cd äåæ # non ascii-dir, fails D:\äåæmodule1.py SyntaxError: None # here is using py2.6, but with 'python module1.py' it doesn't print the dir name D:\äåæpython module1.py File module1.py, line 21 ^ SyntaxError: invalid syntax # same as before but with py3 D:\äåæpython3 module1.py File module1.py, line 21 ^ SyntaxError: invalid syntax # with print(sys.version) in module1.py D:\äåæmodule1.py 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] D:\äåæpython module1.py 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] D:\äåæpython3 module1.py 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] This seems to happen only with SyntaxErrors, I tested a couple of other errors and it seems to work: # with print(sys.version) and 5/0 in module1 # here it prints the dir name without problems (but it doesn't show '5/0') D:\äåæmodule1.py 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] Traceback (most recent call last): File D:\äåæ\module1.py, line 3, in module ZeroDivisionError: int division or modulo by zero D:\äåæpython module1.py 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] Traceback (most recent call last): File module1.py, line 3, in module 5/0 ZeroDivisionError: integer division or modulo by zero D:\äåæpython3 module1.py 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] Traceback (most recent call last): File module1.py, line 3, in module 5/0 ZeroDivisionError: int division or modulo by zero -- components: Unicode messages: 82513 nosy: ezio.melotti severity: normal status: open title: SyntaxError: None when the name of the dir contains non-ascii chars type: behavior versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5325 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3446] center, ljust and rjust are inconsistent with unicode parameters
Ezio Melotti ezio.melo...@gmail.com added the comment: Indeed this behavior doesn't seem to be documented. When the string is unicode and the fillchar non-unicode Python implicitly tries to decode the fillchar (and possibly it raises a TypeError if it's not in range(0,128)): u'x'.center(5, 'y') # unicode string, non-unicode (str) fillchar u'yyxyy' # the fillchar is decoded When the string is non-unicode it only accepts a non-unicode fillchar (e.g. 'x'.center(5, 'y')) and it raises a TypeError if the fillchar is unicode: 'x'.center(5, u'y') # non-unicode (str) string, unicode fillchar Traceback (most recent call last): File stdin, line 1, in module TypeError: center() argument 2 must be char, not unicode If it tries to decode the fillchar when the string is unicode, it could also try to encode the unicode fillchar (and possibly raise a TypeError) when the string is non-unicode. Py3, instead, seems to have the opposite behavior. It implicitly encodes unicode fillchars into byte strings when the string is a byte string but it doesn't decode a byte fillchar if the string is unicode: b'x'.center(5, 'y') # byte string, unicode fillchar b'yyxyy' # the fillchar is encoded 'x'.center(5, b'y') # unicode string, byte fillchar Traceback (most recent call last): File stdin, line 1, in module TypeError: The fill character cannot be converted to Unicode In the doc [1] there's written that The methods on bytes and bytearray objects don’t accept strings as their arguments, just as the methods on strings don’t accept bytes as their arguments. so b'x'.center(5, 'y') should probably raise an error on Py3 (I could open a new issue for this). [1]: http://docs.python.org/3.0/library/stdtypes.html#bytes-and-byte-array-methods - In the note -- nosy: +ezio.melotti versions: +Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3446 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3511] Incorrect charset range handling with ignore case flag?
Ezio Melotti ezio.melo...@gmail.com added the comment: I'd close this as won't fix, because (IMHO) ranges like [9-A] shouldn't be used at all, so I won't expect it to work properly. FWIW Perl doesn't seem to match the '_', even with the 'i' flag. Tested with: perl -e '$s = (_ =~ /[9-A]/); print $s' and perl -e '$s = (_ =~ /[9-A]/i); print $s'. It matches : with [9-A] and _ with [9-a] though (both without the 'i' flag). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5326] Wrong anchors in What's New in Python 2.5
New submission from Ezio Melotti ezio.melo...@gmail.com: Some anchors of the What's New in Python 2.5 page [1] are wrong (both in the table of contents and on the titles): lia href=#module-ctypesNew, Improved, and Removed Modules/aul lia href=#module-etreeThe ctypes package/a/li lia href=#module-hashlibThe ElementTree package/a/li lia href=#module-sqliteThe hashlib package/a/li lia href=#module-wsgirefThe sqlite3 package/a/li lia href=#the-wsgiref-packageThe wsgiref package/a/li [1]: http://docs.python.org/whatsnew/2.5.html -- assignee: georg.brandl components: Documentation messages: 82516 nosy: ezio.melotti, georg.brandl severity: normal status: open title: Wrong anchors in What's New in Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5327] Broken link in What's New in Python 2.5
New submission from Ezio Melotti ezio.melo...@gmail.com: The link in the second paragraph of The ElementTree package [1] section of the What's New in Python 2.5 page is broken. [1]: http://docs.python.org/whatsnew/2.5.html#module-hashlib (the name of this anchor is also wrong, see #5326) -- assignee: georg.brandl components: Documentation messages: 82517 nosy: ezio.melotti, georg.brandl severity: normal status: open title: Broken link in What's New in Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5327 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3595] Windows base64 Decode
Ezio Melotti ezio.melo...@gmail.com added the comment: This can be closed if Ahir doesn't provide the script. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3595 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3742] Parsing XML file with Unicode characters causes problem
Ezio Melotti ezio.melo...@gmail.com added the comment: The encoding used by the windows terminal (usually cp850) is not able to encode all the characters, so when you print the text that you extract from the xml file the terminal is not able able to display some characters. If you remove the print() it works fine. You can also try to write the results on a file using utf-8. This issue can be closed. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com