[issue12263] punycode codec ignores the error handler argument

2011-06-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What's the point of disallowing the replace error handler? That's a slightly incompatible change, isn't it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12263

[issue12365] URLopener should support context manager protocol

2011-06-21 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: I forgot completely, but in Python3, Issue5418 had already added support to addinfourl. It is now possible to write code like import urllib.request with urllib.request.urlopen('http://www.python.org') as req: res = req.read() But

[issue12263] punycode codec ignores the error handler argument

2011-06-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I forgot to give a little bit more details. b'abc\xff-'.decode('punycode', 'ignore') and b'abc\xff-'.decode('punycode', 'replace') raise a UnicodeDecodeError: the error handler is just useless (ignored) here. With my patch,

[issue12352] multiprocessing.Value() hangs

2011-06-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The obvious solution is to use a recursive lock instead. Note that it's not really a solution, just a workaround to avoid deadlocks, become this might lead to a corruption if free is called while the heap is in an inconsistent state.

[issue12352] multiprocessing.Value() hangs

2011-06-21 Thread greg.ath
greg.ath gathan...@gmail.com added the comment: Hi, I also wonder about the performance cost of a recursive lock. I am still unable to reproduce the bug in a simple script. Looking closely to the gdb stack, there is that frame: Frame 0x13be190, for file

[issue12352] multiprocessing.Value() hangs

2011-06-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Looking closely to the gdb stack, there is that frame: Yeah, but it calls _free, which runs unlocked. That's not the problem. I am still unable to reproduce the bug in a simple script. Try with this one: import

[issue12379] build outside source fail in head

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: In which file there's an error? Could you elaborate a bit? -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12379 ___

[issue12296] Minor clarification in devguide

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: New semantics may also be something else than new classes or functions. New optional function arguments exposing new functionality, for example. -- nosy: +petri.lehtinen ___ Python tracker

[issue12352] multiprocessing.Value() hangs

2011-06-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I also wonder about the performance cost of a recursive lock. An alternative is to disable the garbage collector in malloc(): def malloc(self, size): ... enabled = gc.isenabled() if enabled:

[issue11909] Doctest sees directives in strings when it should only see them in comments

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The patch looks good to me. It passes the old doctests tests and adds a new test case for what it's fixing. -- nosy: +petri.lehtinen, tim_one ___ Python tracker rep...@bugs.python.org

[issue11869] Include information about the bug tracker Rietveld code review tool

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11869 ___ ___ Python-bugs-list

[issue11708] argparse: suggestion for formatting optional positional args

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11708 ___ ___ Python-bugs-list

[issue11708] argparse: suggestion for formatting optional positional args

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11708 ___ ___ Python-bugs-list mailing

[issue12382] [msilib] Ambiguous exception message when trying to open a non existing MSI database

2011-06-21 Thread Robin Jarry
New submission from Robin Jarry diabete...@gmail.com: When trying to open a non existing MSI database, an obscure unknown error 6e is raised. Could it be possible to get a more explicit message such as File not found or whatever ? Thanks :) Here is a example:

[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2011-06-21 Thread Robin Jarry
Robin Jarry diabete...@gmail.com added the comment: changed the headline of the defect for something more meaningful :) -- title: [msilib] Ambiguous exception message when trying to open a non existing MSI database - [msilib] Obscure exception message when trying to open a

