[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Raúl Núñez de Arenas

Raúl Núñez de Arenas added the comment:

Thanks to you, Berker, and SilentGhost, for applying and preparing the patch!

--

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0cfac9efd895 by Berker Peksag in branch '3.5':
Issue #26401: Fix compile() documentation
https://hg.python.org/cpython/rev/0cfac9efd895

New changeset 45cf82f424ce by Berker Peksag in branch 'default':
Issue #26401: Fix compile() documentation
https://hg.python.org/cpython/rev/45cf82f424ce

--
nosy: +python-dev

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread SilentGhost

SilentGhost added the comment:

Updated patch.

--
Added file: http://bugs.python.org/file41989/issue26401_2.diff

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Raúl Núñez de Arenas

Raúl Núñez de Arenas added the comment:

I checked the Mercurial repository directly, and the change was introduced in 
2014: http://bugs.python.org/issue22215

So, yes, looks like a 3.5 change and the versionchanged note suggested by 
Berker is a great idea!

--

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread SilentGhost

SilentGhost added the comment:

TypeError is raised in 3.4

--

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Raúl Núñez de Arenas

Raúl Núñez de Arenas added the comment:

I checked the sources at github and the change was introduced back in 2010, if 
I recall correctly, so maybe this change happened in 3.2? I can check again and 
try to determine the exact date and if at all possible the version.

--

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Berker Peksag

Berker Peksag added the comment:

It would be good to add a versionchanged note. Something like:

   .. versionchanged:: 3.5
  Previously, a :exc:`TypeError` was raised [...]

--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread SilentGhost

SilentGhost added the comment:

Here is the patch.

--
keywords: +patch
nosy: +SilentGhost
versions: +Python 3.6
Added file: http://bugs.python.org/file41985/issue26401.diff

___
Python tracker 

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



[issue26401] Error in documentation for "compile" built-in function

2016-02-21 Thread Raúl Núñez de Arenas

New submission from Raúl Núñez de Arenas:

According to the documentation, if the 'compile' built-in function encounters 
NUL bytes in the compiled source, it raises TypeError, but this is not true:

>>> source = '\u'
>>> compile(source, '', 'single')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: source code string cannot contain null bytes

It raises ValueError, not TypeError. And IMHO, it's the proper exception to 
raise...

--
assignee: docs@python
components: Documentation
messages: 260613
nosy: Raúl Núñez de Arenas, docs@python
priority: normal
severity: normal
status: open
title: Error in documentation for "compile" built-in function
type: enhancement
versions: Python 3.5

___
Python tracker 

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