[issue1171] allow subclassing of bytes type

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58819. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Jon Ribbens
Jon Ribbens added the comment: Skip has already provided what amounts to a patch. It just needs to be decided whether to (a) not include it, (b) include it with the floating point part, or (c) include it without the floating point part. I couldn't comment as to how many people need it. I can say

[issue1377] test_import breaks on Linux

2007-11-02 Thread Guido van Rossum
New submission from Guido van Rossum: Error output: [EMAIL PROTECTED]/testtest test_import failed -- Traceback (most recent call last): File "/usr/local/google/home/guido/python/py3k-main/Lib/test/test_import.py", line 184, in test_sys_path_with_unicodemod = __import__("testimport%i" %

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Brett Cannon
Brett Cannon added the comment: This is not going to go anywhere without someone offering a patch to implement this. Plus I suspect this has a much greater use in the C API than in the Python API for datetime. -- nosy: +brett.cannon _ Tracker <[EMAIL

[issue1376] uu module catches a wrong exception type

2007-11-02 Thread billiejoex
New submission from billiejoex: uu module on line 53 erroneously tries to catch an AttributeError exception type. try: mode = os.stat(in_file).st_mode except AttributeError: pass This is not correct since os.stat(), as far as I know, shoul

[issue1752184] PyHeapTypeObject fix

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Fix for all issues committed as revision 58815 (in the py3k branch). The strlen() check is replaced by something saner. Thanks for reminding me! -- resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PR

[issue1184] test fixes for immutable bytes change

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: This has been superseded by PEP 3137 and the work I've done in the py3k-pep3137 branch. -- resolution: -> out of date status: open -> closed __ Tracker <[EMAIL PROTECTED]> ___

[issue1098] decode_unicode doesn't nul-terminate

2007-11-02 Thread Georg Brandl
Georg Brandl added the comment: Committed r58814. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-b

[issue1752184] PyHeapTypeObject fix

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: And in the py3k branch as well (r57504). I'll work on the others and on a fix for the "this is buggy" thing. _ Tracker <[EMAIL PROTECTED]> _

[issue1098] decode_unicode doesn't nul-terminate

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Also r58708 and r58707 in the py3k-pep3137 branch. See also bug 1359. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-b

[issue1098] decode_unicode doesn't nul-terminate

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Yes I did, in r58709, in the trunk. Please backport to 2.5.2. -- assignee: gvanrossum -> __ Tracker <[EMAIL PROTECTED]> __ __

[issue1752184] PyHeapTypeObject fix

2007-11-02 Thread Georg Brandl
Georg Brandl added the comment: The patch's changes to typeobject.c are already in the PEP3137 branch (but without the "this is buggy" comment), the others are not. -- nosy: +georg.brandl _ Tracker <[EMAIL PROTECTED]>

[issue1098] decode_unicode doesn't nul-terminate

2007-11-02 Thread Georg Brandl
Georg Brandl added the comment: Guido, didn't you fix something about 0-termination in a DecodeUnicode function recently? I can't seem to find the commit now though... -- assignee: loewis -> gvanrossum nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]>

[issue1184] test fixes for immutable bytes change

2007-11-02 Thread Georg Brandl
Changes by Georg Brandl: -- assignee: -> gvanrossum nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue846388] Check for signals during regular expression matches

2007-11-02 Thread Ralf Schmitt
Ralf Schmitt added the comment: hm. just noticed that calling PyErr_CheckSignals slows down regular expression matching considerably (50%). I'm adding another patch, which only checks every 4096th iteration for signals. Added file: http://bugs.python.org/file8680/patch.speedup

[issue846388] Check for signals during regular expression matches

2007-11-02 Thread Ralf Schmitt
Ralf Schmitt added the comment: I'm attaching a working patch against 2.5.1 and a short test program. #! /usr/bin/env python import signal import re import time def main(): num=28 # need more than 60s on a 2.4Ghz core 2 r=re.compile("a?"*num+"a"*num) signal.signal(signal.SIGALRM

[issue1352] Preliminary stderr patch

2007-11-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Guido van Rossum added the comment: > >> http://wiki.python.org/moin/TrackerAccessControl >> >> which specifies all permissions in the tracker in detail. > > Is it so that Anonymous < User < Developer < Coordinator? Not in roundup per se, no. It is so in t

[issue1352] Preliminary stderr patch

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: > http://wiki.python.org/moin/TrackerAccessControl > > which specifies all permissions in the tracker in detail. Is it so that Anonymous < User < Developer < Coordinator? If so, the role field could just be a dropdown instead of a list of roles... ___

[issue1352] Preliminary stderr patch

2007-11-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: I just created http://wiki.python.org/moin/TrackerAccessControl which specifies all permissions in the tracker in detail. -- nosy: +loewis __ Tracker <[EMAIL PROTECTED]> _

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2007-11-02 Thread Thomas Heller
Thomas Heller added the comment: I have now made --with-system-ffi default to "yes" for Linux/alpha*, Linux/arm*, Linux/ppc*, and Linux/s390* machines. If you think it is needed for mips machines also please add this - there's no buildbot where I can check the result. __

[issue1352] Preliminary stderr patch

2007-11-02 Thread Georg Brandl
Georg Brandl added the comment: I've submitted a new bug in the meta tracker. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubs

