[issue1372] zlibmodule.c: int overflow in PyZlib_decompress
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 of int solved this for me (on 64bit Linux). The patch is against python/trunk/Modules/zlibmodule.c Revision: 56476 Kind regards, Peter -- components: Extension Modules files: int_overflow.diff messages: 57047 nosy: PeterW severity: normal status: open title: zlibmodule.c: int overflow in PyZlib_decompress type: crash versions: Python 2.5 Added file: http://bugs.python.org/file8676/int_overflow.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1372 __ int_overflow.diff Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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 should be enough. HTH, Tom -- nosy: +tomster _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1373] turn off socket timeout in test_xmlrpc
Changes by Christian Heimes: -- keywords: +patch, py3k __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1373 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1373] turn off socket timeout in test_xmlrpc
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 SocketServer. To work around this the test was specifically ignoring temporary read errors but the ignore was no longer working. The patch resolves this by removing the call to socket.settimeout and the code to ignore temporary read errors. I also had to change the `numrequests' parameter in FailingServerTestCase from 2-1. This test case only makes a single request per test (like the others) so numrequests=2 caused the test to hang. [0]http://mail.python.org/pipermail/python-3000/2007-October/011073.html -- components: Tests files: xmlrpc_nonblock.patch messages: 57048 nosy: hupp severity: normal status: open title: turn off socket timeout in test_xmlrpc versions: Python 3.0 Added file: http://bugs.python.org/file8677/xmlrpc_nonblock.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1373 __ xmlrpc_nonblock.patch Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1372] zlibmodule.c: int overflow in PyZlib_decompress
Changes by Christian Heimes: -- keywords: +patch priority: - high resolution: - accepted versions: +Python 2.6, Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1372 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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 epoch style time stamp is Tom required this should be enough. No fractions of a second... Skip _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1372] zlibmodule.c: int overflow in PyZlib_decompress
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 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1372 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1373] turn off socket timeout in test_xmlrpc
Guido van Rossum added the comment: Committed revision 58774. Thanks!!! -- nosy: +gvanrossum resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1373 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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 [EMAIL PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1705170] contextmanager eats StopIteration
Changes by Nick Coghlan: -- assignee: - ncoghlan _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1705170 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1705170] contextmanager eats StopIteration
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 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1705170 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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. (It's been a couple months.) Note however that my example to_timestamp() function converts the microseconds field to seconds and include them in the result. So, are we concluding that nothing needs to be added to the datetime module? Skip _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue846388] Check for signals during regular expression matches
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 unresponsive. We would have been glad to be able to interrupt the regular expression engine and getting a traceback. -- nosy: +schmir Tracker [EMAIL PROTECTED] http://bugs.python.org/issue846388 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1705170] contextmanager eats StopIteration
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_value, exc_tb): ... print exc_type, exc_value, exc_tb ... from __future__ import with_statement with TestWith(): iter([]).next() ... type 'exceptions.StopIteration' None traceback object at 0xb76bed4c Traceback (most recent call last): File stdin, line 1, in module StopIteration That 'None' in the middle there is the problem - contextmanager.__exit__ needs to be detecting that and instantiating the passed in exception if it isn't already instantiated. Something like the following at the start of the else clause should do the trick: if value is None: value = type() -- nosy: +ncoghlan _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1705170 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1265] pdb bug with with statement
Christian Heimes added the comment: The bug makes debugging a crux :( -- priority: - high resolution: - accepted type: - behavior __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1265 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1374] IDLE - minor FormatParagraph bug fix
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: IDLE - minor FormatParagraph bug fix versions: Python 2.5, Python 2.6, Python 3.0 Added file: http://bugs.python.org/file8678/IDLE_FormatParagraph.071102.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1374 __ IDLE_FormatParagraph.071102.patch Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1374] IDLE - minor FormatParagraph bug fix
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1374 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1375] hotshot IndexError when loading stats
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) #prof.start() prof.stop() prof.close() from hotshot import stats s = stats.load(test3_stats) Note1: This issue may be identical with Issue1019882 (another situation but same Error.) Note2: Workaround exists: Replace the line start(prof) with prof.start(). In this case, the resulting stats (binary) file is 1 Byte shorter, and no error happens. -- components: Library (Lib) messages: 57061 nosy: ratsberg severity: minor status: open title: hotshot IndexError when loading stats type: crash versions: Python 2.4 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1375 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1352] Preliminary stderr patch
Georg Brandl added the comment: I've submitted a new bug in the meta tracker. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1352 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1292] libffi needs an update to support mips64, arm and armeabi on linux
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. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1292 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1352] Preliminary stderr patch
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] http://bugs.python.org/issue1352 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1352] Preliminary stderr patch
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... __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1352 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1352] Preliminary stderr patch
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 this installation. If so, the role field could just be a dropdown instead of a list of roles... I believe a lot of these permissions are redundant. People holding the Developer role typically also hold the User role. It might be possible to drop the User role from the developers, and the User and Developer roles from the Coordinators, without loss of permissions - but there is a chance that doing so would break things in case some permission was forgotten. Regards, Martin __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1352 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue846388] Check for signals during regular expression matches
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, signal.default_int_handler) signal.alarm(1) stime = time.time() try: r.match(a*num) except KeyboardInterrupt: assert time.time()-stime3 else: raise RuntimeError(no keyboard interrupt) if __name__=='__main__': main() Added file: http://bugs.python.org/file8679/patch Tracker [EMAIL PROTECTED] http://bugs.python.org/issue846388 patch Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue846388] Check for signals during regular expression matches
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 Tracker [EMAIL PROTECTED] http://bugs.python.org/issue846388 patch.speedup Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1752184] PyHeapTypeObject fix
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] http://bugs.python.org/issue1752184 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1098] decode_unicode doesn't nul-terminate
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] http://bugs.python.org/issue1098 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1098] decode_unicode doesn't nul-terminate
Guido van Rossum added the comment: Also r58708 and r58707 in the py3k-pep3137 branch. See also bug 1359. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1098 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1098] decode_unicode doesn't nul-terminate
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] http://bugs.python.org/issue1098 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1184] test fixes for immutable bytes change
Changes by Georg Brandl: -- assignee: - gvanrossum nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1184 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1184] test fixes for immutable bytes change
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] http://bugs.python.org/issue1184 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1752184] PyHeapTypeObject fix
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 PROTECTED] http://bugs.python.org/issue1752184 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1376] uu module catches a wrong exception type
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, should raise OSError exceptions only. This would turn in an error in case we pass a broken symlink as in_file argument. -- components: Library (Lib) messages: 57077 nosy: billiejoex severity: normal status: open title: uu module catches a wrong exception type type: behavior versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1376 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1098] decode_unicode doesn't nul-terminate
Georg Brandl added the comment: Committed r58814. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1098 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1752184] PyHeapTypeObject fix
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] http://bugs.python.org/issue1752184 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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 PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1377] test_import breaks on Linux
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 % i)ImportError: No module named testimport1 -- assignee: tiran messages: 57079 nosy: gvanrossum, tiran severity: normal status: open title: test_import breaks on Linux versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1377 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673409] datetime module missing some important methods
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 that I need it, and anyone else who's used to manipulating dates and times either in a unixy sort of way or with libraries that are expecting time_t's will need it. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1673409 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1171] allow subclassing of bytes type
Guido van Rossum added the comment: Committed revision 58819. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1171 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com