[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread HiroakiKawai
HiroakiKawai ka...@apache.org added the comment: The sample code has bug. expat is OK. Method char_data must append the incoming characters because the character sequence is an buffered input. def char_data(self, data): self.data += data You should reset it by self.data = '' at

[issue4908] adding a get_metadata in distutils

2009-01-24 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Well since Python 2.4 doesn't have the egg-info feature, that is another story. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4908 ___

[issue5040] Bug of CGIXMLRPCRequestHandler

2009-01-24 Thread Wayne Huang
New submission from Wayne Huang waynehuang.pub...@gmail.com: I met a bug of CGIXMLRPCRequestHandler in Python3.0. Because of the bug, I couldn't use RPC in Apache CGI. The version of my Python 3.0 is Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] win32. The code of

[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2009-01-24 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Good suggestion, I'll add the quotes in the spawn call Which does a simple log.info(string.join(cmd, ' ')) at the moment -- assignee: - tarek nosy: +tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5

[issue3677] importing from UNC roots doesn't work

2009-01-24 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: added the mem release in r68882. I'll try to add test cases too. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3677 ___

[issue3677] importing from UNC roots doesn't work

2009-01-24 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Added tests for UNC path imports in r68883 and r68884 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3677 ___

[issue3677] importing from UNC roots doesn't work

2009-01-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: The path variable should be PyMem_Free'd Sorry if I'm missing something, but is this really needed? Other PyArg_ParseTuple(args, s... doesn't seem to have corresponding PyMem_Free. static PyObject * imp_new_module(PyObject *self,

[issue5025] test_kqueue failure on OS X

2009-01-24 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5025 ___ ___ Python-bugs-list

[issue3677] importing from UNC roots doesn't work

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Sorry if I'm missing something, but is this really needed? Yes, the es converter allocates memory. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3677

[issue4111] Add DTrace probes

2009-01-24 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Laca Please see here for discussion about the -G flag on OS X: Laca http://markmail.org/message/4nheqnexjr2o6mcx Laca If I read it correctly, on OS X, you will need to use -h instead Laca of -G and it won't emit an object file

[issue3677] importing from UNC roots doesn't work

2009-01-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Ah, es is used in py3k, thanks. And sorry about my merge which had memory leak. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3677 ___

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: Hi kawai. I got correct output by modifying the code like you say, but I still cannot understand why this happens. Could you tell me more briefly, or point any documents about it? I can't find any notes which say don't pass strings but

[issue4710] [PATCH] zipfile.ZipFile does not extract directories properly

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Committed as r68885, r68886, r68887, and r6 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4710

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread HiroakiKawai
HiroakiKawai ka...@apache.org added the comment: That's the spec of XML SAX interface. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5036 ___ ___

[issue5041] Memory leak in imp.find_module

2009-01-24 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: I found memory leak related to es on PyArg_ParseTuple. -- components: Extension Modules files: py3k_memory_leak.patch keywords: easy, needs review, patch messages: 80452 nosy: ocean-city severity: normal status: open

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread HiroakiKawai
HiroakiKawai ka...@apache.org added the comment: Please read The ContentHandler.characters() callback is missing data! http://www.saxproject.org/faq.html and close this issue :) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5036

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: a mistake of my former message, briefly - in detail Please read The ContentHandler.characters() callback is missing data! http://www.saxproject.org/faq.html I was just reading above site. it is now very clear for me. Thanks kawai and I'm

[issue5037] unicode(x) for weakref.proxy objects invokes __str__ instead of __unicode__

2009-01-24 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: weakref.proxy needs to be fixed to delegate the unicode slot correctly. from weakref import proxy __unicode__ in dir(type(proxy(Exception))) False That predicate must return true in order for the delegation to do the right thing (this is

[issue4393] Portability fixes in longobject.c

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r68890, r68891, r68895 and r68896 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4393 ___

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-01-24 Thread Jason R. Coombs
New submission from Jason R. Coombs jar...@jaraco.com: When trying to create a sub-subclass of a ctypes.Structure, the behavior is not as expected. An executable example that describes the problem in detail and demonstrates the issue is available at http://paste.turbogears.org/paste/29555 and

[issue5025] test_kqueue failure on OS X

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in the trunk in r68897. Will merge to 2.6, 3.0 and 3.1. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5025

[issue3881] IDLE won't start in custom directory.

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Committed as r68893, r68894, r68898, r68901. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3881

[issue3105] Python 2.5.2 Windows Source Distribution missing Visual Studio 2005 ssl build files

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This patch is out of date; VS 2005 is no longer of interest. -- nosy: +loewis resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org

[issue2271] msi installs to the incorrect location (C drive)

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Fixed in r66305. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2271 ___

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Mark, the patch is fine, please apply. Great work! -- assignee: - mhammond resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4566

[issue4982] Running python 3 as Non-admin User requests the Runtime to terminate in an unusual way.

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Do you have PYTHONPATH set, by any chance? Python 3.0 shouldn't pick up c:\python25. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4982

[issue1672332] cPickle cannot unpickle subnormal floats on some machines

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in the trunk in r68903. If the buildbots are happy with the new tests, I'll port to 2.6, 3.0 and 3.1. -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue4908] adding a get_metadata in distutils

2009-01-24 Thread Ray
Ray rayjohnterr...@gmail.com added the comment: There wouldn't be an easy way to read the distutils setup.py info at all in 2.4? i suppose i could write something specific for our environment. On 1/24/09, Tarek Ziadé rep...@bugs.python.org wrote: Tarek Ziadé ziade.ta...@gmail.com added the

[issue5043] get_msvcr() returns None rather than []

2009-01-24 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton l...@lkcl.net: def get_msvcr(): Include the appropriate MSVC runtime library if Python was built with MSVC 7.0 or later. msc_pos = sys.version.find('MSC v.') if msc_pos != -1: msc_ver =

[issue5031] Thread.daemon docs

2009-01-24 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: Removed file: http://bugs.python.org/file12843/issue5031.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5031 ___

[issue5031] Thread.daemon docs

2009-01-24 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Then the patch I wrote before correcting it was more purist ;) I preferred the `daemon` = ``False`` wording as well. Here's a corrected patch. Added file: http://bugs.python.org/file12846/issue5031.patch

[issue5037] unicode(x) for weakref.proxy objects invokes __str__ instead of __unicode__

2009-01-24 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Here's a patch. -- keywords: +needs review, patch priority: - high Added file: http://bugs.python.org/file12847/weakref_unicode.patch ___ Python tracker rep...@bugs.python.org

[issue5044] name not found in generator in eval()

2009-01-24 Thread Frank Henigman
New submission from Frank Henigman fjhenig...@cgl.uwaterloo.ca: # works eval( sum( [ a[0]=='a' for j in 'a' ] ), {}, dict(a='a')) # take out the square brackets eval( sum( a[0]=='a' for j in 'a' ), {}, dict(a='a')) NameError: global name 'a' is not defined -- components:

[issue1529142] Allowing multiple instances of IDLE with sub-processes

2009-01-24 Thread Weeble
Weeble clockworksa...@gmail.com added the comment: I installed Ubuntu on a laptop at the beginning of January and have applied the patch I submitted above to IDLE. I've been using it regularly for the last few weeks and have had no problems with it. ___

[issue5043] get_msvcr() returns None rather than []

2009-01-24 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: My comment on this part of code is( from issue3871): +# FIXME: next code is from issue870382 +# MS C-runtime libraries never support backward compatibility. +# Linking to a different library without to specify correct

[issue1672332] cPickle cannot unpickle subnormal floats on some machines

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Hmm. After checking in this patch, the gentoo x86 trunk buildbot has a new failure in test_pickletools, with the following output: test_pickletools ** File

[issue4676] python3 closes + home keys

2009-01-24 Thread Weeble
Weeble clockworksa...@gmail.com added the comment: I have experienced similar problems in Python 2.6.1 on Windows, and found them to be due to Tk 8.5. I posted my findings here: http://mail.python.org/pipermail/idle-dev/2009-January/002738.html In summary, Tk 8.5 changed the name of the anchor

[issue5016] FileIO.seekable() can return False

2009-01-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Woops, I attached the wrong patch! Added file: http://bugs.python.org/file12848/fileio_seekable.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5016

[issue1672332] cPickle cannot unpickle subnormal floats on some machines

2009-01-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This is not a new failure but an erratic one, and caused by a weakness in pickle's handling of functions. See #3657. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue1672332] cPickle cannot unpickle subnormal floats on some machines

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks, Antoine! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1672332 ___ ___ Python-bugs-list

[issue3657] pickle can pickle the wrong function

2009-01-24 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3657 ___ ___

[issue2527] Pass a namespace to timeit

2009-01-24 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: This note is simply a reminder that Antoine's 'from __main__ import *' solution fails in python3. Also, resolution of this issue probably could incorporate Issue1397474. import timeit timeit.timeit('None','from __main__ import *')

[issue5044] name not found in generator in eval()

2009-01-24 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5044 ___ ___ Python-bugs-list

[issue4676] python3 closes + home keys

2009-01-24 Thread Weeble
Weeble clockworksa...@gmail.com added the comment: Another complication. On Windows, this line doesn't do what it claims: if (event.state 12) != 0 and event.keysym == Home: # state1==shift, state4==control, state8==alt return # Modifier-Home; fall back to class binding The comment

[issue3657] pickle can pickle the wrong function

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I just committed Tim's suggested change in r68906. This seemed a no- brainer, regardless of what should be done about pickle.whichmodule. One fewer sporadic buildbot failure sounds like a good thing to me. (I hadn't noticed the pickletools

[issue5045] imaplib should remove length of literal strings

2009-01-24 Thread Branden Moore
New submission from Branden Moore bmoore-pyt...@forkit.org: IMAP Literals are a tricky subject. Currently, if IMAP returns: * text text text {5}\r\n 12345more text imaplib will return 2 data items: [(text text text {5}, '12345'), more text] This forces users of imaplib to then parse out and

[issue5046] native win32 and wine mingw+msys build of python2.7

2009-01-24 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton l...@lkcl.net: this is an update of the mingw+msys port for native win32, with the aim of being both compiled and used under both wine-win32 and native-win32. it is not a cross-compile patch. it does not require -lwine. it does not require a

[issue5047] Remove Monterey support from configure.in

2009-01-24 Thread Skip Montanaro
New submission from Skip Montanaro s...@pobox.com: The attached patch removes vestiges of Monterey compiler support from configure.in. Apparently Monterey was some ill-conceived 64-bit SCO/IBM operating system which died in 2000. Can't see why we need to support it. Skip ===File

[issue5034] itertools.fixlen

2009-01-24 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am still leaning towards rejecting this one based on: * paucity of use cases * non-atomicity (it can be built-out of existing tools) * minimizing the number of tools in the toolkit * not convinced that padded tuple unpacking

[issue1672332] cPickle cannot unpickle subnormal floats on some machines

2009-01-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fix merged in r68907 (2.6), r68908 (3.1) and r68909 (3.0). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1672332

[issue4111] Add DTrace probes

2009-01-24 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111 ___ ___ Python-bugs-list

[issue5046] native win32 and wine mingw+msys build of python2.7

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Please don't post work in progress to this bugtracker. -- nosy: +loewis resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5046

[issue5047] Remove Monterey support from configure.in

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: You might want to take a look at r16962. It changed a few other things as well. Please do put patches into attachments, rather than including them in the message. -- nosy: +loewis ___ Python

[issue4753] Faster opcode dispatch on gcc

2009-01-24 Thread Jeffrey Yasskin
Jeffrey Yasskin jyass...@gmail.com added the comment: In the comment, you might mention both -fno-crossjumping and -fno-gcse. -fno-crossjumping's description looks like it ought to prevent combining computed gotos, but http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html says

[issue5047] Remove Monterey support from configure.in

2009-01-24 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Here's the original patch as an attachment. -- keywords: +patch Added file: http://bugs.python.org/file12850/configure.in.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5047

[issue5047] Remove Monterey support from configure.in

2009-01-24 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: And a diff for README. The other changes in r16962 seem to be bug fixes which, while exposed by the Monterey port, don't appear to be platform- dependent. Added file: http://bugs.python.org/file12851/README.diff

[issue5048] Extending itertools.combinations

2009-01-24 Thread Konrad
New submission from Konrad kon...@gmail.com: The function itertools.combinations might benefit from making the 'r' (length of the combinations) argument optionally a sequence. With that change one could call combinations(sequence, [2, 3]) in order to get all combinations of length 2 and 3. In

[issue5049] ctypes unwilling to allow pickling wide character array

2009-01-24 Thread Jason R. Coombs
New submission from Jason R. Coombs jar...@jaraco.com: Using Python 2.6.1, I'm unable to pickle a simple object with an array of wide characters. import ctypes, pickle class MyStruct(ctypes.Structure): _fields_ = [('name', ctypes.c_wchar*2)] s = MyStruct('DC') pickle.dumps(s) # raises

[issue5049] ctypes unwilling to allow pickling wide character

2009-01-24 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I just discovered that trying to pickle a structure with even just a c_wchar (not an array) also fails. -- title: ctypes unwilling to allow pickling wide character array - ctypes unwilling to allow pickling wide character

[issue5049] ctypes unwilling to allow pickling wide character

2009-01-24 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: -- nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5049 ___ ___ Python-bugs-list mailing

[issue5048] Extending itertools.combinations

2009-01-24 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Do you have compelling use cases? Is it worth what it takes to preserve the relation with permuations() and product() and the lexicographic orderings? Do we care the length of the output is no longer predictable by a simple

[issue5050] unicode(C) invokes C.__unicode__ when __unicode__ is defined

2009-01-24 Thread Yu-Jie Lin
New submission from Yu-Jie Lin livibet...@gmail.com: Run the following code class A: def __str__(self): return __str__ def __unicode__(self): return __unicode__ a = A() print str(a), unicode(a) print str(A), unicode(A) Results on Python 2.5.4 (r254:67916): __str__

[issue5050] unicode(C) invokes C.__unicode__ when __unicode__ is defined

2009-01-24 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: No further bugs will be fixed in Python 2.5, unless they are security bugs (which this is not). So closing it as won't fix. -- nosy: +loewis resolution: - wont fix status: open - closed ___

[issue5048] Extending itertools.combinations

2009-01-24 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: It would also be nice to have a __len__ method on both permutations and combinations. len(permutations(sequence)) could return the number of permutations using the formulas (e.g. n! for permutations) without generating all the possible

[issue5048] Extending itertools.combinations

2009-01-24 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Guido disallowed returning a len method on iterators. He expected bool(it) to be False. The recipes section of the itertools docs has code for combinations_with_replacement(). It was not included originally because it was