[issue1375] hotshot IndexError when loading stats

2007-11-02 Thread Ruben Reifenberg
New submission from Ruben Reifenberg: Python 2.4.4 - 64 Bit This code reproduceably fails with IndexError: pop from empty list def start(x): x.start() if __name__ == "__main__": import hotshot prof = hotshot.Profile("test3_stats") start(prof) #pr

[issue1374] IDLE - minor FormatParagraph bug fix

2007-11-02 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1374] IDLE - minor FormatParagraph bug fix

2007-11-02 Thread Tal Einat
New submission from Tal Einat: The format_paragraph_event method was not returning "break", causing unwanted side effects when called via a key binding. -- components: IDLE files: IDLE_FormatParagraph.071102.patch messages: 57060 nosy: kbk, taleinat severity: normal status: open title: I

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Jon Ribbens
Jon Ribbens added the comment: Well, I still think that a convert-to-time_t function is essential, and I don't buy any of the counter-arguments so far. The only argument I can see is "should it return float or integer?" - floats are inaccurate and integers can't represent partial seconds. __

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Skip Montanaro
Skip Montanaro added the comment: One other thing worth noting is that %s is not universally available. Solaris, for example, lacks it in its strftime() implementation. (It has a bazillion other non-standard format strings but not %s.) Skip _ Tracker <[EMAI

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Skip Montanaro
Skip Montanaro added the comment: >> No fractions of a second... Jon> If we're expecting floating-point, then everything you said earlier Jon> about the limitations of ints was a bit redundant ;-) Yes, sorry. I responded to the mail without going back and reviewing the entire thread.

[issue846388] Check for signals during regular expression matches

2007-11-02 Thread Ralf Schmitt
Ralf Schmitt added the comment: here is an example (from http://swtch.com/~rsc/regexp/regexp1.html) python -c 'import re; num=25; r=re.compile("a?"*num+"a"*num); r.match("a"*num)' At work I have seen a real world case of a regular expression which ran for minutes rendering the application unres

[issue1068268] subprocess is not EINTR-safe

2007-11-02 Thread Ralf Schmitt
Ralf Schmitt added the comment: In normal application code that signal.alarm is called for a reason. And the caller most probably expects it to interrupt the read calls. So I think the proposed patch is wrong. What was the signal interrupting the read calls? maybe SIGPIPE? -- nosy: +sc

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: I trust that there's a problem, but this can't be right -- the address of r_strlen is passed to PyArg_ParseTuple corresponding to an 'i' format letter. That will never do. -- assignee: -> nnorwitz nosy: +gvanrossum, nnorwitz

[issue1373] turn off socket timeout in test_xmlrpc

2007-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58774. Thanks!!! -- nosy: +gvanrossum resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Jon Ribbens
Jon Ribbens added the comment: > No fractions of a second... If we're expecting floating-point, then everything you said earlier about the limitations of ints was a bit redundant ;-) _ Tracker <[EMAIL PROTECTED]>

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Skip Montanaro
Skip Montanaro added the comment: Tom> unless I'm missing something important this will do the trick quite Tom> nicely: from datetime import datetime datetime(2007, 12, 24, 20, 0).strftime("%s") Tom> '1198522800' Tom> For most imaginable use cases, where an epo

[issue1673409] datetime module missing some important methods

2007-11-02 Thread Tom Lazar
Tom Lazar added the comment: unless I'm missing something important this will do the trick quite nicely: >>> from datetime import datetime >>> datetime(2007, 12, 24, 20, 0).strftime("%s") '1198522800' For most imaginable use cases, where an epoch style time stamp is required this

[issue1373] turn off socket timeout in test_xmlrpc

2007-11-02 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +patch, py3k __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1265] pdb bug with "with" statement

2007-11-02 Thread Christian Heimes
Christian Heimes added the comment: The bug makes debugging a crux :( -- priority: -> high resolution: -> accepted type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ __

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-02 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +patch priority: -> high resolution: -> accepted versions: +Python 2.6, Python 3.0 __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1373] turn off socket timeout in test_xmlrpc

2007-11-02 Thread Adam Hupp
New submission from Adam Hupp: The attached patch resolves the intermittent test_xmlrpc failures reported by Neal Norwitz[0]. test_xmlrpc starts the XMLRPC server with a socket timeout. This puts the socket into non-blocking mode which is incompatible with the use of socket.makefile as used by

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-02 Thread Peter Weseloh
New submission from Peter Weseloh: When I use zlib.decompress to decompress a string where the result would be >1 GB I get SystemError: Objects/stringobject.c:4089: bad argument to internal function I tracked that down to an int overflow of r_strlen in PyZlib_decompress. Using Py_ssize_t instead

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Changes by Nick Coghlan: -- assignee: -> ncoghlan _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscribe: h

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.6 in rev 58766. I'm not sure if it will be possible to get this into 2.5.2. Leaving open against 2.5 until it is checked in on the maintenance branch. -- components: +Library (Lib) -None resolution: -> accepted versions: +Python 2.5

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Close, but not quite. The problem is that the 'value' argument may be None if instantiation of the exception hasn't been forced before __exit__ gets called. >>> class TestWith(object): ... def __enter__(self): ... pass ... def __exit__(self, exc_type, exc_