[issue6655] etree iterative find[text]

2009-08-05 Thread Dj Gilcrease
Dj Gilcrease added the comment: second patch file -- Added file: http://bugs.python.org/file14664/ElementPath.py.patch ___ Python tracker ___

[issue6655] etree iterative find[text]

2009-08-05 Thread Dj Gilcrease
New submission from Dj Gilcrease : I recently converted a project from using a custom implementation of xml.dom.minidom to using EelemntTree that comes with python2.5+ and found myself wishing for a find(tag_or_path) method that would do so iteratively instead of just on the current elements

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +alexandre.vassalotti stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue6064] Add "daemon" argument to threading.Thread constructor

2009-08-05 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue4660] multiprocessing.JoinableQueue task_done() issue

2009-08-05 Thread Jesse Noller
Jesse Noller added the comment: I used the protected JoinableQueue put method suggested by Brian. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue4660] multiprocessing.JoinableQueue task_done() issue

2009-08-05 Thread Jesse Noller
Jesse Noller added the comment: Fix checked into python trunk with r74326, 26 maint w/ r74327 -- ___ Python tracker ___ ___ Python-bug

[issue6600] MemoryError in AiX 64-bit - PyMem_MALLOC fails in open/fdopen

2009-08-05 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- title: MemoryError in AiX 64-bit build - PyMem_MALLOC failed -> MemoryError in AiX 64-bit - PyMem_MALLOC fails in open/fdopen ___ Python tracker __

[issue6600] MemoryError in AiX 64-bit build - PyMem_MALLOC failed

2009-08-05 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: It does appear that this problem occurs wherever `strlen` is used .. and given that strlen is a macro on AIX, I suspect the problem is with the macro definition itself. I will see if wrapping the arguments to PyMem_MALLOC in parenthesis would help. And/o

[issue6600] MemoryError in AiX 64-bit build - PyMem_MALLOC failed

2009-08-05 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Update: posixmodule.c too has the same problem. Attaching similar patch for this: --- python/Modules/posixmodule.c.orig 2009-08-05 09:47:07.0 -0700 +++ python/Modules/posixmodule.c2009-08-05 09:48:46.0 -0700 @@ -6451,7 +6451,7 @

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

2009-08-05 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: I suppose multiprocessing invokes `os.random` somewhere. And os.random fails on AIX for obvious reasons: >>> os.urandom(10) Traceback (most recent call last): File "", line 1, in File "/tmp/srid/ActivePythonEE-2.6.2.3-aix-powerpc64/i/lib/python2.6/ os

[issue6045] Fix dbm interfaces

2009-08-05 Thread Christopher Lee
Christopher Lee added the comment: I suspect that for most users, shelve is the main way they will access the dbm.* interfaces. Based on that, the dict methods that are really needed on dbm.* objects are just: __iter__, __len__, __getitem__, __setitem__, __delitem__, __contains__, has_key, and

[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2009-08-05 Thread Brett Cannon
Brett Cannon added the comment: try: raise Exception("I should not be seen") except Exception, exc: pass print exc -- ___ Python tracker ___

[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2009-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Brett, could you provide an example of "an exception bound to a variable"? -- nosy: +alexandre.vassalotti priority: critical -> normal stage: -> test needed ___ Python tracker

[issue5736] Add the iterator protocol to dbm modules

2009-08-05 Thread Christopher Lee
Christopher Lee added the comment: Another reason this issue is really important, is that the lack of a consistent iter() interface for dbm.* makes shelve iteration not scalable; i.e. trying to iterate on a Shelf will run self.dict.keys() to load the entire index into memory. This seems contrar

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- dependencies: +Backport set literals ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue2334] Backport set comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Backport set and dict comprehensions ___ Python tracker ___

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here is a patch to backport dict and set comprehensions to the trunk. The patch preserves the Python 3.x's syntax and semantics of the feature. Although this makes dict and set comprehensions is inconsistent with list comprehension, I believe this is reas

[issue6654] Add "path" to the xmrlpc dispatcher method

2009-08-05 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : I've created http://codereview.appspot.com/100046 on Rietveld: by passing the "path" component of the xmlrpc request to the dispatch method, it becomes possible to dispatch differently according to this. This patch provides that addition. Additiona

[issue6633] No handlers could be found for logger

2009-08-05 Thread James
James added the comment: very well, i didn't notice the http://docs.python.org/library/logging.html#configuring-logging-for-a-library and i thank you for your time and efforts! cheers, _J -- ___ Python tracker ___

[issue6605] smtplib.SMTP.sendmail() rejected after quit(), connect() sequence, no HELO

2009-08-05 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> duplicate status: open -> closed superseder: -> smtplib doesn't clear helo/ehlo flags on quit ___ Python tracker ___

[issue6653] Potential memory leak in multiprocessing

2009-08-05 Thread Jesse Noller
Jesse Noller added the comment: > In the future please use the bug tracker to file and track bugs with, > so things are not as lossy. Ok, sorry :) Also see Piet's comment here. He has a valid case against sys.exit in some cases. Thus it appears that both ways of shutting down child proces

