[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Jonathan Livni

New submission from Jonathan Livni jonathan.li...@gmail.com:

all( (x=y) for x,y in zip(L, L[1:]) )
all([(x=y) for x,y in zip(L, L[1:])])

Both lines of code above check if L is a non-decreasing list. Both should 
return the same results. But under some conditions, they don't. I've 
encountered this with a list of Decimal numbers.
This is 100% reproducible on my Win7 64bit vanilla Python 2.6.6 32bit setup, 
alas I cannot share the specific code that generates this difference.
See attached screenshot from Eclipse Pydev debugger.

--
components: Windows
files: Eclipse.JPG
messages: 128628
nosy: Jonathan.Livni
priority: normal
severity: normal
status: open
title: all() returns wrong result when the parameters are non-encapsulated 
list-comprehension
versions: Python 2.6
Added file: http://bugs.python.org/file20766/Eclipse.JPG

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

It's not easy to reproduce this without the full list of decimals.

Do you have a nonstandard decimal Context set?

What is the result if you put the LC into a function, i.e.

def f(L):
return [(x=y) for x,y in zip(L, L[1:])]

print all(f(L))

--
nosy: +georg.brandl

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Jonathan Livni

Jonathan Livni jonathan.li...@gmail.com added the comment:

The exact list of decimals doesn't help - I tried taking the list and 
reproducing the bug with the following short script, but the problem did not 
reproduced:

from decimal import Decimal
L = [Decimal('6.700'), Decimal('6.800'), Decimal('7.140'), Decimal('7.460'), 
Decimal('7.735'), Decimal('8.160'), Decimal('8.280'), Decimal('8.355'), 
Decimal('8.710'), Decimal('9.640'), Decimal('10.155'), Decimal('10.460'), 
Decimal('10.810'), Decimal('11.875'), Decimal('12.310'), Decimal('12.315'), 
Decimal('13.250'), Decimal('13.205'), Decimal('13.750'), Decimal('14.245'), 
Decimal('14.805'), Decimal('15.385'), Decimal('15.955'), Decimal('16.365'), 
Decimal('16.960'), Decimal('17.500'), Decimal('19.445')]
print all(x=y for x, y in zip(L, L[1:]))

The script above rightfully printed False.
The decimal list above was taken from the pydev debugger session where I found 
the bug.

In the original script I do not mess around with Decimal at all. I just cast 
too and from float and use simple arithmetics with it.

--

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Jonathan Livni

Jonathan Livni jonathan.li...@gmail.com added the comment:

Another note - the original problematic code looks like this:

def non_decreasing(L):
return all(x=y for x, y in zip(L, L[1:]))

Changing it to:

def non_decreasing(L):
def f(L):
return [x=y for x, y in zip(L, L[1:])]
return all(f(L))

also worked around the bug

--

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



[issue11220] https sslv3 error 14077417: illegal parameter

2011-02-16 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

curl (7.21.0) fails with the same error message too for the target website. (Is 
the server doing anything different. For other HTTPS sites (which also use 
redirection) urllib.request works fine )

senthil@ubuntu:~/python/py3k$ curl -v 
https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse
* About to connect() to ui2web1.apps.uillinois.edu port 443 (#0)
*   Trying 64.22.183.24... connected
* Connected to ui2web1.apps.uillinois.edu (64.22.183.24) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* error:14077417:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert illegal 
parameter
* Closing connection #0
curl: (35) error:14077417:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert 
illegal parameter

--
nosy: +orsenthil

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



[issue11220] https sslv3 error 14077417: illegal parameter

2011-02-16 Thread Ian Wetherbee

Ian Wetherbee ian.wether...@gmail.com added the comment:

The server seems to be sending a bad TLS handshake, so curl falls back on SSLv3 
with TLS disabled.

curl 7.20.1 (x86_64-redhat-linux-gnu) libcurl/7.20.1 NSS/3.12.8.0 zlib/1.2.3 
libidn/1.16 libssh2/1.2.4
Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp 
scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 

curl -v https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse
* About to connect() to ui2web1.apps.uillinois.edu port 443 (#0)
*   Trying 64.22.183.24... connected
* Connected to ui2web1.apps.uillinois.edu (64.22.183.24) port 443 (#0)
* Initializing NSS with certpath: /etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -12226
* Error in TLS handshake, trying SSLv3...
 GET /BANPROD1/bwskfcls.P_GetCrse HTTP/1.1
 User-Agent: curl/7.20.1 (x86_64-redhat-linux-gnu) libcurl/7.20.1 NSS/3.12.8.0 
 zlib/1.2.3 libidn/1.16 libssh2/1.2.4
 Host: ui2web1.apps.uillinois.edu
 Accept: */*
 
* Connection died, retrying a fresh connect
* Closing connection #0
* Issue another request to this URL: 
'https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse'
* About to connect() to ui2web1.apps.uillinois.edu port 443 (#0)
*   Trying 64.22.183.24... connected
* Connected to ui2web1.apps.uillinois.edu (64.22.183.24) port 443 (#0)
* TLS disabled due to previous handshake failure
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using SSL_RSA_WITH_RC4_128_MD5
* Server certificate:
*   subject: CN=ui2web1.apps.uillinois.edu,OU=AITS 
20100517-25690,O=University of Illinois,L=Urbana,ST=Illinois,C=US
*   start date: May 17 00:00:00 2010 GMT
*   expire date: May 17 23:59:59 2011 GMT
*   common name: ui2web1.apps.uillinois.edu
*   issuer: E=premium-ser...@thawte.com,CN=Thawte Premium Server 
CA,OU=Certification Services Division,O=Thawte Consulting cc,L=Cape 
Town,ST=Western Cape,C=ZA
 GET /BANPROD1/bwskfcls.P_GetCrse HTTP/1.1
 User-Agent: curl/7.20.1 (x86_64-redhat-linux-gnu) libcurl/7.20.1 NSS/3.12.8.0 
 zlib/1.2.3 libidn/1.16 libssh2/1.2.4
 Host: ui2web1.apps.uillinois.edu
 Accept: */*
 
 HTTP/1.1 302 Found
 Date: Wed, 16 Feb 2011 07:49:43 GMT
 Server: Oracle-Application-Server-10g/10.1.2.3.0 Oracle-HTTP-Server
 Location: https://apps.uillinois.edu/selfservice/error/
 Connection: close
 Transfer-Encoding: chunked
 Content-Type: text/html; charset=iso-8859-1
 
!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
HTMLHEAD
TITLE302 Found/TITLE
/HEADBODY
H1Found/H1
The document has moved A 
HREF=https://apps.uillinois.edu/selfservice/error/;here/A.P
HR
ADDRESSOracle-Application-Server-10g/10.1.2.3.0 Oracle-HTTP-Server Server at 
ui2web1b.admin.uillinois.edu Port 443/ADDRESS
/BODY/HTML
* Closing connection #0

--

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



[issue941346] AIX shared library fix

2011-02-16 Thread Michael Haubenwallner

Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:

 You can remove -L\$(srcdir) on this line, but then you need to specify  the 
 full path to Modules/python.exp. See patch below:

Interesting, didn't experience this to be necessary with Python-2.7.1 here... 
Maybe because I do an in-source build, haven't tried an out-of-source build at 
all.

--

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



[issue11220] https sslv3 error 14077417: illegal parameter

2011-02-16 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

The problem is the server strictly accepts SSLv3 only and urllib and 
http.client send SSLv23 protocol.

(In http/client.py, line 1077)
 if context is None:
 # Some reasonable defaults
 context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
 context.options |= ssl.OP_NO_SSLv2
 will_verify = context.verify_mode != ssl.CERT_NONE


However, in order to use only SSLv3, one can set the context to 
ssl.PROTOCOL_SSLv3 in the HTTPSHandler and use it.

import urllib.request
import ssl
https_sslv3_handler = 
urllib.request.HTTPSHandler(context=ssl.SSLContext(ssl.PROTOCOL_SSLv3))
opener = urllib.request.build_opener(https_sslv3_handler)
urllib.request.install_opener(opener)
urllib.request.urlopen('https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse')

--

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



[issue10130] Create epub format docs and offer them on the download page

2011-02-16 Thread wrobell

wrobell wrob...@pld-linux.org added the comment:

it would be nice to have some short TOC at the beginning.

at the moment, one has to scroll through several pages of what's new in python 
[23].[0-9] table of contents until he/she gets into tutorial.

--
nosy: +wrobell

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



[issue11188] test_time error on AIX

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

gmtime(-1) worked fine :/

 import time
 time.gmtime(-1)
time.struct_time(tm_year=1969, tm_mon=12, tm_mday=31, tm_hour=23, tm_min=59, 
tm_sec=59, tm_wday=2, tm_yday=365, tm_isdst=0)

--

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



[issue941346] AIX shared library fix

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Are you using --enable-shared when compiling python?
That is when you should see the error (it could not find python.exp at some 
stage).

--

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



[issue941346] AIX shared library fix

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

By the way... thanks Georg!

--

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



[issue941346] AIX shared library fix

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Also Michael, I am working on the 3.2 branch, it may be different with Python 
2.7.1 but I haven't tested yet.

--

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



[issue7284] optparse - display version in usage by default

2011-02-16 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Does argparse display version by default?

--
status: closed - open

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

This is an interesting puzzle.  In both cases, the zip() function is called and 
runs to completion before either the list comprehension or genexp is started or 
called.  The code for all() is somewhat simple -- it iterates over the input 
and tests whether the value is true.  That is also the same in both.

one essential difference between the two then is that the x, y variables get 
exposed in the list comprehension but not in the genexp.  The only way I can 
see to get to two to evaluate differently is to mutate the exposed variables 
before the comparison:

 from decimal import *
 L = list(map(Decimal, '6.700 6.800 7.140 7.460 7.735'.split()))
 def f(z):
global y
y -= 100
return z

 all([(f(x)=y) for x, y in zip(L, L[1:])])
False
 all((f(x)=y) for x, y in zip(L, L[1:]))
True

I don't see how that mutation could happen in your functions unless decimal has 
been subclassed to override its __le__ method.

Another way to get a midstream mutation is for L to change in mid-computation 
in multi-threaded code.  Is your example single threaded?  Is the debugger 
affecting the run in some way?

The disassembly shows 1) when zip is called, 2) whether x,y are exposed, and 3) 
whether a list is being iterated or the genexp:

 from dis import dis
 dis(compile('all((x=y) for x, y in zip(a, b))', '', 'eval'))
  1   0 LOAD_NAME0 (all)
  3 LOAD_CONST   0 (code object genexpr at 
0x16b3f50, file , line 1)
  6 MAKE_FUNCTION0
  9 LOAD_NAME1 (zip)
 12 LOAD_NAME2 (a)
 15 LOAD_NAME3 (b)
 18 CALL_FUNCTION2
 21 GET_ITER
 22 CALL_FUNCTION1
 25 CALL_FUNCTION1
 28 RETURN_VALUE
 dis(compile('all([(x=y) for x, y in zip(a, b)])', '', 'eval'))
  1   0 LOAD_NAME0 (all)
  3 BUILD_LIST   0
  6 DUP_TOP 
  7 STORE_NAME   1 (_[1])
 10 LOAD_NAME2 (zip)
 13 LOAD_NAME3 (a)
 16 LOAD_NAME4 (b)
 19 CALL_FUNCTION2
 22 GET_ITER
   23 FOR_ITER25 (to 51)
 26 UNPACK_SEQUENCE  2
 29 STORE_NAME   5 (x)
 32 STORE_NAME   6 (y)
 35 LOAD_NAME1 (_[1])
 38 LOAD_NAME5 (x)
 41 LOAD_NAME6 (y)
 44 COMPARE_OP   1 (=)
 47 LIST_APPEND 
 48 JUMP_ABSOLUTE   23
   51 DELETE_NAME  1 (_[1])
 54 CALL_FUNCTION1
 57 RETURN_VALUE  

Nothing else interesting pops-out.

One question out of curiousity.  In the JPG file that is attached, the return 
type is listed as bool_ instead of bool.  Is that normal for an eclipsed 
debugger values display?

--
nosy: +rhettinger

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



[issue11184] Broken large file support on AIX

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Here is the patch.
It only impacts AIX systems and is minimalist, so I think it should be safe for 
Python 3.2.

--
keywords: +patch
Added file: http://bugs.python.org/file20767/patch_aix_largefile.diff

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Alexis Metaireau

Alexis Metaireau ale...@notmyidea.org added the comment:

Hi, 

I was more thinking about something like: if the license is specified in the 
License metadata, then check that it's not a well known license (which can 
and must be provided by the classifiers instead).

