[issue11369] Add caching for the isEnabledFor() computation

2011-03-02 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Bill, Thanks for the suggestion and the patch. It's a good idea, though I wonder whether you found that the bulk of the time spent in isEnabledFor() was actually spent in getEffectiveLevel()? That's the one which loops through a logger's

[issue8841] GetoptError strings should be localized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a small patch. Could you advise me, how can I test it now? Or is it an issue, that doesn't require writing new tests? -- keywords: +patch Added file: http://bugs.python.org/file20970/8841.patch

[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-03-02 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Closing, as I said I would, since no feedback has been received for a week. -- components: +Library (Lib) -Extension Modules status: pending - closed ___ Python tracker rep...@bugs.python.org

[issue11370] Fix distutils to carry configure's LIBS through to extension modules.

2011-03-02 Thread John Szakmeister
New submission from John Szakmeister j...@szakmeister.net: This is a port of r301 from unladen swallow to the py3k-jit branch. On the Mac, there was an extra '-framework CoreFoundation' that was being passed in python3 (maybe it wasn't there in Python 2.x?). At any rate, I changed the logic

[issue8841] getopt errors should be specialized

2011-03-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I suggested subclassing to solve the more general problem of the caller being able to tell one getopt error from another, for which it is a pretty common solution. Now I see what you meant and understand your request. optparse has five

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
New submission from Filip Gruszczyński grusz...@gmail.com: In http://bugs.python.org/issue8841 Eric asked to open a new ticket about localisation of getopt error messages. I attach a patch. -- files: 8841.patch keywords: patch messages: 129865 nosy: eric.araujo, gruszczy priority:

[issue8841] getopt errors should be specialized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here it is: http://bugs.python.org/issue11371 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8841 ___

[issue9276] pickle should support methods

2011-03-02 Thread Ram Rachum
Ram Rachum cool...@cool-rr.com added the comment: Amaury: Your example succeeds on Linux but fails on Windows: $ python3.2 main.py CALLED Traceback (most recent call last): File C:\Python32\Lib\pickle.py, line 679, in save_global klass =

[issue9276] pickle should support methods

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Amaury: Your example succeeds on Linux but fails on Windows: $ python3.2 main.py I think the difference has to do with Python 3 vs. Python 2. In Python 3 unbound methods are not wrapped in a specific object, and so ForkingPickler

[issue10367] python setup.py sdist upload --show-response can fail with UnboundLocalError: local variable 'result' referenced before assignment

2011-03-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Sorry for overlooking this. The test is good, I could trigger the bug with it and then fix it with the patch. Would you mind adding the same test for upload_docs? The code was originally copied from upload, so we should test it too. Philip:

[issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module

2011-03-02 Thread Michal Nowikowski
Michal Nowikowski godf...@gmail.com added the comment: Improved the patch: - moved code example up, just below S_* functions list -- Added file: http://bugs.python.org/file20973/documented-os_chflags-flags-v2.diff ___ Python tracker

[issue9100] test_sysconfig fails (test_user_similar)

2011-03-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. What ./configure options did you use? I wonder if this is a duplicate of #11171 or #10086. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Yes, I have run ./python -m test -v test_getopt and it was ok. Running xgettext --from-code utf-8 getopt.py produces no output. -- ___ Python tracker rep...@bugs.python.org

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I will wait for any negative feedback from another core dev and then commit this. Thanks. -- assignee: - eric.araujo resolution: - accepted status: open - pending ___ Python tracker

[issue11370] Fix distutils to carry configure's LIBS through to extension modules.

2011-03-02 Thread John Szakmeister
John Szakmeister j...@szakmeister.net added the comment: Looks like this should've been done against the py3k branch instead. Looking at py3k, it's changed quite a bit since the last merge into py3k-jit. Perhaps there is a better way to do this under py3k? Or it's handled already?

[issue11372] Remove xrange from argparse docs

2011-03-02 Thread Ross Lagerwall
New submission from Ross Lagerwall rosslagerw...@gmail.com: As the title says, this patch replaces xrange with range for the 3.3 docs. -- assignee: docs@python components: Documentation files: doc.patch keywords: patch messages: 129876 nosy: docs@python, rosslagerwall priority: normal

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Cool, thanks for all your advice. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11371 ___

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess_errpipe_buffer.patch: Patch for 2.7 which improve by 30% the dummy benchmark (run /bin/false 10,000 times). It avoids the creation of the 1 MB buffer: start with a buffer of a single byte (just to check if there is data

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: subprocess_errpipe_buffer.patch: Patch for 2.7 which improve by 30% the dummy benchmark (run /bin/false 10,000 times). It avoids the creation of the 1 MB buffer: start with a buffer of a single byte (just to check if there is data or if the

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Quick benchmark: - fork(), execv(), waitpid(): 19081.1 ms - os.popen(): 25769.8 ms - subprocess.Popen(): 40025.8 ms - subprocess.Popen() patched: 26155.2 ms I tested Python 2.7 (debug build) on Linux (Debian Sid) with a Pentium

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Victor, your patch doesn't even apply on 3.x. That code doesn't exist anymore... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11314 ___

[issue9276] pickle should support methods

2011-03-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: OK, let's go back to the __namespace__ idea, then. A long time ago I had the idea that the ast compiler could remember the list of named blocks (classes, functions) with their line numbers; for example, the statement class C spans

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Benchmark under 3.x (without obsolete patch): - fork + execv + waitpid: 4794.4 ms - os.popen: 19792.9 ms - subprocess.popen: 10152.1 ms Benchmark under 2.x (without patch:) - fork + execv + waitpid: 4292.7 ms - os.popen: 12697.6 ms -

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a quick profile under 3.x: Time: 10178.0 ms 320812 function calls (320809 primitive calls) in 10.182 seconds Ordered by: internal time ncalls tottime percall cumtime percall filename:lineno(function) 1

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Interestingly, reducing from the max open file descriptors from 8192 (my default) to 512 halves the runtime and solves the regression: $ ulimit -n 512 $ ./python bench_subprocess.py pid: 31631 Time: 4903.8 ms So, even though implemented in C,

[issue11373] Fix 2 new typos in the docs

2011-03-02 Thread Boštjan Mejak
New submission from Boštjan Mejak bostjan.me...@gmail.com: Try to fix this in every Python documentation that you can. The typo was found here: http://docs.python.org/library/stdtypes.html#memoryview Create a memoryview that references obj. obj must support the buffer protocol. Builtin

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: pitrou Victor, your patch doesn't even apply on 3.x. pitrou That code doesn't exist anymore... subprocess.Popen() does still read errpipe_read, but using a buffer of 50,000 bytes instead of 1 MB (the traceback is not more send to

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: os.popen is 41% is slower than subprocess: I suppose that it is the usage of stdout=PIPE (creation of the pipe) which make it slower Oh no, it's because os.popen() calls subprocess.Popen() with shell=True: the overhead is the

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: pitrou I think your analysis is wrong. These mmap() calls are for pitrou anonymous memory, most likely they are emitted by the libc's pitrou malloc() to get some memory from the kernel. In other words pitrou they will be blazingly

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: So, even though implemented in C, the file descriptor closing logic is still quite costly! Yes, see this recent issue: http://bugs.python.org/issue11284 In the reporter's case, it's much worse, because FreeBSD (at least the version

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: As written by Charles-Francois Natali (msg129890), we can use closefrom(). Pseudo-code: find the biggest fd than that be kept open, call closefrom(highest+1), and then use close() (os.closerange) for fd in 0..highest that have to

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch is wrong, as explained by Charles-François. If someone wants subprocess to use closefrom(), a patch is required :) But I think at least a mention in the documentation is warranted. -- nosy: +gregory.p.smith, pitrou priority:

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Benchmark on subprocess with a less trivial example. Run 100x python -c pass: 8.63 sec without my patch, 8.53 sec with my patch = only 1% faster, so the patch is just useless on a real world example. Finally, I think that there is

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Benchmark extracted from #11314, Python 3.2 on Linux: subprocess(/bin/false, close_fds=True) is 22% slower than subprocess(/bin/false, close_fds=False). -- stage: - patch review ___

[issue11368] xml.etree.ElementTree.Element should have a reference to parent

2011-03-02 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: That's not a good reason to close report. Such limitations of xml.etree.ElementTree should be at least documented properlt. And even documented it is still a valid feature request for standard library. Not for current implementation,

[issue11374] pkgutil.extend_path do not recognize py{c,o} file

2011-03-02 Thread Alexandre Badez
New submission from Alexandre Badez alexandre.ba...@gmail.com: extend_path only test if init.py files exist, but it should also test init.pyc and/or init.pyo. -- components: Library (Lib) messages: 129896 nosy: Alexandre.Badez priority: normal severity: normal status: open title:

[issue11374] pkgutil.extend_path do not recognize py{c,o} file

2011-03-02 Thread Alexandre Badez
Changes by Alexandre Badez alexandre.ba...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11374 ___ ___

[issue11368] xml.etree.ElementTree.Element should have a reference to parent

2011-03-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Anatoly, do you find the suggestions in http://effbot.org/zone/element.htm#accessing-parents useful to you? If so, this paragraph could be copied into the documentation. -- nosy: +amaury.forgeotdarc

[issue11374] pkgutil.extend_path do not recognize py{c,o} file

2011-03-02 Thread Alexandre Badez
Alexandre Badez alexandre.ba...@gmail.com added the comment: I've made a simple patch. -- keywords: +patch Added file: http://bugs.python.org/file20977/patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11374

[issue11375] urllib2 over SOCKS doesn't use proxy for DNS

2011-03-02 Thread OJW
New submission from OJW owh...@yahoo.com: #!/usr/bin/python import socks import socket socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, 127.0.0.1, 9050, True) socket.socket = socks.socksocket import urllib2 print urllib2.urlopen(http://example.com/;).read() Expected result: all network

[issue11374] pkgutil.extend_path do not recognize py{c,o} file

2011-03-02 Thread Alexandre Badez
Changes by Alexandre Badez alexandre.ba...@gmail.com: Removed file: http://bugs.python.org/file20977/patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11374 ___

[issue11374] pkgutil.extend_path do not recognize py{c,o} file

2011-03-02 Thread Alexandre Badez
Alexandre Badez alexandre.ba...@gmail.com added the comment: A little change in the patch -- Added file: http://bugs.python.org/file20978/patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11374

[issue11375] urllib2 over SOCKS doesn't use proxy for DNS

2011-03-02 Thread Jérôme Radix
Changes by Jérôme Radix jerome.ra...@gmail.com: -- nosy: +jerome.radix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11375 ___ ___

[issue9313] distutils error on MSVC older than 8

2011-03-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Éric, what forward porting exactly needs to be done? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9313 ___

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Attached is a patch adding os.closefrom. If closefrom(2) is available, it's used. Otherwise, two options: - if sysconf and _SC_OPEN_MAX are defined, we close each file descriptor up to _SC_OPEN_MAX - if not, we choose a default value

[issue11375] urllib2 over SOCKS doesn't use proxy for DNS

2011-03-02 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11375 ___

[issue11376] Solaris/GCC/shared lib problem

2011-03-02 Thread Dave Abrahams
New submission from Dave Abrahams d...@boostpro.com: http://twistedmatrix.com/trac/ticket/4916#comment:2 suggests that maybe there's a bug in distutils. Something in the build process for twisted is deciding that I have Sun CC installed instead of letting pycc, which can handle the job of

[issue1559549] ImportError needs attributes for module and file name

2011-03-02 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: -- nosy: +gruszczy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Charles-Francois Natali
Changes by Charles-Francois Natali neolo...@free.fr: Removed file: http://bugs.python.org/file20979/py3k_closefrom.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284 ___

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Charles-Francois Natali
Changes by Charles-Francois Natali neolo...@free.fr: Added file: http://bugs.python.org/file20980/py3k_closefrom.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284 ___

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Attached is a new version falling back to /proc/self/fd when closefrom(2) is not available (on Unix), working on Linux. It's indeed much faster than the current approach. Note that it's only used if _posixsubprocess is not available,

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread s7v7nislands
Changes by s7v7nislands s7v7nisla...@gmail.com: Removed file: http://bugs.python.org/file20834/py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284 ___

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread s7v7nislands
Changes by s7v7nislands s7v7nisla...@gmail.com: Removed file: http://bugs.python.org/file20835/python27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284 ___

[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Extract of the documentation: 15.14.3.1. Win95/98 specific platform.popen(cmd, mode='r', bufsize=None) Portable popen() interface. Find a working popen implementation preferring win32pipe.popen(). On Windows NT,

[issue11378] os.path.join when second starts with '/' (linux/unix)

2011-03-02 Thread Alessandro Forghieri
New submission from Alessandro Forghieri a...@orion.it: Observed behavior: os.path.join('/foo/bar', '/baz') '/baz' Expected behavior: should return '/foo/bar/baz' or (suboptimally) raise an exception. Why: Observed beahvior violates the minimal surprise principle and does not appear to

[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: New submission from STINNER Victor victor.stin...@haypocalc.com: Extract of the documentation: 15.14.3.1. Win95/98 specific platform.popen(cmd, mode='r', bufsize=None) Portable popen() interface. Find

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Alessandro Forghieri
Changes by Alessandro Forghieri a...@orion.it: -- title: os.path.join when second starts with '/' (linux/unix) - os.path.join when second argument starts with '/' (linux/unix) ___ Python tracker rep...@bugs.python.org

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: It does exactly what is documented: If any component is an absolute path, all previous components (on Windows, including the previous drive letter, if there was one) are thrown away, and joining continues.

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: And the current behaviour is useful; for example, the absolute path of a file name can be computed with os.path.join(os.getcwd(), filename). This works with both absolute and relative paths. os.path.join() won't change; you probably

[issue10654] test_datetime fails on Python3.2 windows binary

2011-03-02 Thread Max
Max m...@alleged.net added the comment: This is still occurring with the release version of Python 3.2, installed from the 32-bit MSI, on Windows XP. -- nosy: +max-alleged ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10654

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Alessandro Forghieri
Alessandro Forghieri a...@orion.it added the comment: Documented it is, and change it may not, but I am still unconvinced. Anything that joins should (IMHO) preserve the leading stuff - this one throws it away - sometimes. Also I do believe a number of other languages take a different stance

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Charles-Francois Natali
Changes by Charles-Francois Natali neolo...@free.fr: Removed file: http://bugs.python.org/file20980/py3k_closefrom.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284 ___

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: There is no OS API call to provide a *safe* way to get a list of all open file descriptors as part of POSIX in general that can be called after the fork() and before the exec(). It must be async signal safe. The closefrom() call available

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: According to http://www.unix.com/man-page/All/3c/closefrom/ closefrom() is not async-signal-safe. :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284

[issue11379] Remove lightweight from minidom description

2011-03-02 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: http://docs.python.org/library/xml.dom.minidom.html presents MiniDOM as a Lightweight DOM implementation. The word lightweight is easily misunderstood as meaning efficient or memory friendly. MiniDOM is well known to be neither

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I appreciate that you're unconvinced of its usefulness, but you can be assured that some of us do find it a useful and desirable behavior. And Python isn't the only system that works this way, emacs does the same thing when you enter filenames.

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Your posix_closefrom() implementation as written today is not safe to call between fork() and exec() due to the opendir/readdir implementation. It can and will hang processes at unexpected times. Yeah, I remove the patch when I

[issue11354] argparse: nargs could accept range of options count

2011-03-02 Thread Wojciech Muła
Changes by Wojciech Muła wojciech_m...@poczta.onet.pl: Removed file: http://bugs.python.org/file20948/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11354 ___

[issue11354] argparse: nargs could accept range of options count

2011-03-02 Thread Wojciech Muła
Wojciech Muła wojciech_m...@poczta.onet.pl added the comment: Daniel, thanks for note, fixed. -- Added file: http://bugs.python.org/file20981/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11354

[issue11354] argparse: nargs could accept range of options count

2011-03-02 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11354 ___ ___ Python-bugs-list mailing

[issue11379] Remove lightweight from minidom description

2011-03-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: -1. The description is factually correct - minidom *does* have a lower footprint than other Python DOM implementations (such as 4DOM). -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Aaron Sherman
Aaron Sherman a...@ajs.com added the comment: I think it's still safe to say that high performance applications which need to create many hundreds or thousands of children (e.g. large monitoring systems) will still need another solution that isn't subprocess. That being said, you're right

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That being said, I can't really submit a full-blown monitoring system against this bug, Perhaps you can take a look at Shinken, it is a Nagios-lookalike written in Python. -- ___ Python tracker

[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: os.popen() is deprecated since Python 2.6 (Use the subprocess module.) and it is no more documented in Python 3. The following documentation explains how to replace os.popen() by subprocess:

[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: os.popen() is deprecated since Python 2.6 (Use the subprocess module.) and it is no more documented in Python 3. The following documentation explains

[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: BTW: The _popen class can be removed as well, if the function is replaced with os.popen() or the subprocess module Popen(). -- ___ Python tracker rep...@bugs.python.org

[issue9373] pulldom has low code coverage

2011-03-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: r88712 Thanks -- nosy: +benjamin.peterson resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9373

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Is there a way to test this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11335 ___

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Valgrind perhaps? If the keys container was a list or tuple it would simply take a refleak run of the test suite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11335

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: I'm not sure. What infrastructure do we have to leaked memory that was allocated with PyMem_MALLOC? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11335

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: I meant to *detect* leaked memory, of course. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11335 ___

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: I played around with this a little. That code path doesn't appear to be exercised during the existing unit tests. I'll add a test so the leak at least shows up when the tests are run under valgrind. --

[issue11380] close failed in file object destructor when Broken pipe happens on stdout

2011-03-02 Thread ulidtko
New submission from ulidtko ulid...@gmail.com: The following script fails: from time import sleep try: while True: sleep(0.1) print blah except KeyboardInterrupt: pass when being launched with redirections like this: $ python test.py | tee /dev/null and the tee

[issue10829] PyUnicode_FromFormatV() bugs with % and %% format strings

2011-03-02 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Hi, haypo, would you mind modify your newly added parse_format_flags() function so that it can diff the precision value of '%.0s' and '%s'(Currently both of them return precision as 0)? Because if used with string formatters(%s, %R, %S, %A, ...),

[issue11372] Remove xrange from argparse docs

2011-03-02 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. fdr...@acm.org added the comment: Committed for Python 3.3.0: r88717 Committed for Python 3.2.1: r88718 -- assignee: docs@python - fdrake nosy: +fdrake resolution: - accepted stage: - committed/rejected status: open - closed versions: +Python 3.2

[issue11381] pretending the not operator is a function behaves surprisingly

2011-03-02 Thread Abafei
New submission from Abafei aba...@gmail.com: I'm not sure if this is a bug per se, since I don't think pretending operators are callable is in the docs, but: pretending an operator (at least the not operator) is callable, like so: not(True) can be surprising: (not 1) == 9 False not(1) == 9

[issue11379] Remove lightweight from minidom description

2011-03-02 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Well, I'm not aware of many people who use 4DOM these days, and if that's what it's meant to refer to, maybe that should be made more obvious, because it currently is not at all. Even cDomlette uses only half of the memory according

[issue11381] pretending the not operator is a function behaves surprisingly

2011-03-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I don't think this is wise, or necessary. I'm not sure why you would treat an operator as callable; the tutorial hopefully doesn't tell you such things. -- nosy: +georg.brandl resolution: - rejected status: open - closed