[issue6653] Potential memory leak in multiprocessing

2009-08-05 Thread Jesse Noller
Jesse Noller added the comment: > Calling os.exit in a child process may be dangerous. It can cause > unflushed buffers to be flushed twice: once in the parent and once in > the child. I assume you mean sys.exit. If this is the case, multiprocessing needs a mechanism to chose between os._ex

[issue6653] Potential memory leak in multiprocessing

2009-08-05 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue6653] Potential memory leak in multiprocessing

2009-08-05 Thread Jesse Noller
Jesse Noller added the comment: Additional comments from Sturla: Hello Jesse, Yes there is a bug in multiprocessing. Diagnosis: - Processes created by multiprocessing (mp.Process or mp.Pool) exit in a way that prevents the Python interpreter from running deallocation code for all extension

[issue6653] Potential memory leak in multiprocessing

2009-08-05 Thread Jesse Noller
New submission from Jesse Noller : I have example code to show this. It creates a system-wide memory leak on Linux/Unix (present until the next reboot), unless the last statement in the target of mp.Process ensures a manual clean up of the globals. The problem is line 353 in multiprocessing/fo

[issue6652] missing cmath functions

2009-08-05 Thread Georg Brandl
Georg Brandl added the comment: These functions are new in Python 2.6; they do not appear in the Python 2.5 docs. -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue6652] missing cmath functions

2009-08-05 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : The online documentation describes functions cmath.phase and cmath.polar, but when I try to import these, I get "cannot import name" errors. -- assignee: georg.brandl components: Documentation messages: 91330 nosy: georg.brandl, pfeld...@verizon.n

[issue6633] No handlers could be found for logger

2009-08-05 Thread Vinay Sajip
Vinay Sajip added the comment: 1) It's not appropriate to document NullHandler at the point you describe, as that's the API for Handlers. However, it is documented at http://docs.python.org/library/logging.html#configuring-logging-for-a-library I will check that NullHandler is added to documen

[issue6594] json C serializer performance tied to structure depth on some systems

2009-08-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Are you sure that recursion depth is the issue? Have you tried the same number and kind of objects listed serially (unnested)? This would help rule-out memory allocation issues and would instead confirm that it has something to do with the C stack. It woul

[issue6651] Py3k's posixpath.relpath not compatible with ntpath.relpath

2009-08-05 Thread Erick Tryzelaar
New submission from Erick Tryzelaar : It looks like Python 3.x's relpath isn't compatible between posixpath and ntpath. In posixpath.relpath, the start keyword defaults to None, but ntpath.relpath, the start keyword defaults to curdir. Interestingly enough, 2.6 and 2.7 have a different implement

[issue6594] json C serializer performance tied to structure depth on some systems

2009-08-05 Thread Shawn
Shawn added the comment: As I mentioned, there's also noticeable performance penalties on recent SPARC systems, such as Niagra T1000, T2000, etc. The degradation is just less obvious (a 10-15 second penalty instead of a 20 or 30 second penalty). While x86 enjoys no penalty at all (in my testin

[issue6603] Compilation error if configuref --with-computed-gotos

2009-08-05 Thread Artur Frysiak
Artur Frysiak added the comment: reproduced on fresh checkout from http://svn.python.org/projects/python/branches/py3k (rev. 74321) $ gcc --version|head -n 1 gcc (PLD-Linux) 4.4.1 20090724 (release) -- ___ Python tracker

[issue6650] sre_parse contains a confusing generic error message

2009-08-05 Thread Torne Wuff
New submission from Torne Wuff : sre_parse raises an exception with the message "syntax error" - very generic and confusing - in the case where something that looks like a lookbehind assertion is invalid. >>> import re >>> re.match('(?.*)', 'foo') Traceback (most recent call last): File "", li

[issue2710] error: (10035, 'The socket operation could not complete without blocking')

2009-08-05 Thread Guilherme Polo
Guilherme Polo added the comment: I just tried writing tests for it, but I don't know idlelib/rpc.py enough yet. You can see this first attempt at: http://svn.python.org/view?view=rev&revision=74320 I started trying to test rpc.RPCClient together with run.main but it seemed too high level. Then

[issue6649] idlelib/rpc.py missing exit status on exithook

2009-08-05 Thread Guilherme Polo
New submission from Guilherme Polo : SocketIO.exithook on idlelib/rpc.py is missing the exit status, this is a minor issue since both client and server used on IDLE override this method to do something else. -- components: IDLE files: missing_exitstatus.diff keywords: patch messages: 913