At the end, the code you've wrote is useful, but not complete.

Additionally, it seems that your patch make check complaining if you just have 
*defined* classifiers and license (even if the license is not provided in the 
classifiers: it complains if there is both defined, regardless what is 
defined). It should check instead if the classifier field contain the same 
thing than the license field.

--

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



[issue10968] threading.Timer should be a class so that it can be derived

2011-02-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

One concern expressed on a duplicate report by Martijn van Oosterhout:

 Note this is a behaviour change. Under the old scheme (Foo is a class)

 Foo.timerclass = Timer

 created a method, whereas now it will just assign the class as an
 attribute. To work around this you had to use _Timer. Will that dummy
 class remain as an alias to avoid breaking code (in 2.7 at least)?

Stable versions (2.7, 3.1, soon 3.2) won’t get this change.  They may get a doc 
patch to warn people about the fake class/factory thing.


In the py3k documentation for threading, some of the fake classes are 
documented as factories (Event) and other ones as classes (Timer); do you 
people think there would be harm in cleaning up all those outdated shenanigans 
for 3.3, with due versionchanged notes in the doc?

--
nosy: +Martijn.van.Oosterhout

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

PEP 345 actually defines two fields that should be used only when a suitable 
Trove classifier does not exist:

 Platform (multiple use)
 A Platform specification describing an operating system supported by
 the distribution which is not listed in the Operating System Trove
 classifiers.

 License (optional)
 Text indicating the license covering the distribution where the
 license is not a selection from the License Trove classifiers. See
 Classifier below. This field may also be used to specify a
 particular version of a licencse which is named via the Classifier
 field, or to indicate a variation or exception to such a license.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread John Szakmeister

