[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-29 Thread Pascal Chambon

Pascal Chambon  added the comment:

The change was announced in http://docs.python.org/dev/whatsnew/2.7.html, but 
indeed it wasn't advertised in py3k changes - my apologies, I didn't check it 
was.

I agree that the doc should be clarified on several aspects.

* The returned value is the new file SIZE indeed (I guess we can still use 
"file" here, since imo other streams can't be truncated anyway).

* Truncate() simply changes the current end-of-file (the word is historical, 
resize() would have been better - as this has been discussed on mailing lists).

* Extending the file size with truncate() or with a write() after end-of-file 
(that's your sample's case) does, or does not (depending on the platform), fill 
the empty space with zeroes.


Proposal for doc update :

Resizes the file to the given size (or the current position), without moving 
the file pointer. This resizing can extend or reduce the current file size. In 
case of extension, the content of the new file area depends on the platform (on 
most systems, additional bytes are zero-filled, on win32 they're undetermined). 
Returns the new file size.

Would it be ok thus ?

--

___
Python tracker 

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



[issue8616] Changes to content of Demo/turtle

2010-05-29 Thread Georg Brandl

Georg Brandl  added the comment:

OK, I tried again and it worked flawlessly.  Maybe I overlooked a stick last 
time :)

Committed in r81593.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8811] fixing sqlite3 docs for py3k

2010-05-29 Thread Georg Brandl

Georg Brandl  added the comment:

Well, if I try applying your patch to 3.1 it fails.  It would be nice to have 
one that applies flawlessly :)

--

___
Python tracker 

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



