[issue23674] super() documentation isn't very clear

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Here is a patch against Python 3 with my suggestions. Let me know what you 
think, if I got anything wrong, extra bits that could be changed, etc.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41255/super.patch

___
Python tracker 

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



[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Here is a better failure in test_close_fds_after_preexec(), raising ENOMEM, so 
I am fairly confident that my fix is working and the exception from fork() is 
passing through properly.

http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.5/builds/137/steps/test/logs/stdio

==
ERROR: test_close_fds_after_preexec (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/64bits/3.5.cea-indiana-amd64/build/Lib/test/test_subprocess.py",
 line 2313, in test_close_fds_after_preexec
preexec_fn=lambda: os.dup2(1, fd))
  File 
"/export/home/buildbot/64bits/3.5.cea-indiana-amd64/build/Lib/subprocess.py", 
line 950, in __init__
restore_signals, start_new_session)
  File 
"/export/home/buildbot/64bits/3.5.cea-indiana-amd64/build/Lib/subprocess.py", 
line 1483, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Not enough space

Closing this as fixed, but I would love to find out what the problem with my 
setrlimit() test code is on OS X.

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



[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f831de45f43 by Martin Panter in branch '3.4':
Issue #25764: Skip the test on OS X
https://hg.python.org/cpython/rev/6f831de45f43

New changeset 6211c41106cc by Martin Panter in branch '3.5':
Issue #25764: Merge OS X test skipping from 3.4 into 3.5
https://hg.python.org/cpython/rev/6211c41106cc

New changeset 9a847520c40d by Martin Panter in branch 'default':
Issue #25764: Merge OS X test skipping from 3.5
https://hg.python.org/cpython/rev/9a847520c40d

New changeset 0c9095566f21 by Martin Panter in branch 'default':
Issue #25764: Remove test debugging
https://hg.python.org/cpython/rev/0c9095566f21

--

___
Python tracker 

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



[issue25804] Make Profile.print_stats support sorting by mutiple values

2015-12-05 Thread Chiu-Hsiang Hsu

Chiu-Hsiang Hsu added the comment:

Attached refactored patch with tests.

--
Added file: http://bugs.python.org/file41249/print_stats_with_test.patch

___
Python tracker 

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



[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-05 Thread Daniel Lepage

Daniel Lepage added the comment:

It looks like this is an OSX-specific behavior, and not a python problem:
 $ mkdir .
mkdir: .: File exists
 $ mkdir /
mkdir: /: Is a directory

--

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-05 Thread Isobel Hooper

Isobel Hooper added the comment:

Attached patch fixes library/base64.rst as requested, and adds a mention of RFC 
3548 into the b2a_base64() docs in library/binascii.rst.

I'm not sure I've made the changes against the right version of the docs - I 
think this might be against the 3.3 docs.

--
keywords: +patch
nosy: +Isobel Hooper
Added file: http://bugs.python.org/file41250/issue-1753718.patch

___
Python tracker 

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



[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-05 Thread Steve Dower

Steve Dower added the comment:

I don't want to do it without running it through the buildbots at least. 
There's so much that can change just by rebuilding.

I'd love to say I have the time today to make the change and validate two 
separate versions before producing the releases, but I really don't.

--

___
Python tracker 

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



[issue23962] Incorrect TimeoutError referenced in concurrent.futures documentation

2015-12-05 Thread Dingyuan Wang

Changes by Dingyuan Wang :


--
nosy: +gumblex

___
Python tracker 

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



[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Dec 05, 2015, at 07:03 AM, Benjamin Peterson wrote:

>The underlying issue is classic: PyDict_SetItem returns NULL if the stack is
>too deep. This confuses import.

Thanks for digging into this Benjamin.  I'm not able to investigate further
atm, but could you please explain your analysis in more detail?  Where's the
faulty setitem?  Where is import getting confused?  Why does this (or the
combination I found before) cause the problem?

--

___
Python tracker 

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



[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Stephen J. Turnbull

Stephen J. Turnbull added the comment:

I just reviewed again, and I agree it's ready for merge.  I don't see any 
immediate need to add more.

Unfortunately, I'm not a committer.

--

___
Python tracker 

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



[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Carol Willing

Carol Willing added the comment:

Stephen, Thanks for reviewing to make sure it's still current. I appreciate it.

Core devs: Please merge and we'll close this one. Thanks.

--

___
Python tracker 

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



[issue25801] ResourceWarning in test_zipfile64

2015-12-05 Thread SilentGhost

Changes by SilentGhost :


--
keywords: +needs review -patch

___
Python tracker 

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



[issue25807] test_multiprocessing_fork.test_mymanager fails and hangs

2015-12-05 Thread SilentGhost

New submission from SilentGhost:

When running either of the test_multiprocessing_fork, 
test_multiprocessing_spawn or test_multiprocessing_forkserver I get error in 
test_mymanager that leads to hanging. Here is the fragment:

test_mymanager (test.test_multiprocessing_fork.WithManagerTestMyManager) ... 
Unhandled exception in thread started by >
Traceback (most recent call last):
  File "cpython/Lib/multiprocessing/managers.py", line 235, in serve_client
(methodname, type(obj), exposed)
AttributeError: method '_h' of  
object is not in exposed={'g', 'f'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cpython/Lib/multiprocessing/managers.py", line 258, in serve_client
fallback_func = self.fallback_mapping[methodname]
KeyError: '_h'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cpython/Lib/multiprocessing/managers.py", line 195, in handle_request
result = func(c, *args, **kwds)
  File "cpython/Lib/multiprocessing/managers.py", line 386, in accept_connection
  File "cpython/Lib/multiprocessing/managers.py", line 264, in serve_client
msg = ('#TRACEBACK', format_exc())
  File "cpython/Lib/traceback.py", line 163, in format_exc
return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
  File "cpython/Lib/traceback.py", line 117, in format_exception
type(value), value, tb, limit=limit).format(chain=chain))
  File "cpython/Lib/traceback.py", line 474, in __init__
capture_locals=capture_locals)
  File "cpython/Lib/traceback.py", line 358, in extract
f.line
  File "cpython/Lib/traceback.py", line 282, in line
self._line = linecache.getline(self.filename, self.lineno).strip()
  File "cpython/Lib/linecache.py", line 16, in getline
lines = getlines(filename, module_globals)
  File "cpython/Lib/linecache.py", line 47, in getlines
return updatecache(filename, module_globals)
  File "cpython/Lib/linecache.py", line 137, in updatecache
lines = fp.readlines()
  File "cpython/Lib/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaa in position 4096: 
invalid start byte

This UnicodeDecodeError repeats couple more times and then everything stops. It 
doesn't seem to matter how the tests run, either directly or as part of a test 
suite.

--
components: Library (Lib), Tests
messages: 255953
nosy: SilentGhost, jnoller, sbt
priority: normal
severity: normal
status: open
title: test_multiprocessing_fork.test_mymanager fails and hangs
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-05 Thread Tal Einat

Tal Einat added the comment:

The entire test suite passes with the v2 patch on my OSX 10.10.

--

___
Python tracker 

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



[issue14285] Traceback wrong on ImportError while executing a package

2015-12-05 Thread Nick Coghlan

Nick Coghlan added the comment:

That import will only import the parent package (if there is one), not the 
module itself. Imports from __main__ will still happen during the exec call 
later on.

--

___
Python tracker 

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



[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-05 Thread Eryk Sun

Eryk Sun added the comment:

The mkdir method needs a fix similar to what was done for issue 25583. For 
example, currently on Windows the exist_ok option doesn't handle the 
PermissionError raised when [accidentally] trying to create the root directory:

>>> pathlib.Path('C:/').mkdir(exist_ok=True)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python 3.5\lib\pathlib.py", line 1199, in mkdir
self._accessor.mkdir(self, mode)
  File "C:\Program Files\Python 3.5\lib\pathlib.py", line 371, in wrapped
return strfunc(str(pathobj), *args)
PermissionError: [WinError 5] Access is denied: 'C:\\'

--
nosy: +eryksun

___
Python tracker 

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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2015-12-05 Thread Chiu-Hsiang Hsu

Changes by Chiu-Hsiang Hsu :


--
nosy: +wdv4758h

___
Python tracker 

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



[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f9a0ac60f876 by Ned Deily in branch '2.7':
Issue #25798: Update OS X 10.5+ 32-bit-only installer to build
https://hg.python.org/cpython/rev/f9a0ac60f876

New changeset 51a0dd6f7c73 by Ned Deily in branch '3.4':
Issue #25798: Update OS X 10.5+ 32-bit-only installer to build
https://hg.python.org/cpython/rev/51a0dd6f7c73

New changeset 02d2127fda6c by Ned Deily in branch '3.5':
Issue #25798: merge from 3.4
https://hg.python.org/cpython/rev/02d2127fda6c

New changeset 50a99be891bc by Ned Deily in branch 'default':
Issue #25798: merge from 3.5
https://hg.python.org/cpython/rev/50a99be891bc

--
nosy: +python-dev

___
Python tracker 

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



[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Thanks Bohuslav, and also to Hans for helping track this down.

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



[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-05 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay; let's leave things as is for 2.7.11.

It's fine to commit the update to the 2.7 branch. The release comes from
my private 2.7.11 release branch, so wouldn't include it.

On Sat, Dec 5, 2015, at 07:12, Steve Dower wrote:
> 
> Steve Dower added the comment:
> 
> I don't want to do it without running it through the buildbots at least.
> There's so much that can change just by rebuilding.
> 
> I'd love to say I have the time today to make the change and validate two
> separate versions before producing the releases, but I really don't.
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

No, what this piece of code shows is that trying to assign a value to a tuple 
element will cause an error. Of course, the same error would be raise when 
using the the value 12345, but it's more instructive to use a different value 
to not confuse the reader.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> 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



[issue25809] "Invalid" tests on locales

2015-12-05 Thread bapt

New submission from bapt:

the locale tests the return value of locale functions against known good values.

The problem is when those known good values becomes wrong because of an update 
of the locales.

For example in recent CLDR definition the french separator for thousands in a 
"non breaking space" and not a space, while it used to be a space.
On released FreeBSD (very old db) it was a space. On GNU libc (a more recent db 
but still old :)) it is a space.On FreeBSD 11 and Dragonfly 4.4 it is a fairly 
new db (v27.0.1) with the fixed separator: 0xa0!

Thant makes this test fail.

I have no idea on the way you would prefer to fix that, either remove the test 
(not sure it is really relevant in the python testsuite) or patch it.

https://hg.python.org/cpython/file/tip/Lib/test/test__locale.py#l70
the failures can be seen here:
http://buildbot.python.org/all/buildslaves/koobs-freebsd11

--
components: Tests
messages: 255964
nosy: bapt, haypo
priority: normal
severity: normal
status: open
title: "Invalid" tests on locales
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-05 Thread Eryk Sun

Changes by Eryk Sun :


--
nosy: +pitrou
versions: +Python 3.6

___
Python tracker 

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



[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread Ben Schreib

New submission from Ben Schreib:

The example given in section 5.3 shows an output of "t[0] = 8" but I 
believe it should be "t[0] = 12345"

>>> t
(12345, 54321, 'hello!')
>>> # Tuples may be nested:
... u = t, (1, 2, 3, 4, 5)
>>> u
((12345, 54321, 'hello!'), (1, 2, 3, 4, 5))
>>> # Tuples are immutable:
... t[0] = 8

--
assignee: docs@python
components: Documentation
messages: 255962
nosy: Ben Schreib, docs@python
priority: normal
severity: normal
status: open
title: The Python Tutorial 5.3. Tuples and Sequences
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



[issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE

2015-12-05 Thread Eryk Sun

Changes by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> subprocess failing in GUI applications on Windows

___
Python tracker 

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



[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests

2015-12-05 Thread Eryk Sun

Eryk Sun added the comment:

test_CTRL_C_EVENT can be removed from Lib/test/test_os.py. It's of no practical 
consequence. Ctrl+Break is always enabled in the child process, so 
test_CTRL_BREAK_EVENT should remain.

When using CREATE_NEW_PROCESS_GROUP, the child process is started with Ctrl+C 
disabled. Whether or not Ctrl+C is enabled in the parent process is irrelevant. 

An example that shows the intent of this creation flag is the /B (background) 
option of the cmd shell's "start" command. Ctrl+C from the user shouldn't 
interrupt such programs, so "start /B" uses the CREATE_NEW_PROCESS_GROUP 
creation flag. You can still kill the process with Ctrl+Break, assuming it 
hasn't installed a control handler that ignores CTRL_BREAK_EVENT instead of 
chaining to the default handler. 

For example:

C:\>start /b /w py -3
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37)
[MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import time
>>> import signal
>>> import ctypes
>>>
>>> _ = signal.signal(signal.SIGINT, lambda *a: print('^C'))
>>> _ = signal.signal(signal.SIGBREAK, lambda *a: print('^BREAK'))
>>>
>>> def test_ctrl_event(event):
... os.kill(os.getpid(), event)
... time.sleep(1)
...

>>> test_ctrl_event(signal.CTRL_BREAK_EVENT) # works
^BREAK
>>> test_ctrl_event(signal.CTRL_C_EVENT) # nothing

As this issue notes, the child process can use ctypes to manually enable Ctrl+C 
events for the current process:

>>> ctypes.windll.kernel32.SetConsoleCtrlHandler(None, 0)
1
>>> test_ctrl_event(signal.CTRL_C_EVENT) # works
^C

But this is contrived. You rarely have such control over the child process 
unless it's your own code, in which case there are far better IPC mechanisms 
available than to rely on the console host process (conhost.exe) as th arbiter 
of communication.

--
nosy: +eryksun
versions: +Python 3.6

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-05 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +lemburg, loewis

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

I see three options:

1. remove the French entry from the dict

2. enhance the test to accept multiple valid values

3. replace the French entry with a different locale that doesn't change the 
mapping often

--

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-05 Thread Zachary Ware

Changes by Zachary Ware :


--
keywords: +buildbot
nosy: +zach.ware
stage:  -> needs patch
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue25492] subprocess with redirection fails after FreeConsole

2015-12-05 Thread Eryk Sun

Changes by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> subprocess failing in GUI applications on Windows

___
Python tracker 

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



[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Err, sorry, it's actually PyDict_GetItem which is the problem. Basically
if you try to import with a very deep stack, doing PyDict_GetItem on
sys.modules can return NULL (fro copy_reg). That confuses import a lot.

I haven't exactly figured out why those tests cause failure. One of them
probably puts unicode strings in sys.modules.

On Sat, Dec 5, 2015, at 06:28, Barry A. Warsaw wrote:
> 
> Barry A. Warsaw added the comment:
> 
> On Dec 05, 2015, at 07:03 AM, Benjamin Peterson wrote:
> 
> >The underlying issue is classic: PyDict_SetItem returns NULL if the stack is
> >too deep. This confuses import.
> 
> Thanks for digging into this Benjamin.  I'm not able to investigate
> further
> atm, but could you please explain your analysis in more detail?  Where's
> the
> faulty setitem?  Where is import getting confused?  Why does this (or the
> combination I found before) cause the problem?
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Carol Willing

Carol Willing added the comment:

Ezio, Brett, Stephen: Would one of you be able to merge this? Thanks.

--

___
Python tracker 

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



[issue12923] test_urllib fails in refleak mode

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

All three patches look generally good to me. I left some comments on things I 
would change.

FTR the tests fail to raise any exception when the redirect limit is reached 
because FancyURLopener.http_error_default() does not raise an error. It just 
returns the last result as a synthesized error page.

--

___
Python tracker 

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



[issue25806] ResourceWarning in test_tasks

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

This could be the same as one of the messages listed in Issue 25272.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25806] ResourceWarning in test_tasks

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

Indeed it's one of those posted in the msg255490

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio tests are getting noisy

___
Python tracker 

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



[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Err, sorry, it's actually PyDict_GetItem which is the problem. Basically
if you try to import with a very deep stack, doing PyDict_GetItem on
sys.modules can return NULL (fro copy_reg). That confuses import a lot.

I haven't exactly figured out why those tests cause failure. One of them
probably puts unicode strings in sys.modules.

On Sat, Dec 5, 2015, at 06:28, Barry A. Warsaw wrote:
> 
> Barry A. Warsaw added the comment:
> 
> On Dec 05, 2015, at 07:03 AM, Benjamin Peterson wrote:
> 
> >The underlying issue is classic: PyDict_SetItem returns NULL if the stack is
> >too deep. This confuses import.
> 
> Thanks for digging into this Benjamin.  I'm not able to investigate
> further
> atm, but could you please explain your analysis in more detail?  Where's
> the
> faulty setitem?  Where is import getting confused?  Why does this (or the
> combination I found before) cause the problem?
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

I think this is the case where hard-coded strings where not updated in the C 
files.

--
nosy: +SilentGhost
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832

random832 added the comment:

Oh, I just noticed, the help string is also wrong in 3.5 (which explains why 
you removed 3.5 from the versions list, which I hadn't noticed until after 
posting my previous comment).

--

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

I'm not sure how the people are supposed to discover this convention according 
to pep 436. Or is this now intended as two separate incompatible conventions 
for online docs and built-in help?

--

___
Python tracker 

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



[issue25812] locale.nl_langinfo() can't decode value

2015-12-05 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, 'uk_UA')
'uk_UA'
>>> locale.getlocale(locale.LC_NUMERIC)
('uk_UA', 'KOI8-U')
>>> locale.nl_langinfo(locale.THOUSEP)
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'locale' codec can't decode byte 0x9a in position 0: 
Invalid or incomplete multibyte or wide character

Looks as locale.nl_langinfo() always uses the UTF-8 encoding (or may be 
locale.getpreferredencoding()).

--
components: Library (Lib)
messages: 255979
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: locale.nl_langinfo() can't decode value
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

See Issue 23738 where my current patch proposes using the PEP 457 slash (/) 
notation in the RST documentation, including for eval(). I’m not sure if there 
is a clear concensus for applying my patch however. An alternative would be to 
use the square-bracket notation, and explain in the text that the default 
values are None.

See also Issue 21314 about explaining the slash notation used by Argument 
Clinic and pydoc.

--
nosy: +martin.panter
versions:  -Python 3.2, Python 3.3

___
Python tracker 

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



[issue25529] Provide access to the validated certificate chain in ssl module

2015-12-05 Thread rugk

rugk added the comment:

Oops, forgot a word:
*"seems to have until now" to "seems to have replied until now"

--

___
Python tracker 

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



[issue25529] Provide access to the validated certificate chain in ssl module

2015-12-05 Thread rugk

rugk added the comment:

Very nice idea. But no developer/maintainer seems to have until now, so I'll 
just like to ask whether there are any news regarding this issue.

--
nosy: +rugk

___
Python tracker 

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



[issue23962] Incorrect TimeoutError referenced in concurrent.futures documentation

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

A similar problem used to exist with asyncio.TimeoutError: Issue 21376.

There is no class called concurrent.future.Error, so I would remove that bit. 
Otherwise, the rest of the patch looks worthwhile.

With asyncio and multiprocessing, the exception name is spelt out in full, 
including the module prefix. Maybe it could also be done here to be less 
ambiguous. When reading it with an ordinary web browser, you don’t get to see 
the target of the hyperlinks. On the other hand, a full 
“concurrent.futures.TimeoutError” is rather long and unwieldy. I’m not sure.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832

random832 added the comment:

What about fixing all methods so that they can take keywords? Are the functions 
with their current C signatures part of the stable ABI? Is there somewhere we 
could centrally add some magic "convert tuple+keywords to tuple, given list of 
names" code?

--

___
Python tracker 

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



[issue25777] Misleading descriptions in docs about invoking descriptors.

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Similar change needed for 
. 
There, it uses the noun “binding”, which seems an appropriate description of 
the action.

--

___
Python tracker 

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



[issue25715] Python 3.5.1 installer shows wrong upgrade path

2015-12-05 Thread Larry Hastings

Larry Hastings added the comment:

Fixed in 3.5.1 final.

--
resolution:  -> fixed
stage: needs patch -> 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



[issue25709] Problem with string concatenation and utf-8 cache.

2015-12-05 Thread Larry Hastings

Larry Hastings added the comment:

I cherry-picked this for 3.5.1.

--

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

See Issue 8706 about changing functions and methods to accept keyword 
arguments. But this cannot be done in general. What would you call the first 
argument to dict() such that all possible keyword arguments still work? What is 
the first range() argument called: start or stop?

--

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2015-12-05 Thread Martin Panter

Changes by Martin Panter :


--
dependencies: +Python 3 documentation for eval is incorrect

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-05 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-05 Thread Larry Hastings

Larry Hastings added the comment:

I'm not going to hold up 3.5.1 for this.

--
priority: release blocker -> high

___
Python tracker 

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



[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-05 Thread Larry Hastings

Larry Hastings added the comment:

I don't agree that a reference cycle counts as a release blocker.

--
nosy: +larry
priority: release blocker -> normal

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Here is a more conservative patch using square brackets, and documenting the 
defaults in the text. I updated all the documentation from my previous patch, 
and added new changes for the “io” module.

One quirk was that BufferedReader.read1() does not actually support the value 
−1. Therefore I changed the base class to BufferedIOBase.read1([size]) without 
mentioning what happens when size is omitted. Related: Issue 23214.

--
Added file: http://bugs.python.org/file41253/square-brackets.patch

___
Python tracker 

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



[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This may be related to issue9917.

--

___
Python tracker 

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



[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Here is an updated patch for Python 3.

I did not remove the “lost sys.stderr” check I mentioned earlier, because the 
implementation still needs it to call flush().

Changes compared to Michael’s patch:

* Added a test for input() using a pseudoterminal and subprocess.Popen
* Write to the passed-in sys_stdout parameter, not the global stdout
* Continue to call fflush(stderr), to avoid regressions with buffered stderr 
messages
* Updated /Parser/pgenmain.c to use sys_stdout

I also had to update test_cmd_line_script, which expected the prompt to be on 
stderr. This made me wonder if it is a good idea to change where the 
interpreter prompt (>>>) goes in a bugfix release. AFAIK it is not documented, 
and it could potentially break other things that use the interactive 
interpreter. What do people think? A way to avoid this might be to pass stderr 
as the sys_stdout parameter.

Also, it would be awesome if someone could try my new test_builtins test case 
on BSD or OS X. I only tested it with Linux. The last time I messed with 
pseudoterminals like this I caused the tests to hang on BSD buildbots.

--
stage: test needed -> patch review
Added file: http://bugs.python.org/file41246/promptOutputFix3.v2.patch

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-05 Thread Brett Cannon

Brett Cannon added the comment:

Serhiy's latest patch LGTM.

--
assignee: brett.cannon -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

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



[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Benjamin! This stably reproduce the issue. Just wondering how you 
found this minimal sequence?

--

___
Python tracker 

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



[issue25801] ResourceWarning in test_zipfile64

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The purpose was to exclude it from run with -uall. It is norm if one or two 
test methods are needed the "largefile" flag. But if all methods in a test file 
create large files, running this test file becomes a pain.

--

___
Python tracker 

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



[issue25804] Make Profile.print_stats support sorting by mutiple values

2015-12-05 Thread Chiu-Hsiang Hsu

New submission from Chiu-Hsiang Hsu:

Currently, the result of profile.run can not easily sort by mutiple values with 
"sort" keyword argument. Following code will work with this patch.

>>> import cProfile
>>> cProfile.run('42**42', sort=('tottime', 'stdname'))
 3 function calls in 0.000 seconds

   Ordered by: internal time, standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 {built-in method builtins.exec}
10.0000.0000.0000.000 :1()
10.0000.0000.0000.000 {method 'disable' of 
'_lsprof.Profiler' objects}

>>> import cProfile
>>> cProfile.run('42**42', sort=('tottime', 'stdname'))
 3 function calls in 0.000 seconds

   Ordered by: internal time, standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 {built-in method builtins.exec}
10.0000.0000.0000.000 :1()
10.0000.0000.0000.000 {method 'disable' of 
'_lsprof.Profiler' objects}


>>> import profile
>>> profile.run('42**42', sort=('tottime', 'stdname'))
 4 function calls in 0.000 seconds

   Ordered by: internal time, standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 profile:0(42**42)
10.0000.0000.0000.000 :0(exec)
10.0000.0000.0000.000 :0(setprofile)
10.0000.0000.0000.000 :1()
00.000 0.000  profile:0(profiler)

--
components: Library (Lib)
files: print_stats.patch
keywords: patch
messages: 255935
nosy: wdv4758h
priority: normal
severity: normal
status: open
title: Make Profile.print_stats support sorting by mutiple values
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41247/print_stats.patch

___
Python tracker 

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



[issue25755] Test test_property failed if run twice

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Or move the definition of the class to testing method.

--

___
Python tracker 

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



[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

I am inclined to just skip the test on OS X, unless some OS X angel wants to 
help me investigate this :)

@skipIf(sys.platform == "darwin", "setrlimit() seems to fail on OS X")

--

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832

random832 added the comment:

I guess the next question is what the intent is. Was there an intent, which was 
not followed through on, to upgrade these methods to support keyword arguments? 
Or is there an intent (here and everywhere) that documentation using keyword 
argument syntax is appropriate to use to document methods that have default 
values but do not in fact support keyword arguments? What does the "/" in the 
help text mean?

According to PEP 0436 (Argument Clinic), the "/" here indicates that the 
preceding parameters are positional-only, despite the apparent use of keyword 
syntax. Should this convention also be used in the documentation?

--

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Originally the case for French was 'fr_FR': (',', ''). '' means "unknown" value 
and is not tested. We can return this value to omit test for thousand 
separator, or remove the French locale at all.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25768] compileall functions do not document or test return values

2015-12-05 Thread Nicholas Chammas

Nicholas Chammas added the comment:

Absolutely. I'll add a "bad source file" to `setUp()` [0] and check return 
values as part of the existing checks in `test_compile_files()` [1].

Does that sound like a good plan to you?

Also, I noticed that `compile_path()` has no tests. Should I test it as part of 
`test_compile_files()` or as part of a different test function?

[0] https://hg.python.org/cpython/file/tip/Lib/test/test_compileall.py#l14
[1] https://hg.python.org/cpython/file/tip/Lib/test/test_compileall.py#l57

--

___
Python tracker 

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



[issue25801] ResourceWarning in test_zipfile64

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Patch looks fine according to my limited understanding of the zipfile module.

--

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Andre Roberge

New submission from Andre Roberge:

The documentation for eval() indicates that it takes keyword arguments:

eval(expression, globals=None, locals=None)

However, that is incorrect, as indicated by the builtin help:

>>> help(eval)
Help on built-in function eval in module builtins:

eval(...)
eval(source[, globals[, locals]]) -> value

--
assignee: docs@python
components: Documentation
messages: 255969
nosy: aroberge, docs@python
priority: normal
severity: normal
status: open
title: Python 3 documentation for eval is incorrect
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> needs patch

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +larry

___
Python tracker 

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



[issue25811] return from random.shuffle

2015-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agreed with all Emanuel has said.

--
nosy: +serhiy.storchaka
resolution:  -> rejected
stage:  -> 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



[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-05 Thread desbma

desbma added the comment:

Thank you SilentGhost for the second review on the v4 patch.

Attached is the v5 patch which hopefully is getting even better.

--
Added file: http://bugs.python.org/file41252/issue25156_v5.patch

___
Python tracker 

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



[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

No further comments from me. I haven't run the test, but I trust it passes 
without any warnings.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832

random832 added the comment:

Whatever the case may be, it *doesn't* support keyword arguments. e.g.:

>>> eval("a+b", globals={'a':1}, locals={'b':2})
TypeError: eval() takes no keyword arguments

So as the current situation stands, the documentation is wrong, and the help 
string is consistent with the code's actual behavior. Confirmed in Python 3.5.0.

--
nosy: +random832
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



[issue25811] return from random.shuffle

2015-12-05 Thread Eugene Yunak

New submission from Eugene Yunak:

random.shuffle operates on a list, and changes it in place. I think returning a 
reference to this list, the same one we got in as the argument, is quite useful 
and makes it possible to use random.shuffle in chained function calls, e.g.:

somelist.append(''.join(shuffle(list('hello'
[i for i in shuffle(list(range(10))) if i%2]

I don't see any good arguments against this, and I couldn't think of a 
reasonable test for this — is it necessary to test whether the returned 
reference is the same as the one passed in?

I'm open to any discussion or suggestions you might have.

--
components: Library (Lib)
files: shuffle_return.patch
keywords: patch
messages: 255971
nosy: Eugene Yunak
priority: normal
severity: normal
status: open
title: return from random.shuffle
type: enhancement
Added file: http://bugs.python.org/file41251/shuffle_return.patch

___
Python tracker 

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



[issue25811] return from random.shuffle

2015-12-05 Thread Emanuel Barry

Emanuel Barry added the comment:

While I do see the desire to get your list back for such cases (I would have 
liked so, too, in some cases), it's inconsistent, as everything else operating 
in-place returns None.

Plus, having it return None helps you remember that you should keep the 
reference to your list around. What's more, making it return a value will often 
make newbies believe that they're two separate lists, and then wonder why the 
first one was shuffled too.

This is error-prone, and these arguments are why it returns None. It has been 
discussed in the past -- See 
http://stackoverflow.com/questions/17649875/why-does-random-shuffle-return-none 
which is related to your issue, and 
http://stackoverflow.com/questions/240178/python-list-of-lists-changes-reflected-across-sublists-unexpectedly
 to see what I mean by confused newbies.

--
nosy: +ebarry

___
Python tracker 

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



[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

Yes, whatever Andre's posted is not an output from 3.5. It's 3.4 or earlier.

Also it's a wider problem because the same issue exists for exec: built-in help 
shows keyword arguments, while docs and implementation require only positional.

--
versions: +Python 3.6

___
Python tracker 

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



[issue25813] co_flags section of inspect module docs out of date

2015-12-05 Thread Mark Lawrence

New submission from Mark Lawrence:

It states "bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg" which is 
identical to the 2.7 docs.  Hence it bears no resemblance to the latest code.h, 
which for example has #define CO_ITERABLE_COROUTINE   0x0100.

--
assignee: docs@python
components: Documentation
messages: 255985
nosy: BreamoreBoy, docs@python
priority: normal
severity: normal
status: open
title: co_flags section of inspect module docs out of date
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2015-12-05 Thread Rose Ames

Changes by Rose Ames :


--
nosy: +superluser

___
Python tracker 

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



[issue14285] Traceback wrong on ImportError while executing a package

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

init-ancestor.2.patch implements the single __import__ with ImportError.name 
checking

--
Added file: http://bugs.python.org/file41254/init-ancestor.2.patch

___
Python tracker 

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



[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 20ea1b0e by Martin Panter in branch '3.5':
Issue #25717: Tolerate fstat() failures in the FileIO constructor
https://hg.python.org/cpython/rev/20ea1b0e

New changeset 8c978cbe057c by Martin Panter in branch 'default':
Issue #25717: Merge fstat() fix from 3.5
https://hg.python.org/cpython/rev/8c978cbe057c

--
nosy: +python-dev

___
Python tracker 

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



[issue14285] Traceback wrong on ImportError while executing a package

2015-12-05 Thread Martin Panter

Martin Panter added the comment:

Yes, the package is all we need to import. I understand this bug is all about 
importing the parent package, and not __main__. If you read the original 
report, it is __init__.py that is trying to import a missing module.

--

___
Python tracker 

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



[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-05 Thread Yury Selivanov

Yury Selivanov added the comment:

This cycle leads to infinite unbreakable loop in cpython c internals.

Sent from my iPhone

> On Dec 5, 2015, at 7:44 PM, Larry Hastings  wrote:
> 
> 
> Larry Hastings added the comment:
> 
> I don't agree that a reference cycle counts as a release blocker.
> 
> --
> nosy: +larry
> priority: release blocker -> normal
> 
> ___
> Python tracker 
> 
> ___

--
nosy: +Yury.Selivanov

___
Python tracker 

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