New submission from John Szakmeister j...@szakmeister.net:

I configured the build:
./configure --with-system-ffi --enable-shared --with-computed-gotos 
--prefix=$HOME/.local/python3 

Ran make with 4 jobs (make -j4), and got:
make: *** No rule to make target `libpython3.2m.dylib', needed by 
`python.exe'.  Stop.
make: *** Waiting for unfinished jobs

It seems there might be a $(VERSION)/$(LDVERSION) problem somewhere in the 
Makefile, but I'm uncertain where the issue is exactly.  Looks like using 
--enable-framework instead of --enable-shared works, but I'd rather not have 
the framework right now.

--
components: Build
messages: 128647
nosy: jszakmeister
priority: normal
severity: normal
status: open
title: Python3.2rc3 fails to build on Mac OS X with a non-framework build
versions: Python 3.2

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

I have not tried 3.2 yet, but Issue 11046 may be of interest for you!
Try the undocumented:

configure ...[other args]... MACOSX_DEPLOYMENT_TARGET=10.5

in the meanwhile - it may help you out.

--
nosy: +ronaldoussoren, sdaoden

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



[issue11172] Avoid '.' as runpath on AIX

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

This has been corrected for python 3.2 in issue 941346.
Need to be tested on python 2.7.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Can you please attach your Makefile file?

In Makefile.pre.in, I see:

libpython$(VERSION).dylib: $(LIBRARY_OBJS)

VERSION should be 3.2, only LDVERSION is the VERSION + the ABI flags (eg. 
3.2dm). And I don't see any usage of libpython$(LDVERSION).dylib in 
Makefile(.pre.in).

(You might also try make SHELL='bash -x' or make -d to get more information)

--
nosy: +haypo

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



[issue11220] https sslv3 error 14077417: illegal parameter

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I get an error using the following curl too:

curl 7.20.1 (x86_64-mandriva-linux-gnu) libcurl/7.20.1 OpenSSL/1.0.0a 
zlib/1.2.3 libidn/1.18 libssh2/1.2.5
Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp 
scp sftp smtp smtps telnet tftp 
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 

The same URL sends wget into a loop:

$ LANG=C wget -v -O - 
https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse
--2011-02-16 12:01:39--  
https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse
Resolving ui2web1.apps.uillinois.edu... 64.22.183.24
Connecting to ui2web1.apps.uillinois.edu|64.22.183.24|:443... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--2011-02-16 12:01:40--  (try: 2)  
https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse
Connecting to ui2web1.apps.uillinois.edu|64.22.183.24|:443... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--2011-02-16 12:01:43--  (try: 3)  
https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse
Connecting to ui2web1.apps.uillinois.edu|64.22.183.24|:443... connected.
HTTP request sent, awaiting response... No data received.
Retrying.


IMO, this all points to the remote server being poorly compliant. Senthil's 
solution seems good enough here.

--
resolution:  - rejected
status: open - pending

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



[issue941346] AIX shared library fix

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Georg, the non-abiflags portion seems to need backporting.

--
assignee:  - georg.brandl
priority: release blocker - normal
status: closed - open

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Ah, there is also Mac/Makefile.in: attach also Mac/Makefile.

(and there is also Mac/PythonLauncher/Makefile.in, but I don't think that the 
issue comes from this file)

((can it be related to python*-config program?))

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +georg.brandl

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

@Georg: Is this issue a release blocker?

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

Ooops.  In fact 3.2 did well with that undocumented thing either.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Antoine Pitrou

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


--
nosy: +ned.deily

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

Here is the top-level Makefile.

--
Added file: http://bugs.python.org/file20768/Makefile

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

Interesting.  I don't see a Mac/Makefile.  Perhaps it's only pulled in with the 
framework build?

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

MACOSX_DEPLOYMENT_TARGET=10.5 made no bit of difference for me.  Steffen, I 
take it that it didn't help you either?  You said did well, but the rest of 
your text indicates otherwise. :-)

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Ah ok, the issue comes from configure.in near line 779:

Darwin*)
LDLIBRARY='libpython$(LDVERSION).dylib'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
;;

The problem is that configure.in uses libpython$(LDVERSION).dylib, whereas 
Makefile.pre.in uses libpython$(VERSION).dylib. Attached patch changes 
Makefile.pre.in to use libpython$(LDVERSION).dylib.

I don't know if this change is correct or not. I don't know if the options for 
the compilation in framework mode should be changed too. I don't know what is 
the Mac framework :-)

See also http://www.python.org/dev/peps/pep-3149/ (ABI version tagged .so files)

--
keywords: +patch
Added file: http://bugs.python.org/file20769/darwin_ldlibrary.patch

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Kelsey

Kelsey kelsey.highto...@gmail.com added the comment:

Based on the feedback, I will rework the patch to include the following:

* Produce a warning only if the user supplied Platform or License metadata is 
listed in Trove classifiers (Exact match?).

--

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

That’s not quite what the PEP says.  Please read it again and try to follow the 
text in your code.  Thanks for your work :)

