[issue3672] Ill-formed surrogates not treated as errors during encoding/decoding

2009-04-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-04-29 22:39, Martin v. Löwis @psf.upfronthosting.co.za wrote: Martin v. Löwis mar...@v.loewis.de added the comment: I think we could preserve the marshal format with yet another error handler - one that emits half surrogates into

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
New submission from Wang Chun yaohua2...@gmail.com: uuid.uuid1() currently uses two different ways to generate a uuid. If the system call uuid_generate_time is available, uuid1() uses the system call via the ctypes interface, otherwise, it uses pure Python code to generate a uuid. The problem

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
Wang Chun yaohua2...@gmail.com added the comment: This is my test on another faster machine. $ cat test.py import sys, time, uuid N = int(sys.argv[1]) t = time.time() for x in xrange(N): uuid.uuid1() print('%.3f microseconds' % ((time.time() - t) * 100.0 / N)) $ cat test.c #include

[issue957650] Fix for bugs relating to ntpath.expanduser()

2009-04-30 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: Just ran into this myself, and would agree with Christian's comments. On my system, my home directory is a mounted network drive, hence H:\. It was a bit of a surprise when os.path.expanduser(~fred) returned H:\\fred... This seems

[issue957650] Fix for bugs relating to ntpath.expanduser()

2009-04-30 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: In fact, wouldn't a very simple fix be to not return paths that don't exist? That would probably catch 90% of the cases. -- ___ Python tracker rep...@bugs.python.org

[issue5883] detach() implementation

2009-04-30 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Reviewers: , Please review this at http://codereview.appspot.com/52075 Affected files: Doc/library/io.rst Lib/_pyio.py Lib/test/test_io.py Modules/_io/bufferedio.c Modules/_io/textio.c --

[issue5883] detach() implementation

2009-04-30 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: http://codereview.appspot.com/52075/diff/1/2 File Doc/library/io.rst (right): http://codereview.appspot.com/52075/diff/1/2#newcode366 Line 366: Disconnect this buffer from its underlying raw stream and return it. This sentence is a bit ambiguous.

[issue5886] curses/__init__.py: global name '_os' is not defined

2009-04-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: These lines in curses/__init__.py have been added in trunk and patched in the python26-maint branch; never in python25-maint. How do they appear in your 2.5 version? Do you use a customized version? In any case the patch was not

[issue5887] mmap.write_byte out of bounds - no error, position gets screwed up

2009-04-30 Thread Brian Mearns
New submission from Brian Mearns bmea...@ieee.org: Created an mmap for a file in update mode, seek to end of file, and invoke write_byte. The file is not updated (as expected), but did not get any error indicating the write was out of bounds, and when I invoke tell(), it reports a position that

[issue5888] mmap ehancement - resize with sequence notation

2009-04-30 Thread Brian Mearns
New submission from Brian Mearns bmea...@ieee.org: I thought it would be nice if mmaps could generally look a little more like sequences. Specifically, being able to resize+write using square-bracket notation as with lists: x = [1,2,3,4,5] x [1, 2, 3, 4, 5] x[2:2] = [6,7,8,9] x [1, 2, 6, 7,

[issue5238] ssl makefile never closes socket

2009-04-30 Thread Constantine Sapuntzakis
Constantine Sapuntzakis csapu...@gmail.com added the comment: I ran into this problem when trying to use wrapsocket with httplib.py and came up with the same fix. The problem turns out to be even simpler than a ref counting issue. In the current tree, the _fileobject constructor is called

[issue5889] Extra comma in enum - fails on AIX

2009-04-30 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: cc_r -qlanglvl=ansi -c -DNDEBUG -O -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/unicodeobject.o Objects/unicodeobject.c Objects/stringlib/string_format.h, line 37.15: 1506-275 (S) Unexpected text ',' encountered. make:

[issue5889] Extra comma in enum - fails on AIX

2009-04-30 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: typedef enum { ANS_INIT, ANS_AUTO, ANS_MANUAL, --- Extra comma need to be removed } AutoNumberState; /* Keep track if we're auto-numbering fields */ -- ___ Python tracker

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I'm still stuck on getting the right name to show up in ARP. Another problem: it seems like we have to update the ProductCode at runtime as well - otherwise, you can only have one module installed for all the versions of Python you have

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Steven Bethard
Changes by Steven Bethard steven.beth...@gmail.com: Removed file: http://bugs.python.org/file13649/bdist_msi.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5311 ___

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Updated the patch to make sure ProductName is set before ValidateProductID. -- Added file: http://bugs.python.org/file13823/bdist_msi.patch ___ Python tracker rep...@bugs.python.org

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm still stuck on getting the right name to show up in ARP. It may that indeed Installer blocks the property from being passed onto the server side. Three things to try: - inspect the log file, to see whether it is passed, and then whether

[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-04-30 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment: Shouldn't the fallback be to setlocale(LC_CTYPE, C) instead of silently passing, though? -- nosy: +asmodai ___ Python tracker rep...@bugs.python.org

[issue1443504] locale.getpreferredencoding() dies when setlocale fails

2009-04-30 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment: You don't want to completely nix the setlocale(LC_CTYPE, ) call though. The denotes to grab the native environment, in other words, to grab whatever the current user's LC_CTYPE environment variable is set to (see `locale

[issue5883] detach() implementation

2009-04-30 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks for the review! New patch attached... -- Added file: http://bugs.python.org/file13824/detach.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5883

[issue5890] Subclassing property doesn't preserve the auto __doc__ behavior

2009-04-30 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: Is the following behavior expected ? class MyProp(property): pass class Foo(object): @property def bar(self): '''Get a bar.''' @MyProp def baz(self): '''Get a baz.''' print Foo.bar.__doc__

[issue5872] New C API for declaring Python types

2009-04-30 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5872 ___ ___ Python-bugs-list

[issue5799] Change ntpath functions to implicitly support UNC paths

2009-04-30 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The doc patch doesn't apply cleanly for me. There are a number of code cleanups in the patch, like 0-False, 1-True, the improvement of the params to path(), improvement in isabs(), etc. I think these cleanups should be made in a separate patch,

[issue5891] strange list.sort() behavior on import, del and inport again

2009-04-30 Thread David Stemmer
New submission from David Stemmer dstem...@brandeis.edu: Given two modules, I've seen the following kind of strange behavior with list sorting on import and delete; a list that has been imported, sorted and deleted remains sorted on a second import: my_module.py: some_list = ['b','a']

[issue5892] strange list.sort() behavior on import, del and inport again

2009-04-30 Thread David Stemmer
New submission from David Stemmer dstem...@brandeis.edu: Given two modules, I've seen the following kind of strange behavior with list sorting on import and delete; a list that has been imported, sorted and deleted remains sorted on a second import: my_module.py: some_list = ['b','a']

[issue5891] strange list.sort() behavior on import, del and inport again

2009-04-30 Thread David Stemmer
Changes by David Stemmer dstem...@brandeis.edu: Removed file: http://bugs.python.org/file13825/bugs.rar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5891 ___

[issue5891] strange list.sort() behavior on import, del and inport again

2009-04-30 Thread David Stemmer
David Stemmer dstem...@brandeis.edu added the comment: EDIT: delete this, duplicate post -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5891 ___