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

2009-04-30 Thread Martin v. Löwis
Martin v. Löwis added the comment: That is not a bug in Python. The import statement merely adds a reference to the list into your module, so both variables point to the very same list (my_module.some_list is other_module.some_list). Therefore, any changes made to the list through my_module will

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

2009-04-30 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue1648102] proxy_bypass in urllib handling of macro

2009-04-30 Thread Senthil
Senthil added the comment: I have fix this issue, in the revision 72155 for py2.7 and revision 72156 for py3k. Unfortunately, we have no tests for any proxy handling condition for Windows and Darwin. This is a very specific case in the proxy handling; thought let the fix be in (as per the MSDN

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

2009-04-30 Thread David Stemmer
David Stemmer added the comment: EDIT: delete this, duplicate post -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

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

2009-04-30 Thread David Stemmer
Changes by David Stemmer : Removed file: http://bugs.python.org/file13825/bugs.rar ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2009-04-30 Thread David Stemmer
New submission from David Stemmer : 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'] other_module.py: from my_mo

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

2009-04-30 Thread David Stemmer
New submission from David Stemmer : 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'] other_module.py: from my_mo

[issue5799] Change ntpath functions to implicitly support UNC paths

2009-04-30 Thread Eric Smith
Eric Smith 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, so that it's easie

[issue5872] New C API for declaring Python types

2009-04-30 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

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

2009-04-30 Thread George Sakkis
New submission from George Sakkis : 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__ Get a bar. >>> print F

[issue5883] detach() implementation

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

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

2009-04-30 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven 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 -a`) and then set the

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

2009-04-30 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven added the comment: Shouldn't the fallback be to setlocale(LC_CTYPE, "C") instead of silently passing, though? -- nosy: +asmodai ___ Python tracker __

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Martin v. Löwis
Martin v. Löwis 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 it gets set. Yo

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Steven Bethard
Steven Bethard 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 _

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Steven Bethard
Changes by Steven Bethard : Removed file: http://bugs.python.org/file13649/bdist_msi.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5311] bdist_msi generates version number for pure Python packages

2009-04-30 Thread Steven Bethard
Steven Bethard 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 on your machine. But if

[issue5889] Extra comma in enum - fails on AIX

2009-04-30 Thread Sridhar Ratnakumar
Sridhar Ratnakumar 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

[issue5889] Extra comma in enum - fails on AIX

2009-04-30 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : 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: *** [Objects/unicodeobj

[issue5238] ssl makefile never closes socket

2009-04-30 Thread Constantine Sapuntzakis
Constantine Sapuntzakis 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 without the close = Tru

[issue5888] mmap ehancement - resize with sequence notation

2009-04-30 Thread Brian Mearns
New submission from Brian Mearns : 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, 8, 9

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

2009-04-30 Thread Brian Mearns
New submission from Brian Mearns : 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 is out of bounds.

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

2009-04-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 correctly applied. Clos

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

2009-04-30 Thread Andres Moreira
New submission from Andres Moreira : Hi, using ipython2.5 in Ubuntu 9.04. I've get this traceback: In [1]: max? --- NameError Traceback (most recent call last) /var/lib/python-support/pyth

[issue5883] detach() implementation

2009-04-30 Thread Antoine Pitrou
Antoine Pitrou 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. How about “Sep

[issue5883] detach() implementation

2009-04-30 Thread Antoine Pitrou
Antoine Pitrou 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 -- ___ Python

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

2009-04-30 Thread Geoffrey Bache
Geoffrey Bache 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 ___

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

2009-04-30 Thread Geoffrey Bache
Geoffrey Bache 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 broken to me. It's surel

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
Wang Chun 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 #include #include int

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
New submission from Wang Chun : 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 is, the C interfac

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

2009-04-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-04-29 22:39, Martin v. Löwis @psf.upfronthosting.co.za wrote: > Martin v. Löwis added the comment: > > I think we could preserve the marshal format with yet another error > handler - one that emits half surrogates into their intuitive form. That's