--

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Alexis Metaireau

Alexis Metaireau ale...@notmyidea.org added the comment:

That's almost what the PEP says, or at least what I understand of it.

The platform and license fields should be used only if no matching classifier 
exists for them.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

Aeh, your patch does it.
You may be interested of all Mac OS X compilation notes??

/usr/bin/ranlib: file: libpython3.2m.a(dynamic_annotations.o) has no symbols
/usr/bin/ranlib: file: libpython3.2m.a(pymath.o) has no symbols
ranlib libpython3.2m.a
ranlib: file: libpython3.2m.a(dynamic_annotations.o) has no symbols
ranlib: file: libpython3.2m.a(pymath.o) has no symbols
/usr/bin/gcc   -framework CoreFoundation -o python.exe Modules/python.o 
libpython3.2m.a -ldl  -framework CoreFoundation 
building dbm using ndbm
ld: warning: directory '/usr/lib/termcap' following -L not found
In file included from /System/Library/Frameworks/Tk.framework/Headers/tk.h:78,
 from 
/Users/steffen/arena/code.extern.repos/py3k.hg/Modules/_tkinter.c:67:
/System/Library/Frameworks/Tk.framework/Headers/X11/Xlib.h:MULTIPLE: warning: 
function declaration isn’t a prototype
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused because 
linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because linking not 
done
In file included from /System/Library/Frameworks/Tk.framework/Headers/tk.h:78,
 from 
/Users/steffen/arena/code.extern.repos/py3k.hg/Modules/tkappinit.c:17:
/System/Library/Frameworks/Tk.framework/Headers/X11/Xlib.h:MULTIPLE: warning: 
function declaration isn’t a prototype
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused because 
linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because linking not 
done
/Users/steffen/arena/code.extern.repos/py3k.hg/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c:49:
 warning: function declaration isn’t a prototype
/Users/steffen/arena/code.extern.repos/py3k.hg/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c:379:
 warning: function declaration isn’t a prototype

--

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Kelsey

Kelsey kelsey.highto...@gmail.com added the comment:

Eric, I am not sure we can check for more than an exact match on Platform and 
License metadata fields.

D2 maintains a list of all Trove Classifiers which can be searched for an exact 
match; if a match is found warn the user that a Classifier should be used 
instead.

--

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



