[issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely

2012-12-18 Thread Michiel de Hoon
New submission from Michiel de Hoon: I am trying to use io.TextIOWrapper to wrap a handle returned by urllib.request.urlopen. Reading line-by-line from the wrapped handle terminates prematurely. As an example, consider this script: import urllib.request import io url = "http://www.python.org

[issue16722] __index__() overrides __bytes__() when bytes() is called

2012-12-18 Thread Руслан Ижбулатов
New submission from Руслан Ижбулатов: If a class implements both __index__() and __bytes__(), the built-in bytes() constructor uses __index__() in place of __bytes__(), including the assumption that __index__() returns a bytes object. Attaching a simple example (leads to overflow when big inte

[issue16718] Mysterious atexit fail

2012-12-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: When you run wy.py the wow module gets partially imported, and then garbage collected because it fails to import successfully. The destructor for the module replaces values in the module's __dict__ with None. So when the cleanup function runs you get the un

[issue13876] Sporadic failure in test_socket: testRecvmsgEOF

2012-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13d8c33de8ff by Antoine Pitrou in branch '3.3': Silence sporadic failure in RecvmsgIntoSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. http://hg.python.org/cpython/rev/13d8c33de8ff New changeset 900ee4a04f5e by Antoine P

[issue16715] Get rid of IOError. Use OSError instead

2012-12-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- title: Get rid of IOrror. Use OSError instead -> Get rid of IOError. Use OSError instead ___ Python tracker ___ __

[issue16721] configure incorrectly adds -OPT:Olimit=0 for clang

2012-12-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue16648] stdib should use new exception types from PEP 3151

2012-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Get rid of os.error. Use OSError instead ___ Python tracker ___ ___ Python-bugs-list m

[issue16721] configure incorrectly adds -OPT:Olimit=0 for clang

2012-12-18 Thread Vladimir Timofeev
New submission from Vladimir Timofeev: Similar to http://bugs.python.org/issue1162001 But some differences, issue exposed only when first -OPT:Olimit=0 followed by correct -On option. clang simple do not check correctness of first occurences of -O: $ clang -OPT:Olimit=0 test.c; echo $? error:

[issue16720] Get rid of os.error. Use OSError instead

2012-12-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch. -- components: Library (Lib) files: os.error2oserror.diff keywords: patch messages: 177721 nosy: asvetlov, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Get rid of os.error. Use OSError in

[issue15599] test_threaded_import fails sporadically on Windows and FreeBSD

2012-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 67d6bb557d67 by Antoine Pitrou in branch '3.3': Try to make test_threaded_import faster and safer (issue #15599). http://hg.python.org/cpython/rev/67d6bb557d67 New changeset 30c7cc62303a by Antoine Pitrou in branch 'default': Try to make test_thread

[issue16719] Get rid of WindowsError. Use OSError instead

2012-12-18 Thread Brian Curtin
Changes by Brian Curtin : -- assignee: -> brian.curtin components: +Windows nosy: +brian.curtin ___ Python tracker ___ ___ Python-bug

[issue16648] stdib should use new exception types from PEP 3151

2012-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Get rid of WindowsError. Use OSError instead ___ Python tracker ___ ___ Python-bugs-li

[issue16719] Get rid of WindowsError. Use OSError instead

2012-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16719] Get rid of WindowsError. Use OSError instead

2012-12-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch. -- components: Extension Modules, Interpreter Core, Library (Lib) files: windowserror2oserror.patch keywords: patch messages: 177719 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Get

[issue15599] test_threaded_import fails sporadically on Windows and FreeBSD

2012-12-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- title: test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 -> test_threaded_import fails sporadically on Windows and FreeBSD ___ Python tracker _

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ee9cf5a5351 by Antoine Pitrou in branch '3.3': Add sanity assertions in some import lock code (issue #15599). http://hg.python.org/cpython/rev/1ee9cf5a5351 New changeset 7cfca9ede861 by Antoine Pitrou in branch 'default': Add sanity assertions in s

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-12-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: The occasional test_parallel_meta_path failure is really weird. The sys.meta_path module finding in _bootstrap.py is protected by the global import lock, so there shouldn't be any failure here. I'm starting to suspect some issue in the lock code itself. -

[issue16718] Mysterious atexit fail

2012-12-18 Thread anatoly techtonik
anatoly techtonik added the comment: But why _Cleanup is not None when wow.py is executed standalone? -- ___ Python tracker ___ ___ Py

[issue16717] Get rid of socket.error. Use OSError instead

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue16717] Get rid of socket.error. Use OSError instead

2012-12-18 Thread Roundup Robot
New submission from Roundup Robot: New changeset 50d19c2fac82 by Andrew Svetlov in branch 'default': Issue #16717: get rid of socket.error, replace with OSError http://hg.python.org/cpython/rev/50d19c2fac82 -- nosy: +python-dev ___ Python tracker

[issue16716] Deprecate OSError aliases in the doc

2012-12-18 Thread R. David Murray
R. David Murray added the comment: It seems sensible to me. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list maili

[issue16716] Deprecate OSError aliases in the doc

2012-12-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: No objections from me. It would be good to have other people's opinions, though. -- ___ Python tracker ___ _

[issue16716] Deprecate OSError aliases in the doc

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: Don't know about library/exceptions.rst For other modules (socket, select etc.) I like to use ".. deprecated:: 3.3" markup. Antoine, do you have objections? -- ___ Python tracker

[issue16718] Mysterious atexit fail

2012-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It's because _Cleanup is None (as all global variables) when atexit registered functions executed. Don't use globals in such code. -- nosy: +serhiy.storchaka ___ Python tracker

[issue16718] Mysterious atexit fail

2012-12-18 Thread anatoly techtonik
anatoly techtonik added the comment: >py wy.py Traceback (most recent call last): File "wy.py", line 1, in import wow File "E:\scons\wow.py", line 12, in import fail ImportError: No module named fail Error in atexit._run_exitfuncs: Traceback (most recent call last): File "C:\Pytho

[issue16718] Mysterious atexit fail

2012-12-18 Thread anatoly techtonik
anatoly techtonik added the comment: ...one ImportError and *two* TypeError exceptions. -- ___ Python tracker ___ ___ Python-bugs-list

[issue16718] Mysterious atexit fail

2012-12-18 Thread anatoly techtonik
Changes by anatoly techtonik : Added file: http://bugs.python.org/file28354/wy.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16718] Mysterious atexit fail

2012-12-18 Thread anatoly techtonik
Changes by anatoly techtonik : Added file: http://bugs.python.org/file28353/wow.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue16718] Mysterious atexit fail

2012-12-18 Thread anatoly techtonik
New submission from anatoly techtonik: Weird bug. Attached are two files: wow.py and wy.py When wow.py is executed - it fails with single ImportError. But when wy.py is executed (which is a simple "import wow" statement) it fails with one ImportError and TypeError exceptions. -- compone

[issue16716] Deprecate OSError aliases in the doc

2012-12-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: "The following exceptions are kept for compatibility with previous versions; starting from Python 3.3, they are aliases of OSError." Do you want to add an explicit compatibility statement there? -- nosy: +pitrou ___

[issue16705] Use concrete classes inherited from OSError instead of errno check

2012-12-18 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- dependencies: +Get rid of socket.error. Use OSError instead ___ Python tracker ___ ___ Python-bugs-list

[issue16717] Get rid of socket.error. Use OSError instead

2012-12-18 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- assignee: asvetlov components: Documentation nosy: asvetlov priority: normal severity: normal status: open title: Get rid of socket.error. Use OSError instead versions: Python 3.4 ___ Python tracker

[issue16705] Use concrete classes inherited from OSError instead of errno check

2012-12-18 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- dependencies: +Deprecate OSError aliases in the doc ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16706] Get rid of os.error. Use OSError instead