[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2011-06-21 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- nosy: +markmcmahon, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12382 ___ ___

[issue11695] Improve argparse usage/help customization

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11695 ___ ___ Python-bugs-list

[issue11694] xdrlib raises ConversionError in inconsistent way

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: This seems like a bug worth fixing. The ConversionError exception has been documented, an there's an example in the docs that suggest that at least all packing fails with a ConversionError. -- nosy: +petri.lehtinen

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: What's the use case? I'm inclined to reject this as not needed. -- nosy: +r.david.murray type: behavior - feature request versions: +Python 3.3 -Python 2.7, Python 3.1 ___ Python tracker

[issue12381] bytearray methods count, find, index don't support None as in slice notation

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: As Raymond said in another issue, someone should fix this once and for all by factoring this check out into a reusable method and making sure it is used everywhere. -- keywords: +easy nosy: +r.david.murray versions: +Python 3.2,

[issue12381] bytearray methods count, find, index don't support None as in slice notation

2011-06-21 Thread Xuanji Li
Changes by Xuanji Li xua...@gmail.com: -- nosy: +xuanji ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12381 ___ ___ Python-bugs-list mailing list

[issue11869] Include information about the bug tracker Rietveld code review tool

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Heh. You are assuming we know how it should be used :) It's pretty new yet, so I don't think we've figured that out. But at at least how it works should be mentioned in the devguide. -- nosy: +r.david.murray

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread Thomas Wouters
New submission from Thomas Wouters tho...@python.org: The addition of the _posixsubprocess module in 3.2 introduced a change of behaviour when passing an empty dict (or other false value besides None) as env: python3.1 -c 'import subprocess; print(subprocess.Popen([env], env={},

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset b5963fceddad by Victor Stinner in branch '3.2': Close #12383: Fix subprocess module with env={}: don't copy the environment http://hg.python.org/cpython/rev/b5963fceddad New changeset 10ecf8576eb2 by Victor Stinner in branch

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The addition of the _posixsubprocess module in 3.2 introduced a change of behaviour when passing an empty dict (or other false value besides None) as env: ... This bug was introduced by the commit (768722b2ae0a) introducing

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Thanks for the fix, I added an unit test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12383 ___

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The test appears to be failing on the buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.2/builds/370 -- nosy: +r.david.murray status: closed - open ___

[issue10403] Use member consistently

2011-06-21 Thread Adam Woodbeck
Changes by Adam Woodbeck adam.woodb...@gmail.com: -- nosy: +adam.woodbeck ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10403 ___ ___

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: That failure is likely due to the environment being empty causing the subprocess to be unable to run. Notice this error message further up: test_empty_env (test.test_subprocess.ContextManagerTests) ...

[issue12381] bytearray methods count, find, index don't support None as in slice notation

2011-06-21 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12381 ___ ___ Python-bugs-list