[issue6648] codecs documentation does not mention surrogateescape

2009-08-05 Thread Nikolaus Rath
New submission from Nikolaus Rath : On http://docs.python.org/3.1/library/codecs.html it says that Possible values for errors are 'strict' (raise an exception in case of an encoding error), 'replace' (replace malformed data with a suitable replacement marker, such as '?'), 'ignore' (ignore

[issue6629] seek doesn't properly handle file buffer, leads to silent data corruption

2009-08-05 Thread Karoly Lorentey
Karoly Lorentey added the comment: The patch does fix my issue, thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2009-08-05 Thread Jesse Noller
Jesse Noller added the comment: Without access to an AIX machine, and even with it (I'm not an AIX guy by any stretch) it's going to be virtually impossible for me to fix this. A patch would be appreciated. -- ___ Python tracker

[issue6647] warnings.catch_warnings is not thread-safe

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Any function whose purpose is to mutate global (non thread-local) state is inherently "thread-unsafe". The only reasonable possibility is to document it as such. -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl, pitrou _

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-08-05 Thread Graham Dumpleton
Graham Dumpleton added the comment: Python should be as robust as possible and thus should be fixed, but I am happy with using the workaround so if this is more a question of what priority to mark this, I wouldn't see it as being urgent. -- ___ Pyt

[issue6629] seek doesn't properly handle file buffer, leads to silent data corruption

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an initial patch. Could you try it on your workload? -- keywords: +patch Added file: http://bugs.python.org/file14657/issue6629.patch ___ Python tracker ___

[issue6625] UnicodeEncodeError on pydoc's CLI

2009-08-05 Thread Christoph Burgmer
Christoph Burgmer added the comment: Here is a diff for test/test_pydoc.py (against Python2.6) which though doesn't trigger due to how Python handles output encoding. This test here will pass, but pydoc will still fail: $ pydoc test/pydoc_mod.py > /dev/null Traceback (most recent call last):

[issue1436346] yday in datetime module

2009-08-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Hmm, looks like there's a bug in roundup's email interface... the code snippet should have read: >>> from mx.DateTime import * >>> today().day_of_year 217 >>> Date(2009, 1, 1) + (217 - 1) -- ___ Python tracker

[issue1436346] yday in datetime module

2009-08-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Some comments: > - since there is already a weekday() method, the new method should be > called yearday() rather than yday() > - ditto for fromyday(): fromyearday() would be better > - Module

[issue1524938] PEP MemoryError with a lot of available memory gc not called

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure what we should do anyway. Your program will first swap out and thrash before the MemoryError is raised. Invoking the GC when memory allocation fails would avoid the MemoryError, but not the massive slowdown due to swapping. --

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Graham, is the workaround ok for you or do you think this is something Python itself should handle? -- nosy: +pitrou ___ Python tracker ___

[issue4997] xml.sax.saxutils.XMLGenerator should write to io.RawIOBase.

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: You shouldn't remove the defaulting behaviour for `out`, but use `sys.stdout.buffer` instead. Bonus points if you add a test so that this kind of bug doesn't go unnoticed again. PS: it's ironic that the default encoding here is iso-8859-1. This piece of code i

[issue1436346] yday in datetime module

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some comments: - since there is already a weekday() method, the new method should be called yearday() rather than yday() - ditto for fromyday(): fromyearday() would be better - Modules/datetimemodule.c should only be indented with tabs, but your patch indents it

[issue6594] json C serializer performance tied to structure depth on some systems

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure there's anything we should do about this. Some architectures are unreasonably slow at some things, and the old SPARC implementations are a niche nowadays. I suppose you may witness the same kinds of slowdowns if you use cPickle rather than json. (I

[issue6600] MemoryError in AiX 64-bit build - PyMem_MALLOC failed

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: If your patch really fixes the issue, it is probably a compiler problem. Does IBM have a user group or support line to which you can take this? -- nosy: +pitrou ___ Python tracker

[issue6603] Compilation error if configuref --with-computed-gotos

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't reproduce here (using gcc 4.3.2). Have you tried `make distclean`? Is it a fresh checkout? -- nosy: +pitrou ___ Python tracker ___ _

[issue5737] add Solaris errnos

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Martin, what do you think? -- nosy: +loewis, pitrou ___ Python tracker ___ ___ Python-bugs-list mail

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

2009-08-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> jnoller nosy: +jnoller priority: -> normal stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker __

[issue6632] Include more fullwidth chars in the decimal codec

2009-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: On the specific point of: > 2.1 some languages/alphabets use other chars (e.g. a comma or other > symbols) instead of the decimal point. I think it's not the job of the float() constructor to support it. Depending on the country, the comma has differen