[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

2010-05-29 Thread Brian Quinlan

Brian Quinlan  added the comment:

A few notes:
1. these types are *not* part of the XML-RPC specification, they are Apache 
extensions
2. these types seem designed to accommodate Java
3. some of these types would be very possible to accommodate e.g. 
ex:serializable which contains a serialized Java object

--
nosy: +bquinlan

___
Python tracker 

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



[issue5673] Add timeout option to subprocess.Popen

2010-05-29 Thread Filippo Giunchedi

Changes by Filippo Giunchedi :


--
nosy: +filippo

___
Python tracker 

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



[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2010-05-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I'm imagining (for POSIX platforms) adding some kind of check for
> signals when the system call returns EINTR.  If the signal handler
> raises an exception, like an interrupt should raise a
> KeyboardInterrupt, we can just give a different return code and
> propagate the exception.

Yes, this is what I'm proposing too.

> It also seems like this behavior can be extended gradually to
> different platforms, since I don't have the resources to change and
> test every threading implementation.

There is only one active POSIX threading implementation in 3.2, in
Python/thread_pthread.h.
(and the only non-POSIX one is for Windows)

--

___
Python tracker 

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



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> d...@python
components: +Documentation
nosy: +d...@python
title: io.StringIO: truncate+print disabled in 3.1.2 -> truncate() semantics 
changed in 3.1.2
versions: +Python 2.6, Python 2.7, Python 3.2

___
Python tracker 

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



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

How about reusing the documentation of legacy file objects:

“Truncate the file’s size. If the optional size argument is present, the file 
is truncated to (at most) that size. The size defaults to the current position. 
The current file position is not changed. Note that if a specified size exceeds 
the file’s current size, the result is platform-dependent: possibilities 
include that the file may remain unchanged, increase to the specified size as 
if zero-filled, or increase to the specified size with undefined new content.”

http://docs.python.org/library/stdtypes.html#file.truncate

--

___
Python tracker 

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



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've committed a doc update (a mix of the legacy truncate() doc and Pascal's 
proposal) in r81594.

--

___
Python tracker 

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



[issue8849] python.exe problem with cvxopt

2010-05-29 Thread Brian Curtin

Brian Curtin  added the comment:

Rather than attaching a Word document, can you just enter your information here?

--
nosy: +brian.curtin

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

New submission from David Kirkby :

Using Python 2.6.5, the module _socket is failing to build on OpenSolaris. The 
problem can be worked around with a hack, but I've not verified if the hack 
actually results in working code - but at least it compiles. See below. 

The problem seems to be that HAVE_NETPACKET_PACKET_H gets defined, despite the 
fact there is no file called netpacket.h

running build
running build_ext
building '_socket' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/export/home/drkirkby/Python-2.6.5/./Include -I. 
-IInclude -I./Include -I/usr/local/include 
-I/export/home/drkirkby/Python-2.6.5/Include 
-I/export/home/drkirkby/Python-2.6.5 -c 
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c -o 
build/temp.solaris-2.11-i86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.o
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c: In function 
‘makesockaddr’:
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:1107: error: ‘struct 
ifreq’ has no member named ‘ifr_ifindex’
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:1108: error: 
‘SIOCGIFNAME’ undeclared (first use in this function)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:1108: error: (Each 
undeclared identifier is reported only once
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:1108: error: for each 
function it appears in.)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c: In function 
‘getsockaddrarg’:
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:1415: error: 
‘SIOCGIFINDEX’ undeclared (first use in this function)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:1427: error: ‘struct 
ifreq’ has no member named ‘ifr_ifindex’
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c: In function 
‘init_socket’:
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4596: error: 
‘PACKET_LOOPBACK’ undeclared (first use in this function)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: 
‘PACKET_FASTROUTE’ undeclared (first use in this function)
building '_curses' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/export/home/drkirkby/Python-2.6.5/./Include -I. 
-IInclude -I./Include -I/usr/local/include 
-I/export/home/drkirkby/Python-2.6.5/Include 
-I/export/home/drkirkby/Python-2.6.5 -c 
/export/home/drkirkby/Python-2.6.5/Modules/_cursesmodule.c -o 
build/temp.solaris-2.11-i86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/_cursesmodule.o
/export/home/drkirkby/Python-2.6.5/Modules/_cursesmodule.c: In function 
‘PyCursesWindow_ChgAt’:
/export/home/drkirkby/Python-2.6.5/Modules/_cursesmodule.c:708: warning: 
implicit declaration of function ‘mvwchgat’
/export/home/drkirkby/Python-2.6.5/Modules/_cursesmodule.c:712: warning: 
implicit declaration of function ‘wchgat’
gcc -shared 
build/temp.solaris-2.11-i86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/_cursesmodule.o
 -L/usr/local/lib -lcurses -ltermcap -o 
build/lib.solaris-2.11-i86pc-2.6/_curses.so
*** WARNING: renaming "_curses" since importing it failed: ld.so.1: python: 
fatal: relocation error: file build/lib.solaris-2.11-i86pc-2.6/_curses.so: 
symbol mvwchgat: referenced symbol not found
building '_curses_panel' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/export/home/drkirkby/Python-2.6.5/./Include -I. 
-IInclude -I./Include -I/usr/local/include 
-I/export/home/drkirkby/Python-2.6.5/Include 
-I/export/home/drkirkby/Python-2.6.5 -c 
/export/home/drkirkby/Python-2.6.5/Modules/_curses_panel.c -o 
build/temp.solaris-2.11-i86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/_curses_panel.o
gcc -shared 
build/temp.solaris-2.11-i86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/_curses_panel.o
 -L/usr/local/lib -lpanel -lcurses -ltermcap -o 
build/lib.solaris-2.11-i86pc-2.6/_curses_panel.so
*** WARNING: renaming "_curses_panel" since importing it failed: No module 
named _curses
building 'sunaudiodev' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/export/home/drkirkby/Python-2.6.5/./Include -I. 
-IInclude -I.

A patch (which is a hack, rather than a real solution), is below. 

drkir...@hawk:~/Python-2.6.5/Modules$ diff -U 10  socketmodule.c.orig 
socketmodule.c
--- socketmodule.c.orig Sat May 29 14:58:17 2010
+++ socketmodule.c  Sat May 29 15:26:08 2010
@@ -1089,20 +1089,21 @@
}
 #endif
 
