[issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al).

2012-10-03 Thread GOGER Valentin Eugen

GOGER Valentin Eugen added the comment:

Hello
On AIX 64bit (see http://bugs.python.org/issue6600) you should add in CFLAGS  
-U__STR__ to bypass xlc(_r) define/inlining issue.

--
nosy: +gix

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



[issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al).

2012-10-03 Thread GOGER Valentin Eugen

Changes by GOGER Valentin Eugen gixgo...@yahoo.com:


--
versions: +Python 2.6, Python 2.7

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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-03 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The executable argument to Popen() takes precedence over args[0] when the 
executable argument is provided.  The test suite should include a test of this 
that runs on all systems.  The test suite does not currently include such a 
test.  This test is a precursor to more specific, platform-specific tests that 
will be added for issue 16114.

--
assignee: chris.jerdonek
components: Library (Lib)
keywords: easy
messages: 171856
nosy: asvetlov, chris.jerdonek
priority: normal
severity: normal
stage: test needed
status: open
title: test that executable arg to Popen() takes precedence over args[0] arg
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16115
___
___
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-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Adding issue 16115 as a dependency so that the more general case can be settled 
and committed before dealing with the current issue's more specific (and 
platform-specific) case.

--
dependencies: +test that executable arg to Popen() takes precedence over 
args[0] arg

___
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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 662fb4bd5f84 by Nick Coghlan in branch '2.7':
Issue #12947: Add a note to doctest until the example rendering is fixed
http://hg.python.org/cpython/rev/662fb4bd5f84

--
nosy: +python-dev

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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 679b3e3aadae by Nick Coghlan in branch '3.3':
Issue #12947: Add a note to doctest until the example rendering is fixed
http://hg.python.org/cpython/rev/679b3e3aadae

--

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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Nick Coghlan

Nick Coghlan added the comment:

Since the status quo is thoroughly confusing for readers, I added an explicit 
note before the affected examples. That note should be removed once the 
rendering problem is fixed. (The note is there on trunk as well, I just forgot 
to include the issue number in the merge commit)

--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12947
___
___
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-03 Thread STINNER Victor

STINNER Victor added the comment:

A signal handler can be called anymore, anywhere. How do you handle such
exception in an application? handle: do something better than exit the
apllication.

--

