[issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib

2010-02-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Can this be fixed without breaking compatibility? It also affects Python2.7 and maybe also Python 3.x (there the error is different and might be intentional). Copy/pastable snippet to reproduce the error on 2.x: from urllib import urlopen

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

2010-02-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: All the examples there assume that a file object called f has already been created. Using a 'with' there it's not a good idea because the users will have to keep the instructions indented under the 'with'. However I agree that it would be

[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2010-02-27 Thread Alexander Sulfrian
New submission from Alexander Sulfrian alexan...@sulfrian.net: Hi, if using ccache (CC=ccache gcc --flags, CXX=g++) distutils will try to execute something like g++ gcc --flags as linker for c++ libraries. Patch attached. Alex -- assignee: tarek components: Distutils files:

[issue7793] regrtest fails with RuntimeError: maximum recursion depth exceeded in some cases

2010-02-27 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Fixed in r78497. -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7793

[issue4199] add shorthand global and nonlocal statements

2010-02-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I do think a brief discussion after the moratorium is over would be good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4199 ___

[issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception

2010-02-27 Thread 5houston
New submission from 5houston cadab...@gmail.com: Try to execute python -OO crashingMain.py using python 3.1 or 3.1.1. It creates and starts 5 SendingProcess(es). SendingProcess inherits from multiprocessing.Process and multiprocessing.queue.Queue. Each process starts a loop. In the meanwhile

[issue8029] bug in 2to3 dealing with print FOO, followed by sys.stdout.write('')

2010-02-27 Thread Trent Mick
New submission from Trent Mick tre...@gmail.com: According to http://docs.python.org/reference/simple_stmts.html#the-print-statement the following with result in the print statement NOT printing a trailing space: import sys print uASD,; sys.stdout.write(u) However, 2to3 currently

[issue7232] Support of 'with' statement fo TarFile class

2010-02-27 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: What about changing the exception test to something like what I did in issue7232.4.diff? That is definitely more succinct, but Lars' solution provides more information about _why_ the test fails. IMHO, the descriptiveness is more important

[issue7162] 2to3 does not convert __builtins__.file

2010-02-27 Thread Ryan Coyner
Ryan Coyner rcoy...@gmail.com added the comment: Patch attached. Unit test and documentation included. COMMITMSG: Adds a new fixer to lib2to3 which replaces the deprecated builtin file with open. -- keywords: +patch nosy: +rcoyner Added file:

[issue7232] Support of 'with' statement fo TarFile class

2010-02-27 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Good point. How about version 5? It uses base Exception in the context manager, which will allow us to differentiate between no exception being raised, and the wrong one being raised. After the context manager, we check the type of the exception

[issue7232] Support of 'with' statement fo TarFile class

2010-02-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hello Minor note: I think magic methods shouldn’t have docstrings, because their name is enough doc (or at least enough to go read the doc). At most a one-line comment like “context protocol” can be useful. (The exception is __init__, which