[issue16113] Add SHA-3 (Keccak) support

2012-10-02 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - needs patch

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



[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-02 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The error message in the FileNotFoundError error raised by subprocess.Popen() 
displays the wrong path when the bad path is due to the executable argument 
rather than args.  The message gives the path for args[0] rather than for the 
executable argument.

For example, this--

import subprocess, sys
python_path = sys.executable
p = subprocess.Popen([python_path, -c, import sys; sys.exit(1)])
p.wait()
p = subprocess.Popen([python_path, -c, import sys; sys.exit(1)],
 executable=foo)
p.wait()

gives--

Traceback (most recent call last):
  File test-subprocess.py, line 6, in module
executable=foo)
  File .../Lib/subprocess.py, line 818, in __init__
restore_signals, start_new_session)
  File .../Lib/subprocess.py, line 1416, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '.../python.exe'

The path in the last line should read foo since '.../python.exe' is obviously 
found as evidenced from the previous Popen() invocation.

--
components: Library (Lib)
messages: 171850
nosy: asvetlov, chris.jerdonek
priority: normal
severity: normal
stage: test needed
status: open
title: incorrect path in subprocess.Popen() FileNotFoundError message
type: behavior
versions: Python 3.3, Python 3.4

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



[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-02 Thread Chris Jerdonek

Chris Jerdonek added the comment:

2.7 is not affected because 2.7 makes no attempt to display the path:

OSError: [Errno 2] No such file or directory

--
versions: +Python 3.2

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



[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-02 Thread Chris Jerdonek

Chris Jerdonek added the comment:

It looks like the error is here:

if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
if errno_num != 0:
err_msg = os.strerror(errno_num)
if errno_num == errno.ENOENT:
err_msg += ': ' + repr(args[0])
raise child_exception_type(errno_num, err_msg)
raise child_exception_type(err_msg)

http://hg.python.org/cpython/file/b40025e37bcd/Lib/subprocess.py#l1415

The args[0] should be executable when appropriate.

--

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



[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-02 Thread Charles-François Natali

Charles-François Natali added the comment:

 since Antonie mentioned Py_AddPendingCall I came up with a patch describing 
 what he proposed.

 Let me know if this patch can be improved or discarded(if the problem 
 requires a more sophisticated solution). In case of improvement I can also 
 submit another patch with a test case.

Why limit to EBADF? You could also have EPIPE, EINVAL and many other errors.
The only error you may not want to report is EAGAIN.

--

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



[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-02 Thread Charles-François Natali

Charles-François Natali added the comment:

 I agree with Felipe that issues here can be difficult to diagnose. For 
 example the fd could get mistakingly closed, but the write() EBADF would then 
 be ignored and the expected signal wakeups would be lost.

Yeah, but it's also completely possible that the saved fd now points
to another file descriptor, and you end up corrupting a file, without
getting any error at all, and not getting signal wakeups. This API is
really fragile and dangerous, and warrants care anyway...

--

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



<    1   2