[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Egon Smiwa

Egon Smiwa smiwa.e...@googlemail.com added the comment:

You bring the tp_doc parameter pointer 
into the ownership of the new typeobject?
and tp_doc is assumed to be created by pyObject_malloc?
IMO, if CPython wants to be the owner of the string parameter,
then it should make a copy of that parameter (tp_doc) 
and become owner of that copy.

--
nosy: +Egon.Smiwa

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



[issue10709] Misc/AIX-NOTES needs updating

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Here is a first version of this doc for Python 3.2.
It would be great if someone could proof read it since I am not a native 
english speaker (though it is not high level literature...).

--
Added file: http://bugs.python.org/file20770/AIX-NOTES

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Jonathan Livni

Jonathan Livni jonathan.li...@gmail.com added the comment:

The script I used is a single file single threaded code - but - It uses 
django's ORM to get the data from a MySQL database.

I've reduced the code path to this:

import sys,os
sys.path.append(os.path.dirname(os.getcwdu()))
os.environ['DJANGO_SETTINGS_MODULE']='my_app.settings'
from django.core.management import setup_environ
from my_app import settings
setup_environ(settings)

from my_app.convert.models import SomeModel
from operator import itemgetter
from decimal import Decimal

def non_decreasing(L):
return all(x=y for x, y in zip(L, L[1:]))

raw_data =  
SomeModel.objects.filter(the_date=the_date,col1__gt=Decimal('0.2'),col2__gt=Decimal('0.2'),col3__gt=0,col4__gt=0,col5__gte=2).order_by('col6','col7','col8').values_list('col6','col7','col8','col1','col3','col2','col4')
data=defaultdict(list)

for d in raw_data:
data[d[0],d[1]].append(d[2:])

for (exp,t),d in data.iteritems():
col8s = map(itemgetter(0),d)
mids = [(x[3]+x[4])/Decimal('2.0') for x in d]
if not non_decreasing(mids):
raise Exception

--

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



[issue11223] test_threadsignals.py hanging on AIX

2011-02-16 Thread Sébastien Sablé

New submission from Sébastien Sablé sa...@users.sourceforge.net:

The test test_lock_acquire_interruption in test_threadsignals.py will lock 
forever on AIX 5.3.
It works fine on 6.1.

truss shows it is stuck in thread_tsleep:
$ truss -p 1404986
thread_tsleep(0, 0x, 0x, 0x) (sleeping...)

--
messages: 128668
nosy: sable
priority: normal
severity: normal
status: open
title: test_threadsignals.py hanging on AIX
versions: Python 3.2

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



[issue11223] test_threadsignals.py hanging on AIX

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

We have the same issue on our FreeBSD 6.4 buildbot:
http://python.org/dev/buildbot/all/builders/x86%20FreeBSD%203.x/builds/1216/steps/test/logs/stdio
(FreeBSD 7.2 is fine)

Can you tell me what the values of _POSIX_SEMAPHORES and HAVE_SEM_TIMEDWAIT are 
(or whether they are undefined)?

--
nosy: +pitrou

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



[issue11223] test_threadsignals.py hanging on AIX

2011-02-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2011-02-16 Thread Ralf Schmitt

Changes by Ralf Schmitt sch...@gmail.com:


--
nosy: +schmir

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



[issue11223] test_threadsignals.py hanging on AIX

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

$ grep SEM pyconfig.h
#define HAVE_BROKEN_POSIX_SEMAPHORES 1
/* #undef HAVE_BROKEN_SEM_GETVALUE */
#define HAVE_SEM_GETVALUE 1
#define HAVE_SEM_OPEN 1
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_SEM_UNLINK 1
/* #undef POSIX_SEMAPHORES_NOT_ENABLED */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1

--

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



[issue11192] test_socket error on AIX

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

I am not sure this is directly related, but test_socket.py will hang forever on 
AIX 6.1 when this script is run as part of make buildbottest.

It won't hang when running the script alone.

--

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



[issue11223] test_threadsignals.py hanging on AIX

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Ok, the problem is when the condition variable-based implementation is chosen 
in Python/thread_pthread.h.
It is actually reproduceable under Linux by adding `#undef USE_SEMAPHORES` just 
after `#define USE_SEMAPHORES`.
The problem is that, contrary to sem_timedwait(), pthread_cond_wait() doesn't 
have well-defined behaviour with signals. POSIX simply says:

“If a signal is delivered to a thread waiting for a condition variable, upon 
return from the signal handler the thread resumes waiting for the condition 
variable as if it was not interrupted, or it shall return zero due to spurious 
wakeup.”

So, on those OSes where the semaphore API can't be used, the test can succeed 
or not depending on how pthread_cond_wait() behaves in the face of signals. It 
would be better if it didn't hang, though.

(This is not a regression, by the way. Locks were totally uninterruptible under 
POSIX until 3.2, and the tests weren't there. The new tests were introduced in 
r87292 (see issue8844))

--
components: +Interpreter Core, Tests
nosy: +gregory.p.smith, rnk
type:  - behavior

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



[issue9523] Improve dbm modules

2011-02-16 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Thanks!

Here is my updated patch:
1, Now the dbm view objects are the same as dict view objects, which are in 
conformity with collections.KeysView, ValuesView and ItemsView.
2, I register all these abcs explicitly because these abcs have not 
__subclasshook__() method so they can't check api conformance(at lease exist) 
through isinstance(). I could not make sure api conformance except testing each 
method I find in abc explicitly. And my test_abc() is just to test the 
registering.
3, Other updates which are from comments I wrote newly on codereview: 
http://codereview.appspot.com/4185044/

--
Added file: http://bugs.python.org/file20771/issue_9523.diff

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



[issue9523] Improve dbm modules

2011-02-16 Thread Ray.Allen

Changes by Ray.Allen ysj@gmail.com:


Removed file: http://bugs.python.org/file20751/issue_9523.diff

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Here is a patch that makes the test fail rather than hang. Sébastien, can you 
try it out?

--
keywords: +patch
title: test_threadsignals.py hanging on AIX - interruption of locks by signals 
not guaranteed when the semaphore implementation is not used
Added file: http://bugs.python.org/file20772/test_threadsignals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11223
___
___
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

2011-02-16 Thread Antoine Pitrou

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


--
resolution:  - fixed
status: open - closed

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



[issue10720] test_threadsignals hang on FreeBSD 6.4

2011-02-16 Thread Antoine Pitrou

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


--
resolution:  - duplicate
status: open - closed
superseder:  - interruption of locks by signals not guaranteed when the 
semaphore implementation is not used

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Thanks Antoine, the patch solved the problem.

I have other tests locking semi-randomly on AIX 5.3 and/or AIX 6.1, like 
test_socket and test_io. That may be related.

--

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Antoine Pitrou

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


--
nosy: +db3l

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I have other tests locking semi-randomly on AIX 5.3 and/or AIX 6.1,
 like test_socket and test_io. That may be related.

Which test cases exactly?

--

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



[issue11184] Broken large file support on AIX

2011-02-16 Thread Antoine Pitrou

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


--
nosy: +georg.brandl

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Well I don't know precisely:

* when running make buildbottest, test_socket will systematically hang on AIX 
5.3 and 6.1.

* but when running ./python -Wd -E -bb Lib/test/test_socket.py, the tests 
complete rather quickly (with one failure cf 11192).

Ran 158 tests in 16.867s

FAILED (failures=1, skipped=4)

I will try with pdb or something.

--

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Well I don't know precisely:
 
 * when running make buildbottest, test_socket will systematically hang
 on AIX 5.3 and 6.1.
 
 * but when running ./python -Wd -E -bb Lib/test/test_socket.py, the
 tests complete rather quickly (with one failure cf 11192).

You can run the whole test suite in verbose mode. This will pollute your
terminal a lot, but you'll see exactly where it hangs.

Try something like ./python -E -bb -m test.regrtest -uall -v

--

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



[issue9523] Improve dbm modules

2011-02-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Here is my updated patch:
You don’t have to attach a file here, just update the codereview page instead.  
Or maybe you can’t because I created the page?

 1, Now the dbm view objects are the same as dict view objects, which
 are in conformity with collections.KeysView, ValuesView and ItemsView.
Great!  Just to make sure: How do you know that the view objects are compliant? 
 Do you test all the methods documented for the ABCs?

 2, I register all these abcs explicitly because these abcs have not
 __subclasshook__() method so they can't check api conformance(at
 lease exist) through isinstance(). I could not make sure api
 conformance except testing each method I find in abc explicitly. And
 my test_abc() is just to test the registering.

