[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_env": "fedora"}

And I've got this.

{"tasks": {"24": [0, ""], "27": [0, ""], "19": [0, ""], "28": [0, ""]}, "uuid": 
"8798b4dfbe3646e5ab05106f6f9af6fe", "delay": 3, "task_limit": 10, "arch": 
["ARM", "i386", "x86_64"], "build_env": "fedora"}

{u'tasks': {u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, 
u'']}, u'uuid': u'8798b4dfbe3646e5ab05106f6f9af6fe', u'delay': 3, 
u'task_limit': 10, u'arch': [u'ARM', u'i386', u'x86_64'], u'build_env': u'rosa'}

{u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']}

It must contain digits.


{24: (0, ''), 27: (0, ''), 19: (0, ''), 28: (0, '')}

{u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']}

--
messages: 177679
nosy: Андрей.Гаврилин
priority: normal
severity: normal
status: open
title: json encode/decode error
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
messages: 177681
nosy: docs@python, naoki
priority: normal
severity: normal
status: open
title: s/next()/__next__/ in collections.abc.Iterator document.
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 situations like `except (os.error, IOError):` and use best 
practices in stdlib.

I think the later is very important because stdlib is first class example of 
coding style for many users.

After stdlib we can cleanup C code to that unification and use concrete 
exception classes instead of errno checking (#16705).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 it exists. I would like to get rid of it.

Do you have any concrete plans or should I just wade through shutil and make it 
pretty for 3.4?

> The reason to get rid of other OSError aliases to make cleaner code 
> (especially considering situations like `except (os.error, IOError):` and use 
> best practices in stdlib.

Sure.

> I think the later is very important because stdlib is first class example of 
> coding style for many users.

I hope not. :-/

> After stdlib we can cleanup C code to that unification and use concrete 
> exception classes instead of errno checking (#16705).

Awesome.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.  So this is indeed a local problem on your 
machine.

python-list is a mailing list where there are a lot of python users, many of 
whom will be willing to help you sort this out if you need more help.  Go to 
mail.python.org for a list of lists and signup instructions.

--
resolution: works for me -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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().

collections.abc.Sequence can't provide more efficient method.
It only make `reversed()` slower.

--
components: Library (Lib)
messages: 177688
nosy: naoki
priority: normal
severity: normal
status: open
title: collections.abc.Sequence should not provide __reversed__
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 you think about scoping rules and understand how 
'except' blocks work.

--
nosy: +brett.cannon
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 method names for collections.Iterator
http://hg.python.org/cpython/rev/864bb05be215

New changeset 85127ec7d724 by Andrew Svetlov in branch 'default':
Issue #16711: Fix required method names for collections.Iterator
http://hg.python.org/cpython/rev/85127ec7d724

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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', netloc='', path='7042;phone-context=example.com', 
params='', query='', fragment='')

--
components: Library (Lib)
messages: 177692
nosy: orsenthil, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: "tel" URIs should support params
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/options/python-bugs-list/archive%40mail-archive.com



[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', 
params='phone-context=example.com', query='', fragment='')

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 documentation says this: "In particular, the function looks for 
executable (or for the first item in args) relative to cwd if the executable 
path is a relative path." But this is NOT true. If I use the path relative to 
cwd, I get Windows Error 2 (system cannot find the file). If I change the 
executable's path to be relative to the current directory, where the script is 
running (i.e. NOT the cwd parameter passed to subprocess.call), it works fine.

--
nosy: +pepalogik

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 for the various combinations, as well as documenting the 
results.  But I got busy with other things.  I will see if I can revisit my 
work on this sometime soon and upload a diff.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 and then tell you if this has changed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 177698
nosy: asvetlov, docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Raise exceptions, don't throw
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28347/raise-3.3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 throws a stack overflow exception if there's
+/* alloca raises a stack overflow exception if there's
not enough space left on the stack */
 alloca(PYOS_STACK_MARGIN * sizeof(void*));
 return 0;

This is talking about a C++ exception and therefore "throw" is correct.

--
nosy: +georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, don't 'throw'.
http://hg.python.org/cpython/rev/15a391919deb

New changeset 7260cf668dd7 by Andrew Svetlov in branch 'default':
Issue #16714: use 'raise' exceptions, don't 'throw'.
http://hg.python.org/cpython/rev/7260cf668dd7

New changeset 8c2635afbfe1 by Andrew Svetlov in branch '2.7':
Issue #16714: use 'raise' exceptions, don't 'throw'.
http://hg.python.org/cpython/rev/8c2635afbfe1

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
severity: normal
stage: needs patch
status: open
title: Deprecate OSError aliases in the doc
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--
components: Interpreter Core, Library (Lib)
messages: 177707
nosy: techtonik
priority: normal
severity: normal
status: open
title: Mysterious atexit fail
versions: Python 2.6, Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
  File "E:\scons\wow.py", line 8, in _clean
cleanlist = [ c for c in _Cleanup if c ]
TypeError: 'NoneType' object is not iterable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
  File "E:\scons\wow.py", line 8, in _clean
cleanlist = [ c for c in _Cleanup if c ]
TypeError: 'NoneType' object is not iterable

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 some import lock code (issue #15599).
http://hg.python.org/cpython/rev/7cfca9ede861

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rid of WindowsError. Use OSError instead
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28355/windowserror2oserror.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_threaded_import faster and safer (issue #15599).
http://hg.python.org/cpython/rev/30c7cc62303a

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 instead
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28356/os.error2oserror.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: invalid integral value 'PT:Olimit=0' in '-OPT:Olimit=0'
error: invalid integral value 'PT:Olimit=0' in '-OPT:Olimit=0'
1

$ clang -OPT:Olimit=0 -O2 test.c; echo $?   

 
0

This leads to normal compilation of python itself, but some dependant software 
built by gcc fails (see http://www.freebsd.org/cgi/query-pr.cgi?pr=174525 )

--
components: Build
messages: 177722
nosy: Vladimir.Timofeev
priority: normal
severity: normal
status: open
title: configure incorrectly adds -OPT:Olimit=0 for clang
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Pitrou in branch 'default':
Silence sporadic failure in RecvmsgIntoSCTPStreamTest.testRecvmsgEOF (issue 
#13876) - probably not Python-related.
http://hg.python.org/cpython/rev/900ee4a04f5e

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 unexpected error.

When you run wow.py directly, wow (i.e. the main module) will not be garbage 
collected, so _Cleanup is never replaced by None.

--
nosy: +sbt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 integer is casted to 
bytes).

--
components: None
files: testb.py
messages: 177725
nosy: LRN
priority: normal
severity: normal
status: open
title: __index__() overrides __bytes__() when bytes() is called
versions: Python 3.3
Added file: http://bugs.python.org/file28357/testb.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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";
handle = urllib.request.urlopen(url)
wrapped_handle = io.TextIOWrapper(handle, encoding='utf-8')
for line in wrapped_handle:
pass

This gives:

Traceback (most recent call last):
  File "", line 1, in 
ValueError: I/O operation on closed file.

This happens after 335 out of the 430 lines have been read (the last line read 
is "The Python Software 
Foundation holds the intellectual property\n", which is line 335 on the 
www.python.org website.

--
messages: 177726
nosy: mdehoon
priority: normal
severity: normal
status: open
title: io.TextIOWrapper on urllib.request.urlopen terminates prematurely
type: behavior
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com