[issue7426] StringIO and with statement

2009-12-03 Thread Jean-Michel Fauth
New submission from Jean-Michel Fauth wxjmfa...@gmail.com: When toying with the with statement, I fell on this: Python 2.6.4 with open('abc.txt', 'r') as f: for line in f: print line.rstrip() abc def import StringIO fo = StringIO.StringIO('abc\ndef\n')

[issue7426] StringIO and with statement

2009-12-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +alexandre.vassalotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7426 ___ ___

[issue7414] Format code C is missing from skipitem() in getargs.c

2009-12-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks! Fixed in r76646 (py3k) and r76647 (release31-maint). -- nosy: +mark.dickinson resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior versions: +Python 3.2

[issue7327] format: minimum width: UTF-8 separators and decimal points

2009-12-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Reassigning to Eric. -- assignee: mark.dickinson - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7327 ___

[issue7327] format: minimum width: UTF-8 separators and decimal points

2009-12-03 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I've raised the issue with unicode and locale on python-dev: http://mail.python.org/pipermail/python-dev/2009-December/094408.html Pending the outcome of that decision, I'll move forward on this issue. --

[issue6985] range() fails with long integers

2009-12-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I suspect the ints in builtin_range should have been changed to Py_ssize_t when PEP 353 was implemented. I've fixed them in trunk in r76625; it doesn't seem worth changing this in the 2.6 branch. So on an LP64 machine with sufficient

[issue6985] range() fails with long integers

2009-12-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Whoops. That revision number should have been r76648. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6985 ___

[issue6645] multiprocessing build fails on AIX - /dev/urandom (or equivalent) not found

2009-12-03 Thread David Narayan
David Narayan david.nara...@gmail.com added the comment: This is a patch that I have used on AIX. The idea for this patch came from uuid.py. This patch was created against Python 2.6.4. -- keywords: +patch nosy: +davidnarayan Added file:

[issue6895] locale._parse_localename fails when localename does not contain encoding information

2009-12-03 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- versions: +Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6895 ___

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-12-03 Thread Erik Carstensen
Erik Carstensen sandb...@virtutech.com added the comment: Once I considered this approach, but problems was that nFileIndexLow/High can change every time file handle is opened, so it's not unique. See remarks in following page. http://msdn.microsoft.com/en-us/library/aa363788%28VS.85%29.aspx

[issue6895] locale._parse_localename fails when localename does not contain encoding information

2009-12-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Assigning to MAL, as this is his code. -- assignee: loewis - lemburg nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6895

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-12-03 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: -tjreedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5985 ___ ___ Python-bugs-list mailing

[issue2441] Mac build_install.py script fetches unavailable SQLite version

2009-12-03 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- assignee: glyph - ronaldoussoren nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2441 ___

[issue2441] Mac build_install.py script fetches unavailable SQLite version

2009-12-03 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: This has long been fixed. Even for 2.6maint the SQLite version currently being fetched is 3.6.11. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7427] BadStatusLine is hell to debug

2009-12-03 Thread djc
New submission from djc dirk...@ochtman.nl: For whatever reason, BadStatusLine tracebacks often don't show the line passed into them. Given the errr, heavy architecture of httplib, this makes it pretty bad to debug. It's not clear to me why this is: Traceback (most recent call last): File

[issue7427] BadStatusLine is hell to debug

2009-12-03 Thread djc
djc dirk...@ochtman.nl added the comment: Also, it might be useful here if it showed repr(line) instead of just line, but that'd just be icing on the cake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7427

[issue7428] Possible memory issue with optparse

2009-12-03 Thread Bill Spotz
New submission from Bill Spotz wfsp...@sandia.gov: I develop python extension modules for Trilinos, a large scientific computing project: http://trilinos.sandia.gov Unit testing my extension modules under Mac OS X, I came across the following error messages after upgrading from gcc 4.0

[issue6895] locale._parse_localename fails when localename does not contain encoding information

2009-12-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: The reason this call fails is that there's no locale alias defined for ml_IN in the local_alias dictionary. While the patch is probably a good idea, it also hides the missing mapping. I think a better approach would be to check the locale

[issue7381] subprocess.check_output: docstring has inconsistent leading whitespace

2009-12-03 Thread flox
Changes by flox la...@yahoo.fr: Removed file: http://bugs.python.org/file15386/issue7381_first.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7381 ___

[issue7381] subprocess.check_output: docstring has inconsistent leading whitespace

2009-12-03 Thread flox
flox la...@yahoo.fr added the comment: Patch against the trunk, and against the Py3k branch. It fixes: * docstring and documentation formatting * and examples -- assignee: - georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 2.6, Python 2.7 Added file:

[issue7381] subprocess.check_output: docstring has inconsistent leading whitespace

2009-12-03 Thread flox
Changes by flox la...@yahoo.fr: Added file: http://bugs.python.org/file15447/issue7381_py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7381 ___

[issue7429] PrettyPrinter cannot print dicts with unsortable keys

2009-12-03 Thread Martin Altmayer
New submission from Martin Altmayer martin.altma...@web.de: In the following code I use a class for dictionary-keys that has a __hash__-function but cannot be ordered and try to print that dictionary with a PrettyPrinter. import pprint pp = pprint.PrettyPrinter() # A class that supports

[issue1398] Can't pickle partial functions

2009-12-03 Thread flox
flox la...@yahoo.fr added the comment: It seems fixed on trunk. It is fixed on Python 3.1 and 3.2, too. With Python 2.6 I see the error: ./python partial_bug.py TypeError: can't pickle partial objects Documentation for trunk and py3k is OK? -- nosy: +flox