___
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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I thought of an easy work-around we can use after looking at the changeset 
Terry referenced above:

 [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef

At the expense of pretty color highlighting, we can enable Pygments' TextLexer 
for the affected examples (aka null lexer).  For example--

.. code-block:: text

raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL
   Traceback (most recent call last):
   CustomError: message

I confirmed locally that this works.  I realized this might work because the 
Sphinx changeset referenced above has this logic:

# trim doctest options if wanted
if isinstance(lexer, PythonConsoleLexer) and self.trim_doctest_flags:

--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Michele Orrù

Michele Orrù added the comment:

Patch + unittests + documentation attached.

$ ./python -m test -R 3:2 test_builtin
[1/1] test_builtin
beginning 5 repetitions
12345
.
1 test OK.
[158296 refs]

--
keywords: +patch
nosy: +maker
Added file: http://bugs.python.org/file27395/issue13290.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13290
___
___
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-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Attaching proposed tests.

--
keywords: +patch
stage: test needed - needs patch
Added file: http://bugs.python.org/file27396/issue-16114-1-tests-default.patch

___
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-03 Thread STINNER Victor

STINNER Victor added the comment:

 A signal handler can be called anymore, anywhere.

Oopos: anywhere/anytime.

--

___
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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 18d927fb8671 by Nick Coghlan in branch '2.7':
Issue #12947: Better workaround for the problem with doctest directives being 
stripped from code examples that are intended to illustrate those directives
http://hg.python.org/cpython/rev/18d927fb8671

--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I added some comments in Rietveld.

ReST documentation should be updated too.

vars() returns modifiable dict. The patch should be much harder if we want to 
preserve this behavior. Otherwise, the difference must be explicitly documented.

--
nosy: +storchaka
versions: +Python 3.4 -Python 3.3

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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d93a59a0a984 by Nick Coghlan in branch '3.3':
Issue #12947: Better workaround for the problem with doctest directives being 
stripped from code examples that are intended to illustrate those directives
http://hg.python.org/cpython/rev/d93a59a0a984

New changeset 26200f535296 by Nick Coghlan in branch 'default':
Merge #12947 workaround from 3.3
http://hg.python.org/cpython/rev/26200f535296

--

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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Nick Coghlan

Nick Coghlan added the comment:

Adopted Chris's workaround for now. I kept a reworded version of the preceding 
note (with the link to this bug), so readers know that the lack of syntax 
highlighting is intended-but-not-desired.

--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There's another thing. __slots__ value is converted to a tuple and saved as 
ht_slots field in PyHeapTypeObject. You can use fast PyTuple_GET_ITEM() for 
item access.

--

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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks, Nick.  It looks like there are a few more though?  I'm counting four 
more in default (search for doctest:): three IGNORE_EXCEPTION_DETAIL and one 
ELLIPSIS.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12947
___
___
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-03 Thread Charles-François Natali

Charles-François Natali added the comment:

 A signal handler can be called anymore, anywhere. How do you handle such
 exception in an application? handle: do something better than exit the
 apllication.

Well, chances are you won't, but failing with an explicit error
message is better than silently failing to deliver signals (which may
result in a deadlock, for example).

--

___
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



[issue12370] Use of super overwrites use of __class__ in class namespace

2012-10-03 Thread Nick Coghlan

Nick Coghlan added the comment:

Carsten: emulating __class__ is necessary to implement proxy types (and similar 
utilities like mock objects) correctly. The difference between x.__class__ is 
that proxies can remap it to the type of the referent, while type(x) will 
always report the real class of x (which may be a proxy like weakref.proxy, 
or a mock object, as it is in the case Michael is interested in).

Mark: correct, the problem is that the compiler is treating *all* references to 
__class__ inside a class body as references to the cell variable, when it 
should really only be doing that for references inside methods - references 
directly at the class body level should still be to the entry in the class 
locals namespace that later become attributes of the class object. Hence my 
idea of introducing a separate closure namespace encapsulating the class 
namespace to separate the two more cleanly than the current hacky override.

--

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



[issue12947] doctest directive examples in library/doctest.html lack the flags

2012-10-03 Thread Nick Coghlan

Nick Coghlan added the comment:

I only changed the ones that were specifically in the section explaining 
doctest directives. There are probably others, but it didn't seem necessary to 
change them and lose the syntax highlighting at this point.

--

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-03 Thread Masami HIRATA

New submission from Masami HIRATA:

I'm trying to install C extension modules inside a venv.
It works outside a venv and inside a virtualenv-1.8.2 but breaks inside the 
venv.

OS: Windows 7 Starter Edition SP1 (32-bit)
Python: 3.3.0 (python-3.3.0.msi)
Compiler: Microsoft Visual C++ 2010 Express SP1

--
components: Library (Lib)
files: Python33_with_venv.txt
messages: 171875
nosy: msmhrt
priority: normal
severity: normal
status: open
title: Can not install C extension modules to inside a venv on Python 3.3.0 for 
Win32
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file27397/Python33_with_venv.txt

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-03 Thread Masami HIRATA

Changes by Masami HIRATA msm...@gmail.com:


Added file: http://bugs.python.org/file27398/Python33_with_virtualenv.txt

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-03 Thread Masami HIRATA

Changes by Masami HIRATA msm...@gmail.com:


Added file: http://bugs.python.org/file27399/Python33_without_venv.txt

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



[issue16117] python2.7.3 struct misaligned when returned

2012-10-03 Thread Roland Lezuo

New submission from Roland Lezuo:

class Int(ctypes.Structure):
   _fields_ = [ (_i, ctypes.c_uint64),
   (undef, ctypes.c_bool)]

class Int {
public:
Int();
Int(uint64_t i);

uint64_t _i;
bool undef;
};

extern C Int foo(const Int a , const Int b , const Int c)
{
ret = ...
return Int(ret);
}

(gdb) p ret
$3 = 16
(gdb) fin
Run till exit from #0  BVSignExtend (a=..., b=..., c=...) at foo.hpp:130
0x7784eea4 in ffi_call_unix64 () from 
/usr/lib/python2.7/lib-dynload/_ctypes.so
Value returned is $4 = {_i = 18577824, undef = 16}

My guess: The value 18577824 was not expected to be on the stack.

The following actions solve the problem:

1) add another int the class Int (after bool) and adopt _fields_ accordingly.
2) in foo C++ function:
   Int reti = Int(ret);
   return reti;

Because of the above solutions I strongly suspect a bug in ctypes.

--
components: ctypes
messages: 171876
nosy: iroli
priority: normal
severity: normal
status: open
title: python2.7.3 struct misaligned when returned
versions: Python 2.7

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



[issue8800] add threading.RWLock

2012-10-03 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

I admit that I kind of like Java's approach to this.  First off, they define an 
interface, ReadWriteLock:
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/locks/ReadWriteLock.html
There, they also discuss the different choices an implementation of the 
interface can make, regarding a) policy, b) reentrancy, c) upgrading or 
downgrading.
A concrete implemention is then presented in the form of the 
ReentrantReadWriteLock, with documented behaviour for the above.
The rest of threading is also, as previously pointed out, more or less a 
rip-off from Java.

Since there is no single correct choice for the above, and since the 
implementation restrictions are different between inter-process and 
inter-thread locks, it would make sense to adopt a similar model, where a 
RWLock() function is a factory function, taking an argument specify a desired 
class of locks.

The policies that have been seen in this thread are:
a) greedy policy (no policy)
b) writer preference
c) 'Fair' (or in-order) preference.
All have their benefits and disadvantages.

We have also seen recursive and nonrecursive.