Thank you for repeating that many times and politely: I was indeed wrong.  I 
went back to  PEP 3119 to read again about __instancecheck__ and 
__subclasscheck__, then experimented in a shell and was surprised.  I have been 
misunderstanding one thing: issubclass(cls, abc) does not return true 
automatically if cls provides the methods, it’s entirely up to the ABC to check 
methods or do something else in its __subclasscheck__ or __instancecheck__ 
methods.  (I should have known better, I was in a discussion about adding that 
very feature on python-ideas and #9731!)  After another bit of experimentation 
with dict views and collections ABCs, I finally understand that you have to 
register your view classes.  Thanks for letting me correct my misunderstanding.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
assignee:  - ned.deily

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 I will try with pdb or something.

You can also try to attach gdb to the running process: with
python-gdb.py, you have nice py-* commands.

Or if you don't have gdb7, you may try my faulthandler module: you will
have to modify the source code (eg. Lib/test/regrtest.py) to add at the
top:

   import faulthandler, signal; faulthandler.register(signal.SIGUSR1)

Then you can display the current Python backtrace by sending a SIGUSR1
signal to the running Python process (eg. killall -USR1 python).

https://github.com/haypo/faulthandler/wiki

--

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-02-16 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

test_socket didnot lock this time (I will retry next).

But test_subprocess.ProcessTestCasePOSIXPurePython.test_leaking_fds_on_error 
did.

Looping forever on the following syscall:

pipe(0x2FF1FD88)= 0
kfcntl(15, F_GETFD, 0x) = 0
kfcntl(15, F_SETFD, 0x0001) = 0
kfcntl(17, F_GETFD, 0x) = 0
kfcntl(17, F_SETFD, 0x0001) = 0
pipe(0x2FF1FD88)= 0
kfcntl(18, F_GETFD, 0x) = 0
kfcntl(18, F_SETFD, 0x0001) = 0
kfcntl(19, F_GETFD, 0x) = 0
kfcntl(19, F_SETFD, 0x0001) = 0
fstatx(15, 0x2FF1FAEC, 76, 0)   = 0
kioctl(15, 22528, 0x, 0x)   Err#25 ENOTTY
fstatx(15, 0x2FF1FD7C, 76, 0)   = 0
lseek(15, 0, 1) Err#29 ESPIPE
fstatx(18, 0x2FF1FAEC, 76, 0)   = 0
kioctl(18, 22528, 0x, 0x)   Err#25 ENOTTY
fstatx(18, 0x2FF1FD7C, 76, 0)   = 0
lseek(18, 0, 1) Err#29 ESPIPE
pipe(0x2FF1FD08)= 0
kfcntl(20, F_GETFD, 0x) = 0
kfcntl(20, F_SETFD, 0x0001) = 0
kfcntl(21, F_GETFD, 0x) = 0
kfcntl(21, F_SETFD, 0x0001) = 0
sigprocmask(0, 0xF029C148, 0xF029C150)  = 0
kfork() = 2011158
thread_setmymask_fast(0x, 0x, 0x, 0xD0504100, 
0x, 0x1216F00B, 0x1216F00B, 0x) = 0x
close(21)   = 0
close(17)   = 0
close(19)   = 0
kread(20,  O S E r r o r : 2 :\0 i.., 5)  = 10
kread(20, 0x33041C38, 5)= 0
close(20)   = 0
kwaitpid(0x2FF1FB50, 2011158, 4, 0x, 0x) = 2011158
close(15)   = 0
close(18)   = 0
close(15)   Err#9  EBADF
close(18)   Err#9  EBADF
pipe(0x2FF1FD88)= 0

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
priority: normal - release blocker

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



[issue11184] Broken large file support on AIX

2011-02-16 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Antoine, do you agree?  I don't want waves of AIX changes going into 3.2 now...

--

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



[issue11184] Broken large file support on AIX

2011-02-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Assuming it doesn't break other platforms, I'm fine with it.

--

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



[issue11220] https sslv3 error 14077417: illegal parameter

2011-02-16 Thread Ian Wetherbee

Ian Wetherbee ian.wether...@gmail.com added the comment:

Any solution for 2.x? I'm using this with twisted.

--
resolution: rejected - 
status: pending - open

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



[issue11224] 3.2: tarfile.getmembers causes 100% cpu usage on Windows

2011-02-16 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

tarfile.getmembers has become extremely slow on Windows. This was triggered in 
r85916 by Lars Gustaebel on Oct 29, 2010 to add read support for all missing 
variants of the GNU sparse extensions.

To reproduce, use this tgz file:

  
http://pypm-free.activestate.com/3.2/win32-x86/pool/a/as/as.mklruntime-1.2_win32-x86_3.2_1.pypm

It contains another tgz file called data.tar.gz. Run `.getmembers()` on 
data.tar.gz.

...

This invokes tarfile._FileInFile.read(...) that seems to be cause of slowness 
(or rather a hang). 

I had to workaround this issue by monkey-patching the above `read` function to 
revert the change:

+if sys.version_info[:2] = (3,2):
+import tarfile
+class _FileInFileNoSparse(tarfile._FileInFile):
+def read(self, size):
+if size is None:
+size = self.size - self.position
+else:
+size = min(size, self.size - self.position)
+self.fileobj.seek(self.offset + self.position)
+self.position += size
+return self.fileobj.read(size)
+tarfile._FileInFile = _FileInFileNoSparse
+LOG.info('Monkey patching `tarfile.py` to disable part of r85916 (py3k)')

We caught this bug as part of testing ActiveState PyPM on Python 3.2
http://bugs.activestate.com/show_bug.cgi?id=89376#c3

If you want the easiest way to reproduce this, I can send you (in private) an 
internal build of ActivePython-3.2 containing PyPM. Running pypm install 
numpy (with breakpoints in tarfile.py) is all that is required to reproduce.

--
components: Library (Lib), Windows
messages: 128685
nosy: lars.gustaebel, srid
priority: normal
severity: normal
status: open
title: 3.2: tarfile.getmembers causes 100% cpu usage on Windows
type: resource usage
versions: Python 3.2

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



[issue11224] 3.2: tarfile.getmembers causes 100% cpu usage on Windows

2011-02-16 Thread Antoine Pitrou

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


--
type: resource usage - performance

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



[issue11220] https sslv3 error 14077417: illegal parameter

2011-02-16 Thread Ian Wetherbee

Ian Wetherbee ian.wether...@gmail.com added the comment:

This works for 2.x, I'm closing this issue:

# custom HTTPS opener, banner's oracle 10g server supports SSLv3 only
import httplib, ssl, urllib2, socket
class HTTPSConnectionV3(httplib.HTTPSConnection):
def __init__(self, *args, **kwargs):
httplib.HTTPSConnection.__init__(self, *args, **kwargs)

def connect(self):
sock = socket.create_connection((self.host, self.port), self.timeout)
if self._tunnel_host:
self.sock = sock
self._tunnel()
try:
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, 
ssl_version=ssl.PROTOCOL_SSLv3)
except ssl.SSLError, e:
print(Trying SSLv3.)
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, 
ssl_version=ssl.PROTOCOL_SSLv23)

class HTTPSHandlerV3(urllib2.HTTPSHandler):
def https_open(self, req):
return self.do_open(HTTPSConnectionV3, req)
# install opener
urllib2.install_opener(urllib2.build_opener(HTTPSHandlerV3()))

if __name__ == __main__:
r = 
urllib2.urlopen(https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse;)
print(r.read())

--
resolution:  - works for me
status: open - closed

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Are you positive that your 'all' is the builtin Python 'all'?  NumPy's 'all' 
function would behave the way you describe:

 all(x  3 for x in range(5))
False
 from numpy import all
 all(x  3 for x in range(5))
True

What does all.__module__ give?

--
nosy: +mark.dickinson

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

And voila:

 from numpy import bool_
 bool_
type 'numpy.bool_'

Case closed, I guess :)

--
resolution:  - invalid
status: open - closed

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



[issue1726687] Bug found in datetime for Epoch time = -1

2011-02-16 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Backported in r88425 (3.1) and r88427 (2.7).

--
status: open - closed

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Numpy tried to frame Python's innocent all() function.  The crime was almost 
perfect, but the forensic evidence showed that the real culprit had left behind 
a telltale underscore after the bool.

Another lurid bug report brought to justice :-)

--

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