[issue7428] Possible memory issue with optparse

2009-12-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: optparse itself is a pure-python library, so it can't possibly cause memory errors. Thanks for the report, but there isn't any realistic chance that we can do anything with it. So closing it as won't fix. If you want to debug it further, I

[issue7429] PrettyPrinter cannot print dicts with unsortable keys

2009-12-03 Thread David W. Lambert
David W. Lambert b49p23t...@stny.rr.com added the comment: I believe this issue was resolved---expect it in a future release. -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7429

[issue7430] cmp still sends messages

2009-12-03 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: ''' RuntimeError: maximum recursion depth exceeded in cmp Python 3.1.1 (r311:74480, Oct 2 2009, 12:29:57) [GCC 4.3.3] on linux2 ''' import itertools,pprint combos = itertools.combinations def connect(nodes,a,b):

[issue4380] Deepcopy of functools.partial gives wierd exception

2009-12-03 Thread flox
flox la...@yahoo.fr added the comment: Already fixed on Python trunk (2.7). Fixed on branches 3.1 and 3.2, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4380 ___

[issue7430] cmp still sends messages

2009-12-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: How about maximum recursion depth exceeded in comparison instead? (It's coming from PyObject_RichCompare in Objects/object.c, by the way.) -- nosy: +mark.dickinson ___ Python tracker

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-12-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch. Committed as r76651, r76652, r76653, r76654, r76655 and r76656. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4120

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-12-03 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4120 ___

[issue6834] use different mechanism for pythonw on osx

2009-12-03 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Another reminder: when implementing, make sure platform.architecture() always returns the correct results for bits. It seems the Apple patches in 10.6 don't handle that (it seems to always report 64-bit), probably because the code in

[issue7431] UnboundLocalError during test.test_linecache.LineCacheTests

2009-12-03 Thread ivank
New submission from ivank i...@ludios.org: Python 2.7, svn r76655. I ran the tests with python2.7 Lib/test/testall.py test-results.txt test_linecache test_checkcache (test.test_linecache.LineCacheTests) ... ERROR test_clearcache (test.test_linecache.LineCacheTests) ... ok test_getline

[issue7431] UnboundLocalError during test.test_linecache.LineCacheTests

2009-12-03 Thread ivank
ivank i...@ludios.org added the comment: This error is just masking a Permission denied error during source = open(source_name, 'w') so I guess it's not very important, just annoying. -- ___ Python tracker rep...@bugs.python.org

[issue7432] Py3k doc: from __future__ import division not necessary

2009-12-03 Thread Jared Grubb
New submission from Jared Grubb pyt...@jaredgrubb.com: In the Python 3.1 docs for the 'dis' module, the following appears: ( http://docs.python.org/3.1/library/dis.html ) BINARY_TRUE_DIVIDE()¶ Implements TOS = TOS1 / TOS when from __future__ import division is in effect. There is always

[issue7432] Py3k doc: from __future__ import division not necessary

2009-12-03 Thread Jared Grubb
Jared Grubb pyt...@jaredgrubb.com added the comment: Ditto on a few dozen lines later: INPLACE_TRUE_DIVIDE()¶ Implements in-place TOS = TOS1 / TOS when from __future__ import division is in effect. -- ___ Python tracker rep...@bugs.python.org

[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer

2009-12-03 Thread Pauli Virtanen
New submission from Pauli Virtanen p...@iki.fi: The following code causes a segmentation fault (or glibc error, or other problems): x = someobject() y = memoryview(x) z = memoryview(y) The problem is that someobject.bf_releasebuffer will be called two times with an identical Py_buffer

[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer

2009-12-03 Thread Pauli Virtanen
Changes by Pauli Virtanen p...@iki.fi: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7433 ___ ___ Python-bugs-list mailing list

[issue7429] PrettyPrinter cannot print dicts with unsortable keys

2009-12-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Confirmed, it is fixed on all maintained branches. So the fix will be in 3.1.2, which should be in a month or so. -- components: +Library (Lib) -None nosy: +r.david.murray priority: - normal resolution: - out of date status:

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2009-12-03 Thread Pauli Virtanen
Changes by Pauli Virtanen p...@iki.fi: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7385 ___ ___ Python-bugs-list mailing list

[issue7431] UnboundLocalError during test.test_linecache.LineCacheTests

2009-12-03 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - r.david.murray components: +Tests -Library (Lib) nosy: +r.david.murray priority: - low versions: +Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue7431] UnboundLocalError during test.test_linecache.LineCacheTests

2009-12-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Fixed in r76659, r76660, r76661, and r76662. I also changed the open to use 'with' so that errors raised by the open will not be masked. Flox, given how active you are being, you might enjoy joining us in #python-dev on freenode.

[issue7406] int arithmetic relies on C signed overflow behaviour

2009-12-03 Thread Zooko O'Whielacronx
Zooko O'Whielacronx zo...@zooko.com added the comment: Here is a way to test for overflow which is correct for any C implementation: static PyObject * int_add(PyIntObject *v, PyIntObject *w) { register long a, b; CONVERT_TO_LONG(v, a); CONVERT_TO_LONG(w, b); if

[issue7406] int arithmetic relies on C signed overflow behaviour

2009-12-03 Thread Zooko O'Whielacronx
Zooko O'Whielacronx zo...@zooko.com added the comment: Here is a set of macros that I use to test for overflow: http://allmydata.org/trac/libzutil/browser/libzutil/zutilimp.h -- ___ Python tracker rep...@bugs.python.org