The restrictions appear more serious in the inter-process case since I don't 
know if it is possible to maintain a shared dynamic array of thread ids across 
processes.

--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

The patch does not seem to walk the mro to look for slots in base classes.  
Also, an instance with a __dict__ attribute may also have attributes stored in 
slots.

BTW, copyreg._slotnames(cls) properly calculates the slot names for cls and 
tries to cache them as cls.__slotnames__.  Pickle does the equivalent of

try:
slotnames = cls.__slotnames__
except AttributeError:
slotnames = copyreg._slotnames(cls)

--
nosy: +sbt

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



[issue16118] Implement SHA-3

2012-10-03 Thread Jesús Cea Avión

New submission from Jesús Cea Avión:

We have a #sha3 winner!! Keccak - https://en.wikipedia.org/wiki/Keccak

--
components: Extension Modules
messages: 171879
nosy: jcea
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement SHA-3
type: enhancement
versions: Python 3.4

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



[issue15786] IDLE code completion window does not scoll/select with mouse

2012-10-03 Thread suddha sourav

suddha sourav added the comment:

Thank you for the hint, Roger! On my side, I have changed the
HIDE_SEQUENCES tuple to (Key-Escape,) and it is giving me the behaviour
I desired. However, I am not sure if this is a fix of the real issue.

I tried IDLE on OpenSUSE 12.2 last night and faced the problem in its other
manifestation, which you describe.

Thank you again tor the quick feedback!

--

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



[issue16117] python2.7.3 struct misaligned when returned

2012-10-03 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson, meador.inge

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



[issue16118] Implement SHA-3

2012-10-03 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
superseder:  - Add SHA-3 (Keccak) support

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



[issue16118] Implement SHA-3

2012-10-03 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
resolution:  - duplicate
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16118
___
___
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-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2012-10-03 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2012-10-03 Thread koobs

koobs added the comment:

Incase it helps at all, I'm seeing the test failure preparing for adding 
python33 to the FreeBSD ports tree. 

On FreeBSD 9.0-RELEASE-p3 (amd64), with /etc/hosts configured as follows:

::1 localhost.domain localhost
127.0.0.1   localhost.domain localhost

The following is returned:

 socket.getaddrinfo('localhost', 80, 0, socket.SOCK_STREAM, 0, 
 socket.AI_ADDRCONFIG)
[(2, 1, 6, '', ('127.0.0.1', 80)), (28, 1, 6, '', ('::1', 80, 0, 0))]


--
nosy: +koobs

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-03 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
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



[issue16113] Add SHA-3 (Keccak) support

2012-10-03 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

We have MD5, SHA1, sha256, sha512 implemented, to use when openssl is not 
available. Can we do the same with sha-3?. I would suggest to adopt the 
reference implementation without extensive optimizations, since we will have 
them when openssl has them.

So we might implement SHA-3 now and integrate OpenSSL implementation later, 
when available. This is interesting, for instance, because many users of Python 
3.4 will have a non up to date OpenSSL system library.

--

___
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



[issue8800] add threading.RWLock

2012-10-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Multiprocessing:  Because there is no way I know to share a list of 
 owning thread ids, this version is more limited

Why do you need a *shared* list?  I think it should be fine to use a 
per-process list of owning thread ids.   So the current thread owns the lock if 
and only if it is in the current process's list of owners.

(On Unix you should probably clear the list when you fork by using 
multiprocessing.util.register_after_fork() in the initializer.)

--

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



[issue15786] IDLE code completion window does not scroll/select with mouse

2012-10-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
title: IDLE code completion window does not scoll/select with mouse - IDLE 
code completion window does not scroll/select with mouse

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



[issue16119] Python 2.7 IDLE not working in WinVista

2012-10-03 Thread Spiros K.

New submission from Spiros K.:

Hello.

I intalled EPD Free 7.3-2 WIN x86 a few hours ago and idle script doesn't work. 
When i try to run IDLE from cmd (c:\Python27\Lib\idlelibidle.py) i take the 
following output:

Traceback (most recent call last):
  File C:\Python27\Lib\idlelib\idle.py, line 10, in module
import idlelib.PyShell
  File C:\Python27\Lib\idlelib\PyShell.py, line 9, in module
import socket
  File C:\Python27\Lib\socket.py, line 47, in module
import _socket
ImportError: DLL load failed: ─ίΊ ▐ΪάΊ ϊΫΊάΪⁿ Ίά ίΊΪΎΏώ≤Ϊί▀ ύ ΆάϋΎ±ώ≤Ή▌Ίύ ΉΎΊ▄ϊά
.

My operating system is WinVista HomePremium SP2. Is there any way to solve this 
problem?

--
components: IDLE
messages: 171884
nosy: sk7
priority: normal
severity: normal
status: open
title: Python 2.7 IDLE not working in WinVista
type: behavior
versions: Python 2.7

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



[issue11245] Implementation of IMAP IDLE in imaplib?

2012-10-03 Thread Gereon Kremer

Gereon Kremer added the comment:

We have implemented this functionality according to RFC 2177.
We actually implemented a synchronous idle function that blocks until a timeout 
occurs or the server sent some event.

This is not the most flexible way, however it will provide a basic 
functionality that enables user to use imap idle based notifications.
Besides, every other solution would require threads or regular polling.

See attached patch file.

--
keywords: +patch
nosy: +nafur
Added file: http://bugs.python.org/file27400/imapidle.patch

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



[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added patches for 2.7 and 3.2.

--
Added file: http://bugs.python.org/file27401/long_aslong_overflow-3.2.patch
Added file: http://bugs.python.org/file27402/long_aslong_overflow-2.7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15989
___diff -r 0f4d4f4db724 Include/longobject.h
--- a/Include/longobject.h  Wed Oct 03 03:16:42 2012 +0200
+++ b/Include/longobject.h  Wed Oct 03 10:12:33 2012 +0300
@@ -26,6 +26,9 @@
 PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *);
 PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
 PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(int) _PyLong_AsInt(PyObject *);
+#endif
 PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
 
 /* It may be useful in the future. I've added it in the PyInt - PyLong
diff -r 0f4d4f4db724 Modules/_ctypes/stgdict.c
--- a/Modules/_ctypes/stgdict.c Wed Oct 03 03:16:42 2012 +0200
+++ b/Modules/_ctypes/stgdict.c Wed Oct 03 10:12:33 2012 +0300
@@ -335,7 +335,7 @@
 
 isPacked = PyObject_GetAttrString(type, _pack_);
 if (isPacked) {
-pack = PyLong_AsLong(isPacked);
+pack = _PyLong_AsInt(isPacked);
 if (pack  0 || PyErr_Occurred()) {
 Py_XDECREF(isPacked);
 PyErr_SetString(PyExc_ValueError,
diff -r 0f4d4f4db724 Modules/_io/_iomodule.c
--- a/Modules/_io/_iomodule.c   Wed Oct 03 03:16:42 2012 +0200
+++ b/Modules/_io/_iomodule.c   Wed Oct 03 10:12:33 2012 +0300
@@ -303,7 +303,8 @@
 int text = 0, binary = 0, universal = 0;
 
 char rawmode[5], *m;
-int line_buffering, isatty;
+int line_buffering;
+long isatty;
 
 PyObject *raw, *modeobj = NULL, *buffer = NULL, *wrapper = NULL;
 
@@ -441,12 +442,12 @@
 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
 {
 struct stat st;
-long fileno;
+int fileno;
 PyObject *res = PyObject_CallMethod(raw, fileno, NULL);
 if (res == NULL)
 goto error;
 
-fileno = PyLong_AsLong(res);
+fileno = _PyLong_AsInt(res);
 Py_DECREF(res);
 if (fileno == -1  PyErr_Occurred())
 goto error;
diff -r 0f4d4f4db724 Modules/_io/fileio.c
--- a/Modules/_io/fileio.c  Wed Oct 03 03:16:42 2012 +0200
+++ b/Modules/_io/fileio.c  Wed Oct 03 10:12:33 2012 +0300
@@ -240,7 +240,7 @@
 return -1;
 }
 
-fd = PyLong_AsLong(nameobj);
+fd = _PyLong_AsInt(nameobj);
 if (fd  0) {
 if (!PyErr_Occurred()) {
 PyErr_SetString(PyExc_ValueError,
diff -r 0f4d4f4db724 Modules/_sqlite/connection.c
--- a/Modules/_sqlite/connection.c  Wed Oct 03 03:16:42 2012 +0200
+++ b/Modules/_sqlite/connection.c  Wed Oct 03 10:12:33 2012 +0300
@@ -861,7 +861,7 @@
 rc = SQLITE_DENY;
 } else {
 if (PyLong_Check(ret)) {
-rc = (int)PyLong_AsLong(ret);
+rc = _PyLong_AsInt(ret);
 } else {
 rc = SQLITE_DENY;
 }
@@ -1289,7 +1289,7 @@
 goto finally;
 }
 
-result = PyLong_AsLong(retval);
+result = _PyLong_AsInt(retval);
 if (PyErr_Occurred()) {
 result = 0;
 }
diff -r 0f4d4f4db724 Modules/grpmodule.c
--- a/Modules/grpmodule.c   Wed Oct 03 03:16:42 2012 +0200
+++ b/Modules/grpmodule.c   Wed Oct 03 10:12:33 2012 +0300
@@ -85,7 +85,7 @@
 grp_getgrgid(PyObject *self, PyObject *pyo_id)
 {
 PyObject *py_int_id;
-unsigned int gid;
+long gid;
 struct group *p;
 
 py_int_id = PyNumber_Long(pyo_id);
@@ -93,8 +93,15 @@
 return NULL;
 gid = PyLong_AS_LONG(py_int_id);
 Py_DECREF(py_int_id);
+if (gid == -1  PyErr_Occurred())
+return NULL;
+if ((long)(gid_t)gid != gid) {
+PyErr_SetString(PyExc_OverflowError,
+Python int too large to convert to gid_t);
+return NULL;
+}
 
-if ((p = getgrgid(gid)) == NULL) {
+if ((p = getgrgid((gid_t)gid)) == NULL) {
 PyErr_Format(PyExc_KeyError, getgrgid(): gid not found: %d, gid);
 return NULL;
 }
diff -r 0f4d4f4db724 Modules/parsermodule.c
--- a/Modules/parsermodule.cWed Oct 03 03:16:42 2012 +0200
+++ b/Modules/parsermodule.cWed Oct 03 10:12:33 2012 +0300
@@ -747,7 +747,7 @@
 /* elem must always be a sequence, however simple */
 PyObject* elem = PySequence_GetItem(tuple, i);
 int ok = elem != NULL;