[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

It's the same as the current tp_doc parameter for static type objects, and 
essentially like any other doc string in the C API. It's owned by the extension 
module, which must make sure it lives at least as long as the type object.

--

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2011-02-16 Thread Shannon -jj Behrens

Shannon -jj Behrens jji...@users.sourceforge.net added the comment:

The more I think about this, the more I think we should just drop it.

 * The easiest way around my original problem was to not install the eggs in 
zipped format.  That's easy.  Just mark the egg as not zip safe.
 * I don't currently need this functionality.
 * No one else is clamoring about it.

I think the increase in complexity just isn't warranted.  If someone is really 
stuck, they can just hack their own version of gettext.  It's not that big a 
deal, and it's fairly unlikely anyway.

Sorry for taking so long to respond; have 6 kids really makes keeping up with 
extracurricular activities difficult!

--

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2011-02-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Fine, let’s close this then.  Don’t hesitate to propose a patch for another bug 
report or feature request if you get enough free time someday :)

--
resolution:  - rejected
stage: patch review - committed/rejected
status: open - closed

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 That's almost what the PEP says, or at least what I understand of it.
I’ve probably misused “not quite”; I meant “not exactly”.  Allow me to try to 
translate the PEP text to pseudo-code:

 Platform (multiple use)
 A Platform specification describing an operating system supported by
 the distribution which is not listed in the Operating System Trove
 classifiers.