[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error

2011-06-21 Thread Catalin Iacob
Changes by Catalin Iacob iacobcata...@gmail.com: -- nosy: +catalin.iacob ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12378 ___ ___

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The test still fails on FreeBSD 7.2, Tiger and Debian parallel: == FAIL: test_siginterrupt_on (test.test_signal.SiginterruptTest)

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: On Mac OS X, the failure is different: == FAIL: test_empty_env (test.test_subprocess.ProcessTestCase)

[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error

2011-06-21 Thread Catalin Iacob
Catalin Iacob iacobcata...@gmail.com added the comment: Just a note after running Joe's example. smtplib is affected by this issue in 3.x, but the example produces different results in 3.x: smtpd doesn't keep the connection open due to UnicodeDecodeError when the data from the ssl handshake

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Maybe test_empty_env() should pass LD_LIBRARY_PATH to child process. -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12383

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 8d46e84cd812 by Victor Stinner in branch '3.2': Issue #12383: skip test_empty_env() if compiled is compiled in shared mode http://hg.python.org/cpython/rev/8d46e84cd812 -- ___ Python

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset d1d5a7392e39 by Victor Stinner in branch 'default': (merge 3.2) Issue #12383: skip test_empty_env() if compiled is compiled in http://hg.python.org/cpython/rev/d1d5a7392e39 -- ___ Python

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2011-06-21 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: The basic problem: in 2.6, a namedtuple was introduced to difflib from collections import namedtuple as _namedtuple Match = _namedtuple('Match', 'a b size') and used for the return values of SeqeunceMatcher.get_longest_match and

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Maybe test_empty_env() should pass LD_LIBRARY_PATH to child process. The idea of the test is to test an empty environment: if we pass one variable, it is no more an empty environment. I changed the test to skip it if Python is

[issue12263] punycode codec ignores the error handler argument

2011-06-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Oh, I forgot to give a little bit more details. b'abc\xff-'.decode('punycode', 'ignore') and b'abc\xff-'.decode('punycode', 'replace') raise a UnicodeDecodeError: the error handler is just useless (ignored) here. That's not my point:

[issue12379] build outside source fail in head

2011-06-21 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: cf. http://hg.python.org/cpython/rev/0d0ca6f95d9d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12379 ___

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Duh, don't know what I was thinking: the syscall is not restarted (even though ERESTARTSYS is displayed by strace): the real problem is that the 3s timeout to communicate is not enough, because spawning a new interpreter can take a

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-21 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Added file: http://bugs.python.org/file22421/test_siginterrupt.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12363 ___

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-21 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file22420/test_siginterrupt.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12363 ___

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-21 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12363 ___ ___

[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2011-06-21 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I'll take a look at this when I get a chance (est. two weeks). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12384 ___

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-21 Thread py.user
py.user port...@yandex.ru added the comment: all other methods support it and it's right barr = bytearray(b'abcd*') barr.center(len(barr) * 4, barr[-1:]) Traceback (most recent call last): File stdin, line 1, in module TypeError: must be a byte string of length 1, not bytearray b =

[issue10403] Use member consistently

2011-06-21 Thread Adam Woodbeck
Adam Woodbeck adam.woodb...@gmail.com added the comment: I grepped the documentation in the cpython repository and replaced all mentions of member(s) with attribute(s) where I felt appropriate. I left mentions of members related to structs or any C documentation alone as I'm less confident

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: A bytearray is for working with mutable data. We don't support using it in all places that the non-mutable data types can be used. You can code your example like this: barr.center(len(barr) * 4, bytes([barr[-1]])) I realize that

[issue12385] the help for bytearray.maketrans describes bytes.maketrans

2011-06-21 Thread py.user
New submission from py.user port...@yandex.ru: help(bytearray.maketrans) maketrans(...) B.maketrans(frm, to) - translation table Return a translation table (a bytes object of length 256) suitable for use in bytes.translate where each byte in frm is mapped to the byte at the

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-21 Thread py.user
py.user port...@yandex.ru added the comment: A bytearray is for working with mutable data. We don't support using it in all places that the non-mutable data types can be used. bytearray(b'abcd').strip(bytearray(b'da')) bytearray(b'bc') .translate, .find, .partition, ...

[issue12385] the help for bytearray.maketrans describes bytes.maketrans

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Hmm. I wonder why we have two copies of this method. Well, given that we do, the best fix for the docs would be to say for use in the bytes or bytearray translate method in both this docstring and the bytes.maketrans docstring.

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: All right, let's get some other opinions from people who have actually worked with the bytearray and bytes code (and Terry because he cares about APIs). -- nosy: +haypo, ncoghlan, pitrou, rhettinger, terry.reedy status: closed -

[issue12307] Inconsistent formatting of section titles in PEP 0

2011-06-21 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Yeah, the extra space results in a different formatting. Compare Index by Category with Numerical Index. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12307

[issue12308] Add link to PEP 0 for topical index in wiki

2011-06-21 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: I had considered that, but thought it would be better to leave the topical index open for editing to a broader audience. If it's in PEP 0 then only committers could make changes. I do like the idea of using keywords from the PEPs

[issue8093] IDLE processes don't close

2011-06-21 Thread Simon
Simon simon.buchan...@gmail.com added the comment: Not sure if this is related, but for me none of the F5 processes (command line pythonw.exe -c __import__('idlelib.run').run.main(True) num) ever exit on either 2.7.2 or 3.2.1rc1. -- nosy: +Simon

[issue12379] build outside source fail in head

2011-06-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Benjamin: The mentioned commit is yours, so you probably have the best understanding of this change. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org