-long  type = 0;
+int type = 0;
 char *strn = 0;
 
 if (ok)
@@ -758,8 +758,14 @@
 ok = 0;
 else {
 ok = PyLong_Check(temp);
-if (ok)
-type = PyLong_AS_LONG(temp);
+if (ok) {
+type = _PyLong_AsInt(temp);
+if (type == -1  PyErr_Occurred()) {
+

[issue16119] Python 2.7 IDLE not working in WinVista

2012-10-03 Thread Roger Serwy

Roger Serwy added the comment:

Does the official Python 2.7.3 installation from python.org/download/ work for 
you?

--
nosy: +serwy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16119
___
___
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-03 Thread Felipe Cruz

Felipe Cruz added the comment:

 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.

Charles,
You're right! If all errno cases get covered in the patch,  will It looks 
reasonable?

--

___
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



[issue11245] Implementation of IMAP IDLE in imaplib?

2012-10-03 Thread R. David Murray

R. David Murray added the comment:

To fully answer the original question that opened this issue: contributions 
will be welcomed.  While I don't currently have time to work on imaplib myself, 
I have an interest and will review and if appropriate commit patches.

I like Shay's proposal, but absent a patch along those lines having blocking 
IMAP support will definitely be an improvement.  An application needing to 
monitor more than one imap connection could do its own threading.

Thanks for proposing the patch.  Could you please submit a contributor 
agreement?  I probably won't have time to fully consider the proposed patch for 
a bit, but I've put it on my todo list.  

test_imaplib does have a testing framework now, do you think you could write 
tests for the new feature?

--
components: +email
nosy: +barry
versions: +Python 3.4 -Python 3.3

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



[issue16119] Python 2.7 IDLE not working in WinVista

2012-10-03 Thread Spiros K.

Spiros K. added the comment:

i removed the EPD version and installed the official Python 2.7.3, but still 
IDLE doesn't work (neither the start menu sortcut, nor the idle.py from cmd 
which still gives the same dll error).

The only difference is that the python (command line) works this time.

--

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



[issue8800] add threading.RWLock

2012-10-03 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Excellent point, I hadn't thought of that!
Yes, it is is sufficient to test if _I_ am in the list.  I'll make the 
necessary changes. That will make the thread/process implementation virtually 
identical.

--

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



[issue15104] Unclear language in __main__ description

2012-10-03 Thread Mike Hoy

Changes by Mike Hoy mho...@gmail.com:


--
nosy: +mikehoy

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



[issue16119] Python 2.7 _socket DLL import error on Windows Vista

2012-10-03 Thread Roger Serwy

Roger Serwy added the comment:

This is not a problem with IDLE, but with an error with loading the _socket 
DLL. I changed the title to reflect the problem.

--
components: +Library (Lib) -IDLE
title: Python 2.7 IDLE not working in WinVista - Python 2.7 _socket DLL import 
error on Windows Vista

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Michele Orrù

Michele Orrù added the comment:

 The patch does not seem to walk the mro to look for slots in base 
 classes.  Also, an instance with a __dict__ attribute may also have 
attributes stored in slots.
Well, what I am doing is more or less the equivalent of 

return object.__slots__ if hasattr(object, '__slots') else object.__dict__

and this is coherent with the updated documentation. The one you proposed is an 
alternative behavior; am I supposed to follow that one?


 BTW, copyreg._slotnames(cls) properly calculates the slot names for cls and 
 tries to cache them as cls.__slotnames__.  Pickle does the equivalent of

 try:
 slotnames = cls.__slotnames__
 except AttributeError:
 slotnames = copyreg._slotnames(cls)
thanks! I'll take into account. 

-- 
ù

--

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



[issue16120] Use |yield from| in stdlib

2012-10-03 Thread Berker Peksag

New submission from Berker Peksag:

Related changesets:

- http://hg.python.org/cpython/rev/33a221662f39
- http://hg.python.org/cpython/rev/fb90e2ff95b7

--
components: Library (Lib)
files: yield-from_v1.diff
keywords: patch
messages: 171894
nosy: berker.peksag
priority: normal
severity: normal
status: open
title: Use |yield from| in stdlib
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27403/yield-from_v1.diff

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



[issue16120] Use |yield from| in stdlib

2012-10-03 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

3.3 is in bugfix mode only now. So, targeting 3.4.

I am neutral to this change. Showing use of new language idioms is nice, but 
merging patches to 3.3 and 3.4 would be more difficult.

--
nosy: +jcea
versions:  -Python 3.3

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



[issue16120] Use |yield from| in stdlib

2012-10-03 Thread R. David Murray

R. David Murray added the comment:

Thanks for the patch.

I think that seeing as we've already done a bunch, there's little reason not to 
do more.

--
nosy: +r.david.murray

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Well, what I am doing is more or less the equivalent of 
 
 return object.__slots__ if hasattr(object, '__slots') else object.__dict__
 
 and this is coherent with the updated documentation. The one you 
 proposed is an alternative behavior; am I supposed to follow that one?

Ignoring some slots but not others would be confusing.  I would be inclined to 
just leave vars() alone.  Maybe a Python implementation could be put in 
inspect.py instead.

A possible implementation (which can't be used to modify the object) might be:

import copyreg

def fullvars(obj):
cls = type(obj)
try:
slotnames = cls.__dict__['__slotnames__']
except (KeyError, AttributeError):
slotnames = copyreg._slotnames(cls)
try:
d = vars(obj).copy()
except TypeError:
d = {}
for name in slotnames:
try:
d[name] = getattr(obj, name)
except AttributeError:
pass
return d

class A:
__slots__ = 'x', 'y'

class B(A):
__slots__ = 'u', 'v'

class C(B):
pass

a = A()
a.x = 1
print(fullvars(a))  # {'x': 1}

b = B()
b.x = 2; b.u = 3
print(fullvars(b))  # {'u': 3, 'x': 2}

c = C()
c.y = 4; c.r = 5
print(fullvars(c))  # {'y': 4, 'r': 5}



BTW, I before should have written

try:
slotnames = cls.__dict__['__slotnames__']
except (KeyError, AttributeError):
slotnames = copyreg._slotnames(cls)

--

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-03 Thread Christian Heimes

Christian Heimes added the comment:

I've done some experiments with the reference implementation and adopted code 
of sha1module.c for sha3: https://bitbucket.org/tiran/pykeccak

So far the code just compiles (64bit only) but doesn't work properly yet. I may 
need to move away from the NIST interface and use the sponge interface directly.

--
assignee:  - christian.heimes

___
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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 The patch does not seem to walk the mro to look for slots in base classes. 
 Also, an instance with a __dict__ attribute may also have attributes
 stored in slots.
 
 BTW, copyreg._slotnames(cls) properly calculates the slot names for cls and
 tries to cache them as cls.__slotnames__.

This is from Python side. Did ht_slots field of PyHeapTypeObject does not 
contain properly calculated slot names?

--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 This is from Python side. Did ht_slots field of PyHeapTypeObject does not 
 contain properly calculated slot names?

Looking at the code, it appears that ht_slots does *not* include inherited 
slots.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13290
___
___
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-03 Thread Charles-François Natali

Charles-François Natali added the comment:

 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.

 Charles,
 You're right! If all errno cases get covered in the patch,  will It looks 
 reasonable?

Raising an error in case the signal can't be written to the FD
(because the other end didn't drain the pipe/socket) seems reasonable.
You should just retry on EINTR (although any sane implementation
shouldn't return EINTR on non-blocking write, I don't think it's
strictly prohibited by POSIX).

--

___
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



[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-03 Thread Mike Putnam

Changes by Mike Putnam m...@theputnams.net:


--
nosy: +mikeputnam

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

As I understand it, var(ob) is pretty much a synonym for ob.__dict__. Without 
knowing the internal details, I think vars should do with slots what it would 
do if slots were not used and normal dicts were used. In particular, if a class 
is changed by adding __slots__, vars(class) and vars(instances) should be as 
much the same as possible, at least for read-only uses. This allows iteration 
by keys, values, or items for introspection. That modifying the dict has no 
effect on the object is okay. It is the same for locals() inside a function.

--

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



[issue16116] Can not install C extension modules to inside a venv on Python 3.3.0 for Win32

2012-10-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
components: +Windows
nosy: +vinay.sajip
priority: normal - critical
versions: +Python 3.4

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



[issue16063] HMAC trans_5C is a string, causing a TypeError

2012-10-03 Thread Adam Glenn

Adam Glenn added the comment:

I did some more testing and verified that this is a problem caused by the fact 
that trans_5C is a string and not unicode. It also happens when trans_36 is 
sent to key.translate().

Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
 import hmac
 hmac.new(u'key', u'msg')
Traceback (most recent call last):
  File stdin, line 1, in module
  File hmac.py, line 132, in new
return HMAC(key, msg, digestmod)
  File hmac.py, line 72, in __init__
self.inner.update(key.translate(trans_36))
TypeError: character mapping must return integer, None or unicode


--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 That modifying the dict has no effect on the object is okay.

I have written vars(obj).update(...) before.  I don't think it would be okay 
to break that.

--

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



[issue16121] shlex.shlex.error_leader() reports incorrect line number

2012-10-03 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

shlex.shlex.error_leader() reports incorrect line number with posix=True or 
when last token is not quoted.
This bug occurs in all versions of Python.

The attached script shows this bug:
$ ./shlex_test.py
### text1 posix=False
('var1', 'None, line 1: ')
('=', 'None, line 1: ')
('x', 'None, line 1: ')
('var2', 'None, line 2: ')
('=', 'None, line 2: ')
('y', 'None, line 2: ')
('var3', 'None, line 3: ')
('=', 'None, line 3: ')
('z', 'None, line 3: ')
### text1 posix=True
('var1', 'None, line 1: ')
('=', 'None, line 1: ')
('x', 'None, line 2: ')
('var2', 'None, line 2: ')
('=', 'None, line 2: ')
('y', 'None, line 3: ')
('var3', 'None, line 3: ')
('=', 'None, line 3: ')
('z', 'None, line 3: ')
### text2 posix=False
('var1', 'None, line 1: ')
('=', 'None, line 1: ')
('x', 'None, line 2: ')
('var2', 'None, line 2: ')
('=', 'None, line 2: ')
('y', 'None, line 3: ')
('var3', 'None, line 3: ')
('=', 'None, line 3: ')
('z', 'None, line 3: ')
### text2 posix=True
('var1', 'None, line 1: ')
('=', 'None, line 1: ')
('x', 'None, line 2: ')
('var2', 'None, line 2: ')
('=', 'None, line 2: ')
('y', 'None, line 3: ')
('var3', 'None, line 3: ')
('=', 'None, line 3: ')
('z', 'None, line 3: ')
### text3 posix=False
('x', 'None, line 1: ')
('y', 'None, line 2: ')
('z', 'None, line 3: ')
### text3 posix=True
('x', 'None, line 2: ')
('y', 'None, line 3: ')
('z', 'None, line 3: ')
### text4 posix=False
('x', 'None, line 2: ')
('y', 'None, line 3: ')
('z', 'None, line 3: ')
### text4 posix=True
('x', 'None, line 2: ')
('y', 'None, line 3: ')
('z', 'None, line 3: ')

Only text1 posix=False and text3 posix=False have all correct line numbers.

--
components: Library (Lib)
files: shlex_test.py
messages: 171905
nosy: Arfrever, zmedico
priority: normal
severity: normal
status: open
title: shlex.shlex.error_leader() reports incorrect line number
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27404/shlex_test.py

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I see a special warning in the documentation:

  Note: The returned dictionary should not be modified: the effects on the 
corresponding symbol table are undefined. [2]

  [2] In the current implementation, local variable bindings cannot normally be 
affected this way, but variables retrieved from other scopes (such as modules) 
can be. This may change.

Therefore it's okay that modifying the returned dict has no effect on the 
object.

--

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



[issue13290] get vars for object with __slots__

2012-10-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

A search of googlecode shows 42 examples of vars(...).update compared to 3000 
for .__dict__.update.  I don't know if that is enough to worry about.

http://code.google.com/codesearch#search/q=vars\%28[A-Za-z0-9_]%2B\%29\.update%20lang:^python$type=cs

--

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



[issue16122] Allow *open* to accept file-like objects

2012-10-03 Thread samwyse

New submission from samwyse:

I'm once again frustrated by a third-party module that only accepts filenames, 
not already-opened file-like objects.  This prevents me from passing in 
StringIO objects or any of the standard file streams.  Currently, *open()* 
function accepts strings or (in Python 3.X) integers.  I propose that *open()* 
accept file-like objects, either returning them unchanged, or by returning a 
wrapper object.  While there are many different types of file-like objects, 
they all have one characteristic in common: the presence of a .close() method.

A non-wrapped version of open() could be as simple as this:

  try:
file = original_open(name, mode, buffering)
  except TypeError:
if hasattr(name, 'close'):
return name
raise

Returning a wrapper object would be slightly more complicated, but would allow 
the wrapped object to remain open even after the wrapper is closed.

--
components: IO
messages: 171908
nosy: samwyse
priority: normal
severity: normal
status: open
title: Allow *open* to accept file-like objects
type: enhancement
versions: Python 2.7, Python 3.5

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



[issue16122] Allow *open* to accept file-like objects

2012-10-03 Thread Benjamin Peterson

Benjamin Peterson added the comment:

So, this is supposed to be a kludge for 3rd-party libraries that don't support 
using file objects? Immediately calling open() isn't necessarily what such a 
library will do. It could process the path somehow. Anyway, it's not clear what 
the semantics of the wrapper open() would return would be.

I'm going to close this. If you want to push it, you can bring it up on the 
python-ideas mailing list.

--
nosy: +benjamin.peterson
resolution:  - rejected
status: open - closed
versions: +Python 3.4 -Python 2.7, Python 3.5

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



[issue16122] Allow *open* to accept file-like objects

2012-10-03 Thread Christian Heimes

Christian Heimes added the comment:

I've another argument against your proposal:

open() always wraps a operating system resource and not some Python object. At 
the lowest level open() interacts with a file descriptor (aka file handler on 
Windows). I don't like to break the promise.

Lot's of 3rd party extensions don't support file-like objects because they wrap 
C libraries that either need a path, a file descriptor or a FILE* pointer.

--
nosy: +christian.heimes
resolution: rejected - 
status: closed - open

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



[issue16122] Allow *open* to accept file-like objects

2012-10-03 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
status: open - closed

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



[issue16122] Allow *open* to accept file-like objects

2012-10-03 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
resolution:  - rejected

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



[issue16123] IDLE - deprecate running without a subprocess

2012-10-03 Thread Roger Serwy

New submission from Roger Serwy:

Removing the option of running IDLE without a subprocess would simplify the 
maintenance of IDLE. This should be deprecated for 3.4 and then fully removed 
in 3.5.

Here's a link to a brief discussion on IDLE-dev: 
http://mail.python.org/pipermail/idle-dev/2012-June/003124.html

Attached is an initial patch to issue a deprecation message.

--
files: idle_deprecate.patch
keywords: patch
messages: 171911
nosy: ned.deily, serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - deprecate running without a subprocess
type: enhancement
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file27405/idle_deprecate.patch

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



[issue16120] Use |yield from| in stdlib

2012-10-03 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Berker, could you possibly submit a Contributor Agreement Form? Details at 
http://www.python.org/psf/contrib/

Does your patch take care of all yield in the stdlib?

--

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



[issue16113] Add SHA-3 (Keccak) support

2012-10-03 Thread Björn Edström

Björn Edström added the comment:

For what it's worth, I've built a working C-based sha3-module that is available 
here: https://github.com/bjornedstrom/python-sha3

Note that I've only tested this on Python 2, for Python 3 YMMV.

Best regards
Björn

--
nosy: +bjornedstrom

___
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



[issue8800] add threading.RWLock

2012-10-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't like the API. Why should I write rwlock.acquire_read() instead of 
rwlock.reader.acquire()? There should be one obvious way to do it.

The fact that reader_lock and writer_lock return a new object every time is 
a bit suboptimal, IMO.

Also, RWLockBase should be private (_RWLockBase).

Ah, and the patch needs docs :)

--

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



[issue8800] add threading.RWLock

2012-10-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

By the way, the fact that acquire_read() is documented as Acquire the lock in 
shared mode and acquire_write() as Acquire the lock in exclusive mode hints 
that perhaps RWLock is not the right name ;)

--

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



[issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris

2012-10-03 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

I close this bug as out of date. If you think this is still an issue, please, 
reopen.

--
resolution:  - out of date
status: open - closed

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



[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-10-03 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15642
___
___
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-03 Thread Felipe Cruz

Felipe Cruz added the comment:

 Raising an error in case the signal can't be written to the FD
 (because the other end didn't drain the pipe/socket) seems reasonable.
 You should just retry on EINTR (although any sane implementation
 shouldn't return EINTR on non-blocking write, I don't think it's
 strictly prohibited by POSIX).

You mean retry one time or until success?

--
Added file: http://bugs.python.org/file27406/issue16105_v2.patch

___
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



[issue15625] Support u and w codes in memoryview

2012-10-03 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
versions: +Python 3.4 -Python 3.3

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



[issue16124] fcntl_ioctl still not 100% sane with unsigned longs

2012-10-03 Thread Garrett Cooper

New submission from Garrett Cooper:

As discussed in ID # 1471, the type for request is not 100% correct on some 
platforms (FreeBSD, NetBSD, and OpenBSD, for instance) and the custom platform 
that I'm using unfortunately uses non-32-bit int ioctls. An autoconf test needs 
to be added for these platforms and the request parameter needs to be handled 
properly (I'll take charge of doing that).

--
components: Extension Modules
messages: 171918
nosy: yaneurabeya
priority: normal
severity: normal
status: open
title: fcntl_ioctl still not 100% sane with unsigned longs
type: behavior
versions: Python 2.7

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



[issue16115] test that executable arg to Popen() takes precedence over args[0] arg

2012-10-03 Thread Kushal Das

Kushal Das added the comment:

Attached patch which has a new test called test_executable_precedence to test 
precedence of executable argument over args[0].

--
keywords: +patch
nosy: +kushaldas
Added file: http://bugs.python.org/file27407/executable_precedence.patch

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



[issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode

2012-10-03 Thread Kushal Das

Kushal Das added the comment:

Patch to update docstring and documentation with explicit saying that calling 
JSONEncoder.default raises a TypeError

--
keywords: +patch
Added file: 
http://bugs.python.org/file27408/explicit_json_doc_update_for_encoder_default.patch

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



[issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode

2012-10-03 Thread Kushal Das

Kushal Das added the comment:

The previous patch should be back committed to all 3.x and 2.7 branch.

--

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