[issue15805] Add stdout redirection tool to contextlib

2012-09-26 Thread Nick Coghlan
Nick Coghlan added the comment: I'd actually be inclined to make it the full trio: redirect_stdin, redirect_stdout, redirect_stderr. Mostly because I don't see an especially compelling reason to privilege redirecting stdout over the other two standard streams, and the pass in the stream name

[issue16035] Segmentation fault in test suite of apsw

2012-09-26 Thread Roger Binns
Roger Binns added the comment: Thanks for finding this problem. I can repeat it with the patch and am in the process of fixing it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16035

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-26 Thread Mark Dickinson
Mark Dickinson added the comment: +1 -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___ Python-bugs-list mailing

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch and benchmark script. This required more time than I thought. Benchmark results: Unpatched: 5.3 read(1) 0.5 read(10) 0.049 read(100) 0.013 read(1000) 0.009 read(1) 0.0085 read(10) 0.0082 read() 5 read1(1) 0.47

[issue16052] Typo in What's new in 3.3

2012-09-26 Thread Lars Buitinck
New submission from Lars Buitinck: I spotted a minor typo in the What's new for Py 3.3, introduced yesterday. See attached patch. -- assignee: docs@python components: Documentation files: typo.hg messages: 171333 nosy: docs@python, larsmans priority: normal severity: normal status:

[issue16053] strict parameter is not documented in csv module

2012-09-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: csv.Dialect.strict is not documented. However it is used in tests. -- messages: 171334 nosy: storchaka priority: normal severity: normal status: open title: strict parameter is not documented in csv module ___

[issue16053] strict parameter is not documented in csv module

2012-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16053

[issue13896] Make shelf instances work with 'with' as context managers

2012-09-26 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13896 ___ ___

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27310/bz2_faster_read.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16034 ___

[issue16052] Typo in What's new in 3.3

2012-09-26 Thread Georg Brandl
Georg Brandl added the comment: Thanks for the report. Note that we don't care for bundles instead of patches, since they are impossible to review online and clumsy to do so offline. Readable patches (as generated by e.g. hg export) are much preferred. -- nosy: +georg.brandl

[issue16052] Typo in What's new in 3.3

2012-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6f456d9add40 by Georg Brandl in branch 'default': Closes #16052: fix typo. Patch by Lars Buitinck. http://hg.python.org/cpython/rev/6f456d9add40 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27310/bz2_faster_read.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16034 ___

[issue16052] Typo in What's new in 3.3

2012-09-26 Thread Lars Buitinck
Lars Buitinck added the comment: Sorry about the bundle, I'm an hg noob and only noticed that bundles are binary after I submitted it. Will create a regular patch next time. -- ___ Python tracker rep...@bugs.python.org

[issue16051] Documentation missing pipes.quote()

2012-09-26 Thread R. David Murray
R. David Murray added the comment: Thanks for the report. pipes.quote used to be an undocumented helper function in pipes. When we decided to make it public, we moved it to the shlex module. Therefore you'll find that as of Python 3.3 the source code has moved to shlex and it is documented

[issue13440] Explain the status quo wins a stalemate principle in the devguide

2012-09-26 Thread Mike Hoy
Mike Hoy added the comment: I'd be willing to make a patch for this if you are agreed to just adding a couple of links to it (or otherwise). -- nosy: +mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13440

[issue16036] simplify int() signature docs

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: The latest patch is better, however I think it can be further improved. The text is currently divided in two paragraphs: 1) covers int(), int(num), int(x, base=b); 2) covers int(float), and int(x, base=b); I think it would be better to cover first int(),

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eli.bendersky, ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16044 ___ ___

[issue16048] Tutorial-classes-remarks: replace paragragh

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16048 ___

[issue13386] Document documentation conventions for optional args

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +chris.jerdonek type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13386 ___

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27310/bz2_faster_read.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16034 ___

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Fixed one error. Now readline() optimized too. Benchmark results (reading python.bz2): Py2.7 Py3.2 Py3.3 Py3.3 vanilla patched 4.8 4.8 - 31 read(1) 1 0.943.4e+02 3.6 read(10) 0.610.6

[issue16054] Preferences Crashes on click

2012-09-26 Thread Fredy
New submission from Fredy: Process: Python [3627] Path:/Applications/Python 3.2/IDLE.app/Contents/MacOS/Python Identifier: org.python.IDLE Version: 3.2.3 (3.2.3) Code Type: X86-64 (Native) Parent Process: launchd [231] User ID: 501 Date/Time:

[issue13224] Change str(x) to return only the (qual)name for some types

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___ ___

[issue13263] Group some os functions in submodules

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: Now it's too late to fix this, so I'm closing it. -- resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13263

[issue16054] IDLE Preferences Crashes on click

2012-09-26 Thread Ned Deily
Ned Deily added the comment: This is due to a bug in the current Cocoa Tk as released in ActiveTcl 8.5.12.1 (and 8.5.12). Try installing the previous ActiveTcl version, 8.5.11.1: http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ -- nosy: +ned.deily resolution: -

[issue6027] test_xmlrpc_net fails when the ISP returns 302 Found

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: da148f0d86bd added a skip to the test (see #13434). Also xmlrpc.com now redirects to xmlrpc.scripting.com. -- resolution: - out of date stage: - committed/rejected status: open - closed ___ Python tracker

[issue13056] test_multibytecodec.py:TestStreamWriter is skipped after PEP393

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: Victor, do you know if multibytecodec has been ported to the new API yet? If I removed the if, I still get a failure. test test_multibytecodec failed -- Traceback (most recent call last): File /home/wolf/dev/py/py3k/Lib/test/test_multibytecodec.py, line 187, in

[issue12707] Deprecate addinfourl getters

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12707 ___

[issue14097] Improve the introduction page of the tutorial

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +chris.jerdonek versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14097 ___

[issue13056] test_multibytecodec.py:TestStreamWriter is skipped after PEP393

2012-09-26 Thread STINNER Victor
STINNER Victor added the comment: Victor, do you know if multibytecodec has been ported to the new API yet? No, it has no. CJK codecs still use the legacy API (Py_UNICODE). -- ___ Python tracker rep...@bugs.python.org

[issue1087] py3k os.popen result is not iterable, patch attached

2012-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8cc94a0ba4c by Ezio Melotti in branch 'default': #1087: use proper skips in test_os. http://hg.python.org/cpython/rev/c8cc94a0ba4c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6973 ___

[issue6331] Add unicode script info to the unicode database

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6331 ___ ___

[issue6412] Titlecase as defined in Unicode Case Mappings not followed

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6412 ___

[issue6519] Reorder 'with' statement for files in Python Tutorial

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +chris.jerdonek versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6519 ___

[issue7844] Add -3 warning for absolute imports.

2012-09-26 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7844 ___

[issue16036] simplify int() signature docs

2012-09-26 Thread Éric Araujo
Éric Araujo added the comment: Latest patch LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16036 ___ ___ Python-bugs-list mailing list

[issue8401] Strange behavior of bytearray slice assignment

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: a[:] = -10 # This should raise ValueError, not TypeError. a[:] = 10 # This should raise OverflowError, not TypeError. FTR, these two now raise OverflowError. -- versions: +Python 3.3, Python 3.4 -Python

[issue10669] Document Deprecation Warnings and how to fix

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +chris.jerdonek versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10669 ___

[issue4758] Python 3.x internet documentation needs work

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - out of date stage: needs patch - committed/rejected status: languishing - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4758

[issue11461] Reading UTF-16 with codecs.readline() breaks on surrogate pairs

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11461 ___ ___

[issue5846] Deprecate obsolete functions in unittest

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5846 ___

[issue11313] Speed up default encode()/decode()

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: Can this be closed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11313 ___ ___ Python-bugs-list mailing list

[issue16036] simplify int() signature docs

2012-09-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: Good improvement. LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16036 ___ ___ Python-bugs-list mailing

[issue4153] Unicode HOWTO up to date?

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4153 ___ ___

[issue2292] Missing *-unpacking generalizations

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: -after moratorium versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___

[issue14679] Define an __all__ for html.parser

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: The issue with Django seems to be solved, but as Terry suggested in http://mail.python.org/pipermail/python-dev/2012-April/119087.html, adding an __all__ would be a good idea. I'm changing the scope of the issue accordingly. -- assignee: -

[issue10665] Expand unicodedata module documentation

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10665 ___ ___

[issue14886] json C vs pure-python implementation difference

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14886 ___ ___

[issue4733] Add a decode to declared encoding version of urlopen to urllib

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4733 ___ ___

[issue7300] Unicode arguments in str.format()

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +chris.jerdonek versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7300 ___

[issue6975] symlinks incorrectly resolved on Linux

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975 ___ ___ Python-bugs-list

[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2012-09-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- title: deprecated in 3.2, should be removed in 3.3 - deprecated in 3.2/3.3, should be removed in 3.4 versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue15815] Add numerator to ZeroDivisionError messages

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: Terry, do you still think that adding the numerator would be useful? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15815 ___

[issue15815] Add numerator to ZeroDivisionError messages

2012-09-26 Thread Mark Dickinson
Mark Dickinson added the comment: I'll add my -1 to this; I don't really see the use. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15815 ___

[issue4733] Add a decode to declared encoding version of urlopen to urllib

2012-09-26 Thread Lino Mastrodomenico
Lino Mastrodomenico added the comment: FYI, the exact algorithm for determining the encoding of HTML documents is http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#determining-the-character-encoding There are lots of different algorithms documented all over the

[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-26 Thread Chris Jerdonek
New submission from Chris Jerdonek: The following error text is incorrect in at least one way: int(base=1000, x='1') Traceback (most recent call last): File stdin, line 1, in module ValueError: int() arg 2 must be = 2 and = 36 The *base* argument can also be 0. Secondly, the text should

[issue15815] Add numerator to ZeroDivisionError messages

2012-09-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Not enough, at present, to leave this open. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15815 ___

[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: Locations: Objects/longobject.c 1994:int() arg 2 must be = 2 and = 36); 4273:int() arg 2 must be = 2 and = 36); -- ___ Python tracker rep...@bugs.python.org

[issue11461] Reading UTF-16 with codecs.readline() breaks on surrogate pairs

2012-09-26 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11461 ___

[issue11461] UTF-16 incremental decoder doesn't support partial surrogate pair

2012-09-26 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Reading UTF-16 with codecs.readline() breaks on surrogate pairs - UTF-16 incremental decoder doesn't support partial surrogate pair ___ Python tracker rep...@bugs.python.org

[issue14771] Occasional failure in test_ioctl

2012-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: Can you still reproduce this issue? Do you use any specific flag to run the tests? What OS is this? I tried on linux, solaris, and aix with ``./python -m test -F test_ioctl`` for about 1k loops, and couldn't reproduce the issue. -- nosy: +ezio.melotti

[issue16056] shadowed test names in std lib regression tests

2012-09-26 Thread Xavier de Gaye
New submission from Xavier de Gaye: The attached script, named find_duplicate_test_names.py, prints duplicate regression test method names in a given directory tree. Running this script on the standard library test suite shows few duplicates, see below. It means that some of those tests are not

[issue16056] shadowed test names in std lib regression tests

2012-09-26 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16056 ___ ___

[issue16056] shadowed test names in std lib regression tests

2012-09-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot for the report. Does the 2.7 branch have similar instances? -- nosy: +ezio.melotti, michael.foord, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16056

[issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode

2012-09-26 Thread Justin Lebar
New submission from Justin Lebar: The JSONEncoder documentation says we can implement our own encoder as: class ComplexEncoder(json.JSONEncoder): ... def default(self, obj): ... if isinstance(obj, complex): ... return [obj.real, obj.imag] ... return

[issue16058] ConfigParser no longer deepcopy compatible in 2.7

2012-09-26 Thread Robert Collins
New submission from Robert Collins: In 2.6 deepcopy(ConfigParser) worked, in 2.7 it doesn't due to the _optcre variable which is a compiled regex pattern. -- components: Library (Lib) messages: 171364 nosy: rbcollins priority: normal severity: normal status: open title: ConfigParser no

[issue16032] IDLE 3.2 is crashing multiple times

2012-09-26 Thread Omanand Jha Vatsa
Omanand Jha Vatsa added the comment: Thanks Ned. It is working for me now. Followed your steps to verify the version. Thanks again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16032

[issue16036] simplify int() signature docs

2012-09-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: Ezio, do you want to commit this or should I? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16036 ___ ___

[issue16032] IDLE 3.2 is crashing multiple times

2012-09-26 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16032 ___

[issue16048] Tutorial-classes-remarks: replace paragragh

2012-09-26 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16048 ___ ___ Python-bugs-list

[issue16059] Serialize MD5 computation-state and resume later

2012-09-26 Thread Ye Yuan
New submission from Ye Yuan: Serialize/deserialize md5 context. Pseudocode: import md5 # Start hash generation m = md5.new() m.update(Content) # Serialize m serialized_m = serialize(m) # In another function/machine, deserialize m # and continue hash generation m2 = deserialize(serialized_m)