if 'platform' in meta:
if 'Operating System' in meta['classifiers']:
warnings.append('the platform keyword duplicates the Platform 
classifier')
else:
warnings.append('using a platform keyword instead of a classifier, 
please make sure there is no classifier for this platform')

 License (optional)
 Text indicating the license covering the distribution where the
 license is not a selection from the License Trove classifiers. See
 Classifier below. This field may also be used to specify a
 particular version of a licencse which is named via the Classifier
 field, or to indicate a variation or exception to such a license.

if 'license' in meta:
if 'License' in meta['classifiers']:
warnings.append('using a license keyword with a License classifier, 
please make sure the keyword does not duplicate the classifier but precises it')
else:
warnings.append('using a license keyword instead of a classifier, 
please make sure there is no classifier for this license')


My pseudo-code assumes that meta['classifiers'].__contains__ can get all 
matching classifiers (for example all classifiers of the 'Operating System' 
category), not just perform exact matching against a list of strings.  I’ve 
just sent a message to the fellowship ML to brainstorm about a better data 
structure to model and work with classifiers; if we reach agreement, I’ll open 
another bug about that and make this one depend on the other.

--

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



[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension

2011-02-16 Thread Jonathan Livni

Jonathan Livni jonathan.li...@gmail.com added the comment:

from pylab import *

There lies the rub?

--

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



[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Egon Smiwa

Egon Smiwa smiwa.e...@googlemail.com added the comment:

Hello, I'm just a app developer which is embedding the python32.dll
and I assumed (and wished) python would simply copy my allocated 
parameter-string into the type object (( spec-name) is copied too). I looked 
in the source and see this ownership confirmed:

static void 
type_dealloc(PyTypeObject *type)
 PyObject_Free((char *)type-tp_doc);

The typeobject owns tp_doc and even requires a special allocation 
(pyobject_malloc), which is no problem if the type creates its own copy; the 
hosting app is not connected.

--

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



[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I see. This is an issue independent of the issue discussed here, though, please 
open a new issue for that. I agree that either tp_dealloc should not release 
the string, or should make a copy that it can release.

--

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



[issue11225] getcwd fix for NetBSD to handle ERANGE errno

2011-02-16 Thread Nicolas Joly

New submission from Nicolas Joly nj...@pasteur.fr:

NetBSD do require the very same fix from issue 9185, to handle ERANGE errno 
returned when the size argument is greater than zero but smaller
than the length of the pathname plus 1.

Without it, the testsuite do indeed loops indefinitely.

Thanks.

--
components: Interpreter Core
files: python-getcwd.diff
keywords: patch
messages: 128698
nosy: njoly
priority: normal
severity: normal
status: open
title: getcwd fix for NetBSD to handle ERANGE errno
versions: Python 2.7
Added file: http://bugs.python.org/file20773/python-getcwd.diff

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



[issue11226] subprocesses experience mysterious delay in receiving stdin EOF

2011-02-16 Thread Yang Zhang

New submission from Yang Zhang yang.pythonb...@mailnull.com:

I'm seeing this issue on all the multiple Ubuntu 10.04 boxes I've tried.

I reduced a problem I was seeing in my application down into the following test 
case. In this code, a parent process concurrently spawns 2 (you can spawn more) 
subprocesses that read a big message from the parent over stdin, sleep for 5 
seconds, and write something back. However, there's unexpected waiting 
happening somewhere, causing the code to complete in 10 seconds instead of the 
expected 5.

If you set verbose=True, you can see that the straggling subprocess is 
receiving most of the messages, then waiting for the last chunk of 3 
chars---it's not detecting that the pipe has been closed. Furthermore, if I 
simply don't do anything with the second process (doreturn=True), the first 
process will never see the EOF.

Further down is some example output. When trying this out, you may need to 
increase the message size to see the behavior occur.

from subprocess import *
from threading import *
from time import *
from traceback import *
import sys
verbose = False
doreturn = False
msg = (20*4096+3)*'a'
def elapsed(): return '%7.3f' % (time() - start)
if sys.argv[1:]:
  start = float(sys.argv[2])
  if verbose:
for chunk in iter(lambda: sys.stdin.read(4096), ''):
  print  sys.stderr, '..', time(), sys.argv[1], 'read', len(chunk)
  else:
sys.stdin.read()
  print  sys.stderr, elapsed(), '..', sys.argv[1], 'done reading'
  sleep(5)
  print msg
else:
  start = time()
  def go(i):
print elapsed(), i, 'starting'
p = Popen(['python','stuckproc.py',str(i), str(start)], stdin=PIPE, 
stdout=PIPE)
if doreturn and i == 1: return
print elapsed(), i, 'writing'
p.stdin.write(msg)
print elapsed(), i, 'closing'
p.stdin.close()
print elapsed(), i, 'reading'
p.stdout.read()
print elapsed(), i, 'done'
  ts = [Thread(target=go, args=(i,)) for i in xrange(2)]
  for t in ts: t.start()
  for t in ts: t.join()

Example output:

  0.001 0 starting
  0.003 1 starting
  0.005 0 writing
  0.016 1 writing
  0.093 0 closing
  0.093 0 reading
  0.094 1 closing
  0.094 1 reading
  0.098 .. 1 done reading
  5.103 1 done
  5.108 .. 0 done reading
 10.113 0 done

--
components: Library (Lib)
messages: 128699
nosy: yaaang
priority: normal
severity: normal
status: open
title: subprocesses experience mysterious delay in receiving stdin EOF
type: behavior
versions: Python 2.6

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



[issue11227] [DOC] asyncore - use 'Host' header in HTTP example

2011-02-16 Thread Sandro Tosi

New submission from Sandro Tosi sandro.t...@gmail.com:

Hi, following up 
http://mail.python.org/pipermail/docs/2011-February/003096.html I wrote a patch 
to introduce the 'Host' header in the HTTP example of asyncore doc. I've also 
fixed an indentation error with the last 2 lines of the same example (simple 
cutpaste would fail with unexpected intentantion).

Given it's a doc issue, and it quite easy, I think it should be backported to 
the current on-maintainence releases (the example fails on all of them).

--
assignee: sandro.tosi
components: Documentation
files: asyncore-use-host-header-py3k.patch
keywords: patch
messages: 128700
nosy: sandro.tosi
priority: low
severity: normal
stage: patch review
status: open
title: [DOC] asyncore - use 'Host' header in HTTP example
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20774/asyncore-use-host-header-py3k.patch

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



[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

len(ur'\u') == len(u'\u') == 1
len(ur'\U0010') == len(u'\U0010') == 1

but

 len(ur'\n'), len(u'\n')
(2, 1)
 len(ur'\x00'), len(u'\x00')
(4, 1)

\u and \U should not be interpreted in raw Unicode strings.

--
messages: 128701
nosy: haypo
priority: normal
severity: normal
status: open
title: raw unicode strings interpret \u and \U (but not \n, \xHH, ...)
versions: Python 2.5, Python 2.6, Python 2.7

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



[issue11229] Make the Mac installer more like the Windows installer

2011-02-16 Thread Raymond Hettinger

New submission from Raymond Hettinger rhettin...@users.sourceforge.net:

The Windows installer gives a choice of two install locations, for all users 
and for the current user; the latter does not require admin rights.  

It lists optional components, giving the size of each:
- Register Extensions 2kb
- Tcl/Tk 13mb (includes IDLE)
- Documentation 5Mb
- Utility Scripts 632kb
- Test Suite 9.7Mb.  
The default is to install all of those.

The installer removes any previous versions before installing (including wiping 
their __pycache__ directories).

With the full install, the listing in All Programs (the windows parallel to the 
Application Folder) includes five entries:
- IDLE (gui)
- Module Docs (via pydoc)
- Python (command-line terminal)
- Python Manuals (points to a chm file)
- Uninstall Python.

In addition to what is offered on Windows, I think there should be an addition 
entry in the Application Folder for running the test suite so that some one can 
validate their install without going to the command-line.

--
components: Installation
messages: 128702
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Make the Mac installer more like the Windows installer
type: feature request
versions: Python 3.3

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



[issue11227] [DOC] asyncore - use 'Host' header in HTTP example

2011-02-16 Thread Antoine Pitrou

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


--
nosy: +giampaolo.rodola

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



[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This has changed in python 3, and is even documented: 
http://docs.python.org/dev/py3k/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit
 (6th bullet)

Python 2.x could not be changed, for compatibility reasons.

--
nosy: +amaury.forgeotdarc

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



[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Python 2.x could not be changed, for compatibility reasons.

Well, it is not a bug because it is documented!

 When an 'r' or 'R' prefix is used in conjunction with a 'u' or 'U' prefix, 
then the \u and \U escape sequences are processed while all other 
backslashes are left in the string. 

I agree that Python2 cannot be changed, but this behaviour is a little bit 
surprising :-) Let's move to Python3!

--
resolution:  - invalid
status: open - closed

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



[issue11229] Make the Mac installer more like the Windows installer

2011-02-16 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +ned.deily

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



[issue11227] [DOC] asyncore - use 'Host' header in HTTP example

2011-02-16 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Patch looks fine to me.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

The patch definitely helps.  However, once I get it installed, there seems to 
be no time module:
import time
   Traceback (most recent call last):
 File stdin, line 1, in module
   ImportError: No module named time

So I think there's probably still something not quite right.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

import time works for me with the patched build.  There should have been a 
warning message during the build if the time module failed to build.  Perhaps 
you have a file permissions problem?  Check your lib/python3.2/lib-dynload/ for 
file time.so 

BTW, Victor's supplied patch is fine for fixing the shared lib target but 
should not include the framework build changes - that's an unrelated issue.  I 
will upload a revised patch for review after completing some more tests.  This 
should be included in 3.2final. And we have a hole in building and testing 
shared library configurations on OS X, even though that configuration isn't 
used as much as the OS X framework one.

--

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-16 Thread John Szakmeister

John Szakmeister j...@szakmeister.net added the comment:

Looks like the time module is being built:
./build/lib.macosx-10.4-x86_64-3.2/time.so

But none of the shared modules are being installed, as 
lib/python3.2/lib-dynload is completely empty.

--

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



[issue11184] Broken large file support on AIX

2011-02-16 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

This looks to be a low risk fix-up (confined to an if $use_lfs block in 
configure.in and further guarded with a case statement restricting it to AIX 
builds).

--
nosy: +rhettinger

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



[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields

2011-02-16 Thread Kelsey

Kelsey kelsey.highto...@gmail.com added the comment:

Eric, thanks for the example. This clarifies things.

+1 on the new data structure for the classifiers

--

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



[issue11230] Full unicode import system not in 3.2

2011-02-16 Thread John

New submission from John jh45...@gmail.com:

A few months ago I read that in 3.2 it will be possible to import modules that 
are located on paths containing any unicode character. (more precisely, with 
chars not in the local code page)

After an hour or two trying to get this to work in 3.2rc3, I went looking for 
clues, and found these 2 messages in which Victor Stinner says this feature is 
delayed until Python 3.3:
http://bugs.python.org/issue3080#msg126514
http://bugs.python.org/issue10828#msg125787

Could you please make it clear in documentation and web pages, that this 
feature is not working yet. 

The Python 3.2 download page includes this:
countless fixes regarding bytes/string issues; among them full support for a 
bytes environment (filenames, environment variables)
and I guessed this must cover importing from any unicode path, as there was no 
mention that such importing had been abandoned for this version.

-- jh

--
assignee: docs@python
components: Documentation
messages: 128711
nosy: docs@python, jh45
priority: normal
severity: normal
status: open
title: Full unicode import system not in 3.2
versions: Python 3.2

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