2012-12-18 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue16706] Get rid of os.error. Use OSError instead

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. About deprecation: I've created #16716 for that. -- ___ Python tracker ___ ___ Python-bugs-l

[issue16716] Deprecate OSError aliases in the doc

2012-12-18 Thread Andrew Svetlov
New submission from Andrew Svetlov: The list of aliases is: IOError, EnvironmentError, WindowsError, mmap.error, socket.error, os.error and select.error Documentation should have deprecation message guessing to use OSError instead. -- messages: 177704 nosy: asvetlov priority: normal se

[issue16706] Get rid of os.error. Use OSError instead

2012-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47f98a550d42 by Andrew Svetlov in branch 'default': Issue #16706: get rid of os.error http://hg.python.org/cpython/rev/47f98a550d42 -- nosy: +python-dev ___ Python tracker

[issue16705] Use concrete classes inherited from OSError instead of errno check

2012-12-18 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- dependencies: +Get rid of IOrror. Use OSError instead, Get rid of os.error. Use OSError instead ___ Python tracker ___ ___

[issue16715] Get rid of IOrror. Use OSError instead

2012-12-18 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- assignee: asvetlov components: Library (Lib) nosy: asvetlov priority: normal severity: normal status: open title: Get rid of IOrror. Use OSError instead versions: Python 3.4 ___ Python tracker

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset fdf907708f49 by Andrew Svetlov in branch '3.2': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/fdf907708f49 New changeset 15a391919deb by Andrew Svetlov in branch '3.3': Issue #16714: use 'raise' exceptions, do

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Georg Brandl
Georg Brandl added the comment: LGTM, except for: diff -r 907d71668d3c Python/pythonrun.c --- a/Python/pythonrun.cSun Dec 16 21:10:35 2012 +0100 +++ b/Python/pythonrun.cTue Dec 18 19:35:27 2012 +0200 @@ -2518,7 +2518,7 @@ PyOS_CheckStack(void) { __try { -/* alloca

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue16648] stdib should use new exception types from PEP 3151

2012-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Raise exceptions, don't throw ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28349/raise-2.7.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28348/raise-3.2.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16714] Raise exceptions, don't throw

2012-12-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch fixes wording of documentation, comments, etc which use the term 'throw' instead of 'raise' in context of exception raising. -- assignee: docs@python components: Documentation files: raise-3.3.patch keywords: patch messages: 17769

[issue15533] subprocess.Popen(cwd) documentation

2012-12-18 Thread Jan Lachnitt
Jan Lachnitt added the comment: Hi Chris, thank for your reply, I didn't see it while writing the edit. Does it mean that on Linux, it will use the cwd? -- ___ Python tracker __

[issue15533] subprocess.Popen(cwd) documentation

2012-12-18 Thread Jan Lachnitt
Jan Lachnitt added the comment: EDIT: No, it doesn't work fine: the executable reports stack overflow. I thought this had nothing to do with Python, hence I didn't mention it. But If I run the executable without Python, THEN it works fine. But this may be another issue. I'll update to 3.3.0 a

[issue15533] subprocess.Popen(cwd) documentation

2012-12-18 Thread Chris Jerdonek
Chris Jerdonek added the comment: Hi Jan, yes, the documentation now describes the non-Windows behavior, which is different from the Windows behavior. See the comment just before yours on what still needs to be done to resolve this issue. I was in the middle of creating a bunch of test cases

[issue15533] subprocess.Popen(cwd) documentation

2012-12-18 Thread Jan Lachnitt
Jan Lachnitt added the comment: Hi, I am using Python 3.2.3 on Windows XP. I encountered a problem with subprocess.call when using the cwd parameter. I used Google to look for a solution and I found this issue in Python tracker. But this issue seems absolutely reversed! The subprocess docume

[issue16713] "tel" URIs should support params

2012-12-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't know whether 'tel' is a common scheme, but it's easy to add it to urlparse from the outside: >>> urlparse.uses_param.append('tel') >>> urlparse.urlparse('tel:7042;phone-context=example.com') ParseResult(scheme='tel', netloc='', path='7042', param

[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-18 Thread vila
Changes by vila : -- nosy: +vila ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman

[issue16713] "tel" URIs should support params

2012-12-18 Thread Antoine Pitrou
New submission from Antoine Pitrou: RFC 3966 (http://tools.ietf.org/html/rfc3966) defines the tel URI and its parameters. However, urlparse / urllib.parse doesn't recognize "tel" URIs as taking parameters: >>> urlparse.urlparse('tel:7042;phone-context=example.com') ParseResult(scheme='tel', ne

[issue16711] s/next()/__next__/ in collections.abc.Iterator document.

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Thanks. -- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.4 ___ Python tracker __

[issue16711] s/next()/__next__/ in collections.abc.Iterator document.

2012-12-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 259516fddb6c by Andrew Svetlov in branch '3.2': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/259516fddb6c New changeset 864bb05be215 by Andrew Svetlov in branch '3.3': Issue #16711: Fix required m

[issue16703] except statement turns defined variable into undefined

2012-12-18 Thread Brett Cannon
Brett Cannon added the comment: As Mark pointed out, this is on purpose and is not going to change since Python lacks block-level scoping of variables and thus causes the last case related to the variable to take precedence. It might be a little unexpected, but it's not that unreasonable when

[issue16712] collections.abc.Sequence should not provide __reversed__

2012-12-18 Thread INADA Naoki
New submission from INADA Naoki: http://docs.python.org/3.3/reference/datamodel.html#object.__reversed__ > Objects that support the sequence protocol should only provide > __reversed__() if they can provide an implementation that is more efficient > than the one provided by reversed(). collec

[issue16708] Module: shutil will not import when writen in the text editor but will in the python shell

2012-12-18 Thread R. David Murray
R. David Murray added the comment: You have a 'copy.py' module in your python path, as is evidenced by the filename in your traceback, which tarfile is importing instead of the real copy module, and your copy.py is therefore trying to use shutil before it is completely imported, thus the error

[issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: As I can see in Py_Finalize finalized for standard exception classes is called after any python code has been finished, so we don't need to protect those exceptions. -- ___ Python tracker

[issue16706] Get rid of os.error. Use OSError instead

2012-12-18 Thread Hynek Schlawack
Hynek Schlawack added the comment: > I think deprecation makes not big value. > We should continue aliases support and there are no place to raise warning. > What we can do — mention deprecation in the doc. That’s what I meant. I saw it in shutil code, were confused, looked it up, wondered why

[issue16706] Get rid of os.error. Use OSError instead

2012-12-18 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think deprecation makes not big value. We should continue aliases support and there are no place to raise warning. What we can do — mention deprecation in the doc. The reason to get rid of other OSError aliases to make cleaner code (especially considering sit

[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-18 Thread Michael Foord
Michael Foord added the comment: Seems reasonable. -- assignee: -> michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16710] json encode/decode error

2012-12-18 Thread Андрей Гаврилин
Андрей Гаврилин added the comment: I saw it now. I'm in a hurry today. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16711] s/next()/__next__/ in collections.abc.Iterator document.

2012-12-18 Thread INADA Naoki
New submission from INADA Naoki: http://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator > ABC for classes that provide the __iter__() and next() methods. "next()" should be "__next__()" for Python 3. -- assignee: docs@python components: Documentation message

[issue16710] json encode/decode error

2012-12-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Unlike Python dictionaries, keys of Json objects are always strings. There is a note in the documentation: http://docs.python.org/2/library/json.html#json.dumps -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed

[issue16710] json encode/decode error

2012-12-18 Thread Андрей Гаврилин
New submission from Андрей Гаврилин: I sent this. {24: (0, ''), 27: (0, ''), 19: (0, ''), 28: (0, '')} {"tasks": {"24": [0, ""], "27": [0, ""], "19": [0, ""], "28": [0, ""]}, "uuid": "8798b4dfbe3646e5ab05106f6f9af6fe", "delay": 3, "task_limit": 10, "arch": ["ARM", "i386", "x86_64"], "build_en