default:
PyErr_SetString(PyExc_ValueError,
"Unknown Bluetooth protocol");
return NULL;
}
 #endif
 
+#undef HAVE_NETPACKET_PACKET_H /* Hack to build on OpenSolaris x64 */
 #ifdef HAVE_NETPACKET_PACKET_H
case AF_PACKET:
{
struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
char *ifname = "";
   

[issue8847] crash appending list and namedtuple

2010-05-29 Thread R. David Murray

R. David Murray  added the comment:

I can't reproduce this on either 3.1.2 or py3k trunk.

--
nosy: +r.david.murray
resolution:  -> works for me

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Please verify that HAVE_NETPACKET_PACKET_H does indeed get defined, looking at 
pyconfig.h.

Please inspect config.log to find out why it does get defined.

--
nosy: +loewis

___
Python tracker 

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



[issue8748] integer-to-complex comparisons give incorrect results

2010-05-29 Thread Meador Inge

Meador Inge  added the comment:

> I'm not sure that's a good idea:  mightn't this change behaviour for 
> user-defined classes with a __coerce__ method?  Maybe it would be 
> better to just special-case ints and longs at the start of 
> complex_richcompare, and then leave everything else more-or-less 
> intact?

I looked into this more and agree.  I have attached a patch with the strategy 
that leaves the coercion intact.  Although, even with removing the coercion 
from the complex rich compare a user-defined __coerce__ is still called 
somewhere up in object.c.  It does not have the same behavior, though, e.g. 
__coerce__ is called, but the coerced args don't actually seem to be used in 
the comparison as they are in the explicit coerce in the complex object rich 
compare.

Somewhat of topic, but the comparison rules in 2.7 seems to be pretty 
inconsistent anyway (due to different behavior between new and old style 
classes):

motherbrain:trunk minge$ ./python.exe 
Python 2.7b2+ (trunk:81489M, May 29 2010, 09:44:06) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from itertools import product
[35627 refs]
>>> class T:
...def __init__(self, x):
...   self.x = x
...def __coerce__(self, other):
...   return (self.x, other)
... 
[35676 refs]
>>> class U(T, object):
...def __init__(self, x):
...   super(U, self).__init__(x)
... 
[35723 refs]
>>> for tobj, value in product((T, U), (12, 12.0, complex(12.0))):
...print tobj, " -> ", tobj(value) == value
... 
__main__.T  ->  True
__main__.T  ->  True
__main__.T  ->  True
  ->  True
  ->  False
  ->  True
[35740 refs]
>>> 


Given the complexities and subtleties of how comparison works in 2.7 I am a 
little hesitant to commit this change as well.

--
Added file: http://bugs.python.org/file17493/issue-8748.py27.2.patch

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

David Kirkby  added the comment:

I was obviously looking for the wrong file. ./pyconfig.h shows:

/* Define to 1 if you have the  header file. */
#define HAVE_NETPACKET_PACKET_H 1

the file does indeed exist

drkir...@hawk:~$ find /usr/include -name packet.h
/usr/include/netpacket/packet.h

--

___
Python tracker 

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



[issue8748] integer-to-complex comparisons give incorrect results

2010-05-29 Thread Meador Inge

Changes by Meador Inge :


--
stage:  -> patch review

___
Python tracker 

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



[issue2470] Need fixer for dl (removed) -> ctypes module

2010-05-29 Thread Meador Inge

Changes by Meador Inge :


--
stage:  -> needs patch
type:  -> feature request

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

David Kirkby  added the comment:

Two points I should have stated. 

1) 
http://www.lotuseyes.de/blog/error-installing-plone-on-opensolaris-using-the-unified-installer

has a discussion about this issue. It was related to someone trying to install 
"Plone" but the problem is a failure of _socket to build. I'm trying to build 
the port the Sage maths software to OpenSolaris, and hit the problem there. 

2) If a *serious* developer would like access to the OpenSolaris machine which 
shows this problem, I can give you a temporary account. Drop me a private 
email. Otherwise, you can install OpenSolaris on a virtual machine under 
VirtualBox, or I can do my best to debug it with some help from a developer. 


Dave

--

___
Python tracker 

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



[issue8651] "s#" and friends can silently truncate buffer length

2010-05-29 Thread Ryan Coyner

Changes by Ryan Coyner :


--
nosy: +rcoyner

___
Python tracker 

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



[issue8650] zlibmodule.c isn't 64-bit clean

2010-05-29 Thread Ryan Coyner

Changes by Ryan Coyner :


--
nosy: +rcoyner

___
Python tracker 

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



[issue8840] truncate() semantics changed in 3.1.2

2010-05-29 Thread Pascal Chambon

Pascal Chambon  added the comment:

Good B-)

Woudl it be necessary to update the docstrings too ?

--

___
Python tracker 

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



[issue8853] getaddrinfo should accept port of type long

2010-05-29 Thread AndiDog

New submission from AndiDog :

socket.getaddrinfo("127.0.0.1", 80L)
error: Int or String expected

I would expect getaddrinfo to convert the port number to an integer.

--
components: Library (Lib)
messages: 106726
nosy: AndiDog
priority: normal
severity: normal
status: open
title: getaddrinfo should accept port of type long
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The AF_PACKET support was original meant for Linux. When Solaris now also 
supports that socket family, and with a similar interface, it might be 
interesting to port that support to Solaris.

If nobody volunteers, it might be easier to restrict this to Linux only; please 
try the attached patch.

--
keywords: +patch
Added file: http://bugs.python.org/file17494/afpacket.diff

___
Python tracker 

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



[issue8810] TZ offset description is unclear in docs

2010-05-29 Thread Sean Reifschneider

Sean Reifschneider  added the comment:

In this case, the docs.python.org link you point to seems to be correct, saying 
that it returns a timedelta.  It is the docstring that says it's minutes east 
of UTC.

I've attached a patch which changes this wording to:

timedelta() showing offset from UTC, with negative for West of UTC

--
keywords: +patch
nosy: +jafo
Added file: http://bugs.python.org/file17495/python-utcoffsetdoc.patch

___
Python tracker 

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



[issue8810] TZ offset description is unclear in docs

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

I’m not sure about the “with negative” wording.

--
nosy: +merwok

___
Python tracker 

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



[issue8810] TZ offset description is unclear in docs

2010-05-29 Thread Sean Reifschneider

Sean Reifschneider  added the comment:

Alternately, here is a patch that just takes the docs.python.org description.

--
Added file: http://bugs.python.org/file17496/python-utcoffsetdoc2.patch

___
Python tracker 

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



[issue8810] TZ offset description is unclear in docs

2010-05-29 Thread Sean Reifschneider

Sean Reifschneider  added the comment:

Then how about:

timedelta() showing offset from UTC, negative values indicating West of UTC

?

--

___
Python tracker 

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



[issue8810] TZ offset description is unclear in docs

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

> timedelta() showing offset from UTC, negative values indicating West of UTC

+1 for the last one.

Micro nit: I would not put parentheses when referring to the type (we
talk about “a list”, not “a list()”).

Micro nit: Some languages use case to distinguish direction vs. region,
e.g. in French we have “ouest” and “Ouest”. Does that apply to English?

--

___
Python tracker 

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



[issue1289118] timedelta multiply and divide by floating point

2010-05-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

The patch looks good to me.  Please replace the tab characters in 
datetimemodule.c with spaces, though. :)

--

___
Python tracker 

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



[issue8810] TZ offset description is unclear in docs

2010-05-29 Thread Sean Reifschneider

Sean Reifschneider  added the comment:

I'm fine without ().

I thought the direction was generally initial-capped, but I may be wrong there. 
 Let's go with "west".

--

___
Python tracker 

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



[issue8470] Let cmd.cmd.intro be unicode friendly

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Since 2.7 is nearing the second beta, I’m afraid no new features can be added.

Note that classes using cmd in 3.x get Unicode arguments.

--
nosy: +merwok

___
Python tracker 

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



[issue8470] Let cmd.cmd.intro be unicode friendly

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Correction: beta is behind us, it’s nearly rc time.

--

___
Python tracker 

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



[issue8473] doctest fails if you have inconsistent lineendings

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Looks good to me. Is there’s no disagreement on this being a bug fix rather 
than a new feature, it could go before the rc.

--
components: +Library (Lib) -Extension Modules, Tests
nosy: +merwok
priority: normal -> 

___
Python tracker 

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



[issue8473] doctest fails if you have inconsistent lineendings

2010-05-29 Thread Éric Araujo

Changes by Éric Araujo :


--
priority:  -> normal

___
Python tracker 

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



[issue8748] integer-to-complex comparisons give incorrect results

2010-05-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Given the complexities and subtleties of how comparison works in 2.7
> I am a little hesitant to commit this change as well.

Understood.  Given how long we've lived with this behaviour in 2.x with no 
serious ill effects, it's very tempting to call this a "won't fix" for 2.7.  
Really the coercion for complex types should have been removed at some point in 
the 2.x series, but it's too late for that now.

I'll take a look at the patch, though.

--

___
Python tracker 

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



[issue8481] doc: ctypes no need to explicitly allocate writable memory with Structure

2010-05-29 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee: theller -> flox
nosy: +d...@python, flox -theller
priority: normal -> 

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

David Kirkby  added the comment:

Hi,

thank you for the patch. 

I hope you can keep Python building the same modules on Solaris as Linux, as 
that would be a real shame if it did not. This module is used in the Sage maths 
software. 

I had some difficulty applying your patch using the 'patch' command. 'patch' 
just kept rejecting the file. Finally I gave up and patched it manually. 

It did not completely solve the problem as PACKET_FASTROUTE and PACKET_LOOPBACK 
were undeclared too

building '_socket' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/export/home/drkirkby/Python-2.6.5/./Include -I. 
-IInclude -I./Include -I/usr/local/incl
ude -I/export/home/drkirkby/Python-2.6.5/Include 
-I/export/home/drkirkby/Python-2.6.5 -c 
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c -o 
build/temp.solaris-2.11-i
86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.o
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c: In function 
‘init_socket’:
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: 
‘PACKET_LOOPBACK’ undeclared (first use in this function)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: (Each 
undeclared identifier is reported only once
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: for each 
function it appears in.)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4598: error: 
‘PACKET_FASTROUTE’ undeclared (first use in this function)
building '_ssl' extension

However, I decided to alter the Modules/socketmodule.c further and finally 
_socket built. I don't however know how to test _socket, so I don't know if it 
working or not. (I'm not a python programmer - just about to start learning 
it). But using

drkir...@hawk:~/Python-2.6.5$ ./python
Python 2.6.5 (r265:79063, May 29 2010, 21:17:44) 
[GCC 4.4.4] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import _socket
>>> 

it would appear its not completely broken. 

BTW, for the record, the hardware is a Sun Ultra 27 (quad core Xeon) running 
OpenSolaris 06/2009 which has been updated to build 134. 

drkir...@hawk:~$ cat /etc/release
   OpenSolaris Development snv_134 X86
   Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
 Assembled 01 March 2010

I've built Sage on Solaris 10 (on SPARC hardware), so I don't think this patch 
is needed on Solaris 10, though I've not checked on Solaris 10 using Intel/AMD 
hardware. 

Dave

--
Added file: http://bugs.python.org/file17497/socketmodule.c.patch

___
Python tracker 

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



[issue8481] doc: ctypes no need to explicitly allocate writable memory with Structure

2010-05-29 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee: flox -> theller
nosy: +theller -flox
priority:  -> normal

___
Python tracker 

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



[issue8469] struct - please make sizes explicit

2010-05-29 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Documentation -Library (Lib)
priority: normal -> 

___
Python tracker 

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



[issue8469] struct - please make sizes explicit

2010-05-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
priority:  -> low

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

David Kirkby  added the comment:

I forget to say I had attached the patch 'socketmodule.c.patch' which allows 
_socket to build. (I know you can see that if you look, but I thought it useful 
to write it). 

I do have some other modules not building on OpenSolaris (_curses, 
_curses_panel, _tkinter & sunaudiodev) but I'll create separate tickets for 
those. All of those 4 modules are included in the Python 2.6.4 shipped as part 
of OpenSolaris, so they can be built. 

Dave

--

___
Python tracker 

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



[issue7962] Demo/ directory needs to be tested and pruned

2010-05-29 Thread Zack Goldstein

Zack Goldstein  added the comment:

I've started going through the demos. So far I've gone through cgi and classes. 
If this is what you're looking for I'll try and go through the rest in the next 
week or so.

Python 3.2a0

/cgi
all work

/classes
Complex.py - fail

1 and Complex(0, 10) -> 
Traceback (most recent call last):
  File "Complex.py", line 314, in 
test()
  File "Complex.py", line 310, in test
checkop(*(t+item))
  File "Complex.py", line 235, in checkop
ok = abs(result - value) <= fuzz
  File "Complex.py", line 184, in __rsub__
return other - self
  File "Complex.py", line 180, in __sub__
return Complex(self.re - other.re, self.im - other.im)
TypeError: unsupported operand type(s) for -: 'type' and 'int'

Dates.py - fail
 
Traceback (most recent call last):
  File "Dates.py", line 227, in 
test(1850, 2150)
  File "Dates.py", line 185, in test
if (not a < b) or a == b or a > b or b != b:
TypeError: unorderable types: Date() < Date()

Dbm.py - fail 
{}
key: "myKey"
Traceback (most recent call last):
  File "Dbm.py", line 66, in 
test()
  File "Dbm.py", line 49, in test
if key in d:
  File "Dbm.py", line 25, in __getitem__
return eval(self.db[repr(key)])
KeyError: '0'

Range.py - fail
Exception: error in implementation:
correct   = range(5, 100, 3)
old-style = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 
50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98]
generator = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 
50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98]

Rev.py - fail
1 items had failures:
  10 of  17 in Rev
***Test Failed*** 10 failures.

Looks like mostly invalid print syntax

Vec.py - pass

bitvec.py - fail
use of __cmp__()
use of __*slice__()
didn't check further

--
nosy: +goldsz

___
Python tracker 

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



[issue7962] Demo/ directory needs to be tested and pruned

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Does “tested” in the title of this issue mean “run” or “unit-tested”?

Regarding the 2.7 branch, is this still relevant?

--
nosy: +merwok

___
Python tracker 

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



[issue8501] --dry-run option doesn't work

2010-05-29 Thread Éric Araujo

Éric Araujo  added the comment:

Tarek, do we change the component to Distutils2?

If so, I’m willing to give this a try.

--
nosy: +merwok

___
Python tracker 

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



[issue7962] Demo/ directory needs to be tested and pruned

2010-05-29 Thread Zack Goldstein

Zack Goldstein  added the comment:

I'm assuming tested means "run", and that a good demo is one that "works" for 
some nominal input.

--

___
Python tracker 

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-05-29 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg :

When installing Visual Studio 2008 SP1 on a Windows Vista x64 system, the 
installer registers the various registry keys under

Software\Wow6432Node\Microsoft\VisualStudio\9.0\

rather than

Software\Microsoft\VisualStudio\9.0\

This is due to some redirection MS is applying to registry names when running 
32-bit apps (such as the VS2008 installer) on 64-bit Windows:

http://support.microsoft.com/kb/896459

Since the tools in msvc9compiler.py rely on the registry to find the various 
dirs, batch files and tools, these operations fail.

A simple solution is to just update the globals at the top of the file to:

VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"

but that would of course have to be done with some extra checks to not break 
these settings on other Windows systems.

I'm not sure whether this is specific to Windows Vista or also occurs on 
Windows 7.

--
assignee: tarek
components: Distutils
keywords: 64bit
messages: 106745
nosy: lemburg, tarek
priority: normal
severity: normal
status: open
title: msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows 
x64
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue8855] Shelve documentation lacks security warning

2010-05-29 Thread Longpoke

New submission from Longpoke :

Loading a shelve can cause arbitrary code to be executed [1] and other black 
magic (because it's backed by Pickle). Shouldn't there be a big fat warning at 
the top of the shelve documentation page?

Unless you're like me and assume anything to do with serialization in any 
language is insecure until proved otherwise, you aren't going to intuitively 
think there is anything wrong with "unshelving" untrusted data (unless you 
already know that Pickle is insecure).

1. http://nadiana.com/python-pickle-insecure#comment-261

--
assignee: d...@python
components: Documentation
messages: 106746
nosy: d...@python, q94IjzUfnNoyv4c75mMw
priority: normal
severity: normal
status: open
title: Shelve documentation lacks security warning

___
Python tracker 

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



[issue8470] Let cmd.cmd.intro be unicode friendly

2010-05-29 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +l0nwlf

___
Python tracker 

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



[issue8849] python.exe problem with cvxopt

2010-05-29 Thread jroach

jroach  added the comment:

Brian,
I am an engineer who makes significant use of Python, not a computer 
professional. I hope that I communicate the right information. The 
operating system is Windows XP Professional. The problem encountered was 
that a python program invoking cvxopt, that ran perfectly well with 
Python25, crashed with Python26 and (without request) generated a 
response from Visual Studio to the effect that python.exe encountered an 
access violation writing location 0x9b0b80c8. (The full message was 
'Unhandled exception  at 0x01de5607 in python.exe:0xC005: Access  
violation writing location 0x9b0b80c8. The c-code segment displayed by 
the debugger was (file: crt0dat.c):
  /*
 * walk the table of function pointers from the bottom up, until
 * the end is encountered.  Do not skip the first entry.  The 
initial
 * value of pfbegin points to the first valid entry.  Do not try to
 * execute what pfend points to.  Only entries before pfend are 
valid.
 */
while ( pfbegin < pfend )
{
/*
 * if current table entry is non-NULL, call thru it.
 */
if ( *pfbegin != NULL )
(**pfbegin)();
++pfbegin;
}
}

/***
* static int  _initterm_e(_PIFV * pfbegin, _PIFV * pfend) - call entries in
*   function pointer table, return error code on any failure
*
*Purpose:
*   Walk a table of function pointers in the same way as _initterm, but
*   here the functions return an error code.  If an error is 
returned, it
*   will be a nonzero value equal to one of the _RT_* codes.
*
*Entry:
The call stack line was: >msvcr90.dll!_initterm(void (void)* * 
pfbegin=0x0002, void (void)* * pfend=0x00993148)  Line 903C
I do not have the necessary knowledge to interpret these data.
This Python26 problem occurs with every execution under both Idle and 
Editra.

jroach
> ___
> Python tracker 
> 
> ___
>
>

--

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

Changes by David Kirkby :


Removed file: http://bugs.python.org/file17497/socketmodule.c.patch

___
Python tracker 

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



[issue8852] _socket fails to build on OpenSolaris x64

2010-05-29 Thread David Kirkby

David Kirkby  added the comment:

I'd made a mistake when manually applying your patch, although my mistake made 
no practical difference. I'm attaching a corrected patch, which has all the 
changes needed to get this to build on OpenSolaris. It basically only checks 
for things before trying to compile with them, so it should be safe (and 
desirable) on any platform. 

I've not checked this on OpenSolaris on the SPARC hardware, though the use of 
OpenSolaris on SPARC hardware is very rare I believe. I' 99% sure that _socket 
builds ok on Solaris 10 on SPARC without any changes from the 2.6.4 source 
(I've not tried with 2.6.5) 

Dave

--
Added file: http://bugs.python.org/file17498/socketmodule.c.patch

___
Python tracker 

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



[issue8829] IDLE editior not opening

2010-05-29 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

please ask help at [email protected] or comp.lang.python

--
nosy: +orsenthil
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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