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

2011-03-02 Thread Georg Brandl
Georg Brandl 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

[issue11379] Remove "lightweight" from minidom description

2011-03-02 Thread Stefan Behnel
Stefan Behnel 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 to http://effbot.org/zone/

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

2011-03-02 Thread Abafei
New submission from Abafei : 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 True N

[issue11372] Remove xrange from argparse docs

2011-03-02 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. 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 _

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

2011-03-02 Thread Ray.Allen
Ray.Allen 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, ...), they should be ve

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

2011-03-02 Thread ulidtko
New submission from ulidtko : 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 process gots killed *

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Daniel Stutzbach
Daniel Stutzbach 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. -- ___ Pyth

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I meant "to *detect* leaked memory", of course. :-) -- ___ Python tracker ___ ___ Python-bugs-lis

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I'm not sure. What infrastructure do we have to leaked memory that was allocated with PyMem_MALLOC? -- ___ Python tracker ___ _

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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 ___

[issue11335] Memory leak after key function failure in sort

2011-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is there a way to test this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue9373] pulldom has low code coverage

2011-03-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: r88712 Thanks -- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed ___ Python tracker ___

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

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg 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 _

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

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor 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 subp

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

2011-03-02 Thread STINNER Victor
STINNER Victor 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: http://docs.python.org/py3k/library/subprocess.html#replacing-os-p

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Aaron Sherman
Aaron Sherman 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 that no one is g

[issue11379] Remove "lightweight" from minidom description

2011-03-02 Thread Martin v . Löwis
Martin v. Löwis 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 __

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

2011-03-02 Thread SilentGhost
Changes by SilentGhost : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

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

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

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

2011-03-02 Thread Wojciech Muła
Changes by Wojciech Muła : Removed file: http://bugs.python.org/file20948/test.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali 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 realized that.

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

2011-03-02 Thread Eric Smith
Eric Smith 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. -- nosy:

[issue11379] Remove "lightweight" from minidom description

2011-03-02 Thread Stefan Behnel
New submission from Stefan Behnel : 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 of the two. The first

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

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

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

2011-03-02 Thread Gregory P. Smith
Gregory P. Smith 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 in Solaris and re

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

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

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

2011-03-02 Thread Alessandro Forghieri
Alessandro Forghieri 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 (I am no pit

[issue10654] test_datetime fails on Python3.2 windows binary

2011-03-02 Thread Max
Max 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 __

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

2011-03-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 should consider anoth

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

2011-03-02 Thread Daniel Urban
Daniel Urban 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." (http://docs.python.org/dev/py3k/library/os.path#os.p

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

2011-03-02 Thread Alessandro Forghieri
Changes by Alessandro Forghieri : -- title: os.path.join when second starts with '/' (linux/unix) -> os.path.join when second argument starts with '/' (linux/unix) ___ Python tracker

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

2011-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > 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 pre

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

2011-03-02 Thread Alessandro Forghieri
New submission from Alessandro Forghieri : 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 respond to a

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

2011-03-02 Thread STINNER Victor
New submission from STINNER Victor : 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, win32pipe.popen() should work; on Window

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

2011-03-02 Thread s7v7nislands
Changes by s7v7nislands : Removed file: http://bugs.python.org/file20835/python27.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2011-03-02 Thread s7v7nislands
Changes by s7v7nislands : Removed file: http://bugs.python.org/file20834/py3k.patch ___ Python tracker ___ ___ Python-bugs-list mailing list U

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

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali 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, because in that c

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

2011-03-02 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Added file: http://bugs.python.org/file20980/py3k_closefrom.diff ___ Python tracker ___ ___ Python-bugs-l

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

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

[issue1559549] ImportError needs attributes for module and file name

2011-03-02 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : -- nosy: +gruszczy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue11376] Solaris/GCC/shared lib problem

2011-03-02 Thread Dave Abrahams
New submission from Dave Abrahams : 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 picking the correct

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

2011-03-02 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

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

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali 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 (256), and close e

[issue9313] distutils error on MSVC older than 8

2011-03-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: Éric, what forward porting exactly needs to be done? -- ___ Python tracker ___ ___ Python-bugs-list

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

2011-03-02 Thread Jérôme Radix
Changes by Jérôme Radix : -- nosy: +jerome.radix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

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

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

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

2011-03-02 Thread Alexandre Badez
Changes by Alexandre Badez : Removed file: http://bugs.python.org/file20977/patch.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

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

2011-03-02 Thread OJW
New submission from OJW : #!/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 communications go th

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

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

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

2011-03-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 ___ Pyth

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

2011-03-02 Thread Alexandre Badez
Changes by Alexandre Badez : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

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

2011-03-02 Thread Alexandre Badez
New submission from Alexandre Badez : 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: pkgutil.extend_path do no

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

2011-03-02 Thread anatoly techtonik
anatoly techtonik 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, but perhaps for Python

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

2011-03-02 Thread STINNER Victor
STINNER Victor 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 ___ Python tracker

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor 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 just nothing to do on Pytho

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

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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: normal -> high st

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

2011-03-02 Thread STINNER Victor
STINNER Victor 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 be closed. closefrom() is av

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali 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 he's using) h

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Charles-Francois Natali
Charles-Francois Natali 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 fast. > >

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor 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 shell. Nothing wrong here.

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor 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 the parent process). Benc

[issue11373] Fix 2 new typos in the docs

2011-03-02 Thread Boštjan Mejak
New submission from Boštjan Mejak : 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 objects that /.../." Fix thi

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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, the file descr

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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) 15.9370.0015

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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 - subprocess.popen: 5496.3 ms

[issue9276] pickle should support methods

2011-03-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 from line 20 to

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, your patch doesn't even apply on 3.x. That code doesn't exist anymore... -- ___ Python tracker ___

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor 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 4 (Hyperthreading, 2 fake co

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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 pipe was clos

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-03-02 Thread STINNER Victor
STINNER Victor 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 pipe was closed).

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Cool, thanks for all your advice. -- status: pending -> open ___ Python tracker ___ ___ Python-

[issue11372] Remove xrange from argparse docs

2011-03-02 Thread Ross Lagerwall
New submission from Ross Lagerwall : 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 severity: normal status:

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

2011-03-02 Thread John Szakmeister
John Szakmeister 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? -- __

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Éric Araujo
Éric Araujo 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

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński 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

[issue9100] test_sysconfig fails (test_user_similar)

2011-03-02 Thread Éric Araujo
Éric Araujo 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 _

[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 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

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Éric Araujo
Éric Araujo added the comment: Looks good to me. I assume you’re run the test suite. Can you run xgettext too to see if we get warnings or errors? (“xgettext getopt.py” should be enough) -- stage: -> commit review versions: +Python 3.3 ___ Python

[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 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: I understand your

[issue9276] pickle should support methods

2011-03-02 Thread Antoine Pitrou
Antoine Pitrou 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 does not find

[issue9276] pickle should support methods

2011-03-02 Thread Ram Rachum
Ram Rachum 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 = getattr(mod, name)

[issue8841] getopt errors should be specialized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Here it is: http://bugs.python.org/issue11371 -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue11371] Localization of error messages in getopt

2011-03-02 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : 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: normal severity: normal

[issue8841] getopt errors should be specialized

2011-03-02 Thread Éric Araujo
Éric Araujo 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 different error clas

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

2011-03-02 Thread John Szakmeister
New submission from John Szakmeister : 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 to ignore anything th

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

2011-03-02 Thread Vinay Sajip
Vinay Sajip 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

[issue8841] GetoptError strings should be localized

2011-03-02 Thread Filip Gruszczyński
Filip Gruszczyński 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 ___ Pytho

[issue11369] Add caching for the isEnabledFor() computation

2011-03-02 Thread Vinay Sajip
Vinay Sajip 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 ancestors looking for a