[issue5441] Convenience API for timeit.main

2009-03-07 Thread Nick Coghlan
New submission from Nick Coghlan : For quick and dirty benchmarking, timeit.main() is one of the handiest tools out there, but calling it from Python code is a little tedious since you need to construct a fake list of command line arguments in order to call it. What would be nice is a convenienc

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: Attached simple benchmark script to check for any slowdowns introduced by the planned with statement changes. Added file: http://bugs.python.org/file13264/pep377_bench.py ___ Python tracker

[issue5440] string.strip behaves strangly

2009-03-07 Thread Ezio Melotti
Ezio Melotti added the comment: Duplicated of #5439 -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue5439] string.strip behaves strangly

2009-03-07 Thread Ezio Melotti
Ezio Melotti added the comment: http://docs.python.org/library/string.html#string.strip string.strip(s[, chars]) Return a copy of the string with leading and trailing characters removed. If chars is omitted or None, whitespace characters are removed. If given and not None, chars must be a

[issue5440] string.strip behaves strangly

2009-03-07 Thread Dongwook Jang
New submission from Dongwook Jang : Python 2.4.2 (#1, Mar 4 2008, 22:56:43) [GCC 3.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> temp = "a/b/c" >>> temp.strip("a") '/b/c' >>> temp.strip("a/") 'b/c' >>> temp.strip("a/b") 'c' >>> temp.strip("a/b/") 'c' >

[issue5439] string.strip behaves strangly

2009-03-07 Thread Dongwook Jang
New submission from Dongwook Jang : Python 2.4.2 (#1, Mar 4 2008, 22:56:43) [GCC 3.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> temp = "a/b/c" >>> temp.strip("a") '/b/c' >>> temp.strip("a/") 'b/c' >>> temp.strip("a/b") 'c' >>> temp.strip("a/b/") 'c' >

[issue1818] Add named tuple reader to CSV module

2009-03-07 Thread Skip Montanaro
Skip Montanaro added the comment: Jervis> in csv.rst removed reference to reader.next() as a public method. Because? I've not seen any discussion in this issue or in any other forums (most certainly not on the c...@python.org mailing list) which would suggest that csv.reader's next() method sh

[issue1818] Add named tuple reader to CSV module

2009-03-07 Thread Jervis Whitley
Jervis Whitley added the comment: Added a patch against py3k branch. in csv.rst removed reference to reader.next() as a public method. Added file: http://bugs.python.org/file13263/ntreader4_py3_1.diff ___ Python tracker _

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 377 (http://www.python.org/dev/peps/pep-0377/) has now been submitted. ___ Python tracker ___ ___ Python-bu

[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2009-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: A proper fix would probably be to maintain a bunch of preallocated instances in a freelist rather than relying on an explicit singleton. It would enforce proper dereferencing and garbage collection semantics. ___ Python track

[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2009-03-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : It seems test_from_2G_generator doesn't respect its announced memory consumption. I launched test_bigmem with "-M 12G" on a 16GB machine, and the interpreter process got killed by the OOM killer (Out Of Memory) while running this test case. -- compone

[issue3700] test_bigmem broken

2009-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks ok. -- resolution: -> fixed status: pending -> closed ___ Python tracker ___ ___ Python-bugs-

[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2009-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: The following patch fixes the case when the exception is discarded in Python, but not when e.g. PyErr_Clear() is used from C code. -- keywords: +patch Added file: http://bugs.python.org/file13262/issue5437.patch ___

[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2009-03-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : The PyExc_MemoryErrorInst object is persistent and its members never get cleared. This means any local variable which gets caught in the traceback isn't deallocated until the next MemoryError (!). Sample script demonstrates this. (this doesn't seem to affect

[issue3700] test_bigmem broken

2009-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed to py3k, let's see if the buildbots like it... -- stage: patch review -> committed/rejected status: open -> pending ___ Python tracker ___

[issue5415] uuid module generates incorrect values for uuid3 (and possibly uuid5)

2009-03-07 Thread DSM
DSM added the comment: Hmm. I quickly wrote my own implementation and I agree with the uuid module and disagree with the RFC value. Further searching suggests that this may be an error in the RFC. See http://www.rfc-editor.org/errata_search.php?rfc=4122 ; see also http://bugs.sun.com/bugda

[issue5425] 2to3 wrong for types.StringTypes

2009-03-07 Thread Daniel Diniz
Daniel Diniz added the comment: I think Hagen's initial analysis makes more sense: the translation is currently guessing that the user meant the more restrict (text) alternative. IMHO it doesn't make much sense to have this: >>> strings = (types.StringType, types.UnicodeType) >>> strings == typ

[issue5435] test_httpservers on Debian Testing

2009-03-07 Thread Michael Zamot
Michael Zamot added the comment: I re-download again (maybe its the four time jaja) the python 3.0.1 from the svn and now, it pass all the tests. Thanks to all! ___ Python tracker ___ ___

[issue5435] test_httpservers on Debian Testing

2009-03-07 Thread Michael Zamot
Michael Zamot added the comment: I dont know, it weird, because im running the test as root. I tried in a Stable Lenny, and nothing too ___ Python tracker ___

[issue5435] test_httpservers on Debian Testing

2009-03-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Probably this is short code to reproduce "permission denied". import os, pwd nobody = pwd.getpwnam('nobody')[2] os.setuid(nobody) open("dummy.txt", "w").write("foo") # permission denied Still I cannot understand what's going on. Is debian more secure than o

[issue5435] test_httpservers on Debian Testing

2009-03-07 Thread Michael Zamot
Michael Zamot added the comment: I tried too yesterday with the svn version, and i get the same error. Is there a solution or im doing something wrong? ___ Python tracker ___ ___

[issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1)

2009-03-07 Thread Tarek Ziadé
Tarek Ziadé added the comment: That's because get_config_vars reads the src_dir located in your Makefile (in config/Makefile): srcdir=>>.../Users/ronald/Projects/python/bld/r301 VPATH=>.>.../Users/ronald/Projects/python/bld/r301 Moreover, the test is totally broken because it uses "In

[issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1)

2009-03-07 Thread Martina Oefelein
New submission from Martina Oefelein : Majestix:~ martina$ python3.0 -m test.regrtest test_distutils Could not find '/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test' in sys.path to remove it test_distutils test test_distutils failed -- Traceback (most recent call last): F

[issue3992] removed custom log from distutils

2009-03-07 Thread Akira Kitada
Akira Kitada added the comment: I updated the patch. Mine only changes log.py. -- nosy: +akitada Added file: http://bugs.python.org/file13260/remove-custom-log-revised.diff ___ Python tracker __

[issue1611] doctest.testmod gets noisy if called more than once per SystemExit

2009-03-07 Thread R. David Murray
R. David Murray added the comment: The offending output lines were commented out by Nick Coghlan in commit 67790 with the comment "Don't print here by default, since doing so breaks some of the buildbots". The actual code change disables the output rather than changing the default, so perhaps i

[issue4214] no extension debug info with msvc9compiler.py

2009-03-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Like Robin, I think it's better to remove the /pdb option, and let the default behavior, which is (when /debug is present) to generate a .pdb file next to the generated target. ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-03-07 Thread Joshua Logan
Changes by Joshua Logan : -- nosy: +jaylogan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue3985] removed string module from distutils [patch]

2009-03-07 Thread Akira Kitada
Akira Kitada added the comment: The patch looks ok to me. Python 2.3 - 2.6 seem working fine with this patch, too. -- nosy: +akitada ___ Python tracker ___ __

[issue5435] test_httpservers on Debian Testing

2009-03-07 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I tried on coLinux(debian) and I got similar errors. But I'm not unix guy, I don't know well what "permission denied" means. debian:~/python-dev/py3k# ./python Lib/test/test_httpservers.py test_command (__main__.BaseHTTPServerTestCase) ... ok test_handler (

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-03-07 Thread Martin v. Löwis
Martin v. Löwis added the comment: I don't think it will be possible to accept these patches in the current form and way in which they are presented. I randomly picked issue2636-features-2.diff, and see that it contains lots of style and formatting changes, which is completely taboo for this kin

[issue5434] datetime.MonthDelta

2009-03-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +lemburg, tim_one ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue5435] test_httpservers on Debian Testing

2009-03-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib), Tests -None type: compile error -> behavior ___ Python tracker ___ ___ Pytho

[issue5425] 2to3 wrong for types.StringTypes

2009-03-07 Thread Hagen Fürstenau
Hagen Fürstenau added the comment: I can see the merit of not including "bytes" in StringTypes, but then the translation of StringType should be changed accordingly. How about changing the present StringType -> bytes StringTypes -> str into StringType -> str StringTypes -> (str,) ___