[issue5950] Make zimport work with zipfile containing comments

2010-07-09 Thread Dmitry

Dmitry  added the comment:

I'm talking about internal zimport function (see attached testcase): 

i.e.

import sys;
sys.path.insert(0,'test.zip');

import test
test.testme()

doesn't work if test.zip contains comment.

--

___
Python tracker 

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



[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Amaury Forgeot d'Arc wrote:
> 
> Amaury Forgeot d'Arc  added the comment:
> 
>> Could you explain what this bit is about ?
>> -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS)
>> +#if defined(Py_UNICODE_WIDE) && defined(WANT_WCTYPE_FUNCTIONS)
> 
> On Windows at least, HAVE_USABLE_WCHAR_T is True, this means that Py_Unicode 
> can be converted to wchar_t.  But now that Py_UNICODE_ISSPACE() takes 
> Py_UCS4, it cannot be converted to wchar_t anymore.

Right, but you still have to check whether wchar_t is usable, don't
you ? If wchar_t is 2 bytes on a non-Windows platform, using the
wctypes functions won't work either.

The line should probably read:

#if defined(WANT_WCTYPE_FUNCTIONS) && defined(HAVE_USABLE_WCHAR_T) && 
defined(Py_UNICODE_WIDE)

> Now that the unicode database functions claim to use Py_UCS4, the functions 
> of wctypes.h are usable only if they also support Py_UCS4.
> 
> OTOH the symbol WANT_WCTYPE_FUNCTIONS is defined only if ./configure is 
> called with --with-wctype-functions, I don't expect it to be common.
> BTW, the comment says that "This reduces the interpreter's code size".  I 
> don't really agree, these functions are two-liners.

True.

The support for the wctype functions should have been remove long ago,
since they cause subtle incompatibilities between Python builds. I should
have probably never added it in the first place... people were worried
about the size of the type record tables at the time, which is why
I thought it would be a good idea to try to optionally use the C lib
functions.

The comment was true before the Python type tables were changed
into a type record database: the switch used to remove the
Python tables required for those functions. With the type records
database, this is no longer the case, since the records are also
being used for properties that are not exposed via wctype functions.

--

___
Python tracker 

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



[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2010-07-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Terry J. Reedy wrote:
> 
> Terry J. Reedy  added the comment:
> 
> This can no longer be a 2.5 issue but I am not sure how to update it.
> 
> OP apparently opened it as a feature request, so I did update it to 3.2.
>  
> But OP then says "I'm not sure if this is a functionality or documentation 
> bug." and indeed subsequent messages debate this issue. This would mean it 
> could apply to earlier versions, if re-typed.
> 
> On the other hand, there seems to be some opinion that there is no bug, or if 
> there is/was, it cannot be fixed, which would mean this should be closed.
> 
> Also, the docs seem to have already been changed, so if that were the issue, 
> this is fixed and should be closed:
>  "By default, the pickle data format uses a printable ASCII representation."
> is now
> "Protocol version 0 is the original human-readable protocol and is backwards 
> compatible with earlier versions of Python. "

I'd suggest to close the ticket.

The main idea behind version 0 was to have a readable format. The
occasional UTF-8 in the stream should be readable enough nowadays,
even if it's not ASCII.

--

___
Python tracker 

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



[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Amaury Forgeot d'Arc wrote:
> 
> Amaury Forgeot d'Arc  added the comment:
> 
> A new patch that doesn't remove an important check, avoids a crash when the C 
> macro is called with a huge number. thanks Ezio.

Could you please be more specific on what you changed ?

At least visually, there don't appear to be any differences between
v4 and v5 of the patch.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com


2010-07-19: EuroPython 2010, Birmingham, UK 9 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

___
Python tracker 

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



[issue9203] Use computed gotos by default

2010-07-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Martin v. Löwis wrote:
> 
> Martin v. Löwis  added the comment:
> 
>> No, but we do need to make sure that the casual user does not
>> run into such issues by using the default compiler on a typical
>> Unix system with Python default settings.
> 
> I think there is no risk here. The casual Python user on an AMD64 system
> where gcc is the default compiler will use the Python installation that
> comes with the operating system.

I'd be fine with enabling the switch on those platforms as well,
if we could get feedback from someone testing the behavior of gcc
on an AMD platform running Ubuntu 10.4.

If the problem is really only with the code snippet listed in the
bug report, there shouldn't be a problem and we can go ahead with
enabling computed gotos on that platform/compiler combination as well.

--

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-07-09 Thread Stefan Krah

Stefan Krah  added the comment:

[Cc: p...@python.org]

Jesse Noller  wrote:
> 
> Yes; the copyright has to stay; but the license data can leave afaik.

If R Oudkerk signed the agreement, replacing 'see COPYING.txt' with
'Licensed to PSF under a Contributor Agreement.' should be fine.

Does the PSF have the agreement?

Stefan Krah

--

___
Python tracker 

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



[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Ezio Melotti

Ezio Melotti  added the comment:

The 'if' in 'gettyperecord'. (I would also rewrite that as "if (code > 
0x10)", it looks more readable to me.)

The patch seems OK to me. In the NEWS message 'python' should be capitalized 
and I would also mention .isprintable() and possibly other functions that are 
affected directly -- mentioning repr() is good too, but it's only affected 
indirectly.

--

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2010-07-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
assignee: ghaering -> 
keywords: +easy
nosy: +flox
type:  -> behavior
versions:  -Python 2.6, Python 3.0

___
Python tracker 

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



[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Ezio Melotti wrote:
> 
> Ezio Melotti  added the comment:
> 
> The 'if' in 'gettyperecord'. (I would also rewrite that as "if (code > 
> 0x10)", it looks more readable to me.)

Ah, good catch !

> The patch seems OK to me. In the NEWS message 'python' should be capitalized 
> and I would also mention .isprintable() and possibly other functions that are 
> affected directly -- mentioning repr() is good too, but it's only affected 
> indirectly.

--

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-07-09 Thread Stefan Krah

Stefan Krah  added the comment:

If I'm not mistaken, the original code was BSD, so in the absence of a
contributor agreement one could include the full BSD license in each
file.

http://pyprocessing.berlios.de/doc/COPYING.html

--

___
Python tracker 

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



[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

str.isprintable() &co are not changed by this patch, because they enumerate 
Py_UNICODE units and do not join surrogates. See issue9200

--

___
Python tracker 

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



[issue9210] remove --with-wctype-functions configure option

2010-07-09 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc :

Quoting Marc-Andre Lemburg:
"""
The support for the wctype functions should have been remove long ago,
since they cause subtle incompatibilities between Python builds. I should
have probably never added it in the first place... people were worried
about the size of the type record tables at the time, which is why
I thought it would be a good idea to try to optionally use the C lib
functions.

The comment was true before the Python type tables were changed
into a type record database: the switch used to remove the
Python tables required for those functions. With the type records
database, this is no longer the case, since the records are also
being used for properties that are not exposed via wctype functions.
"""

--
components: Unicode
messages: 109696
nosy: amaury.forgeotdarc, ezio.melotti, lemburg
priority: normal
severity: normal
status: open
title: remove --with-wctype-functions configure option
versions: Python 3.2

___
Python tracker 

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



[issue9211] Cannot close socket after ssl handshake failed

2010-07-09 Thread Christian Hager

New submission from Christian Hager :

When running a SSL socket server in Python 2.5 or 2.6 (didn't try with newer 
versions), new connections are setup with "ssl.wrap_socket()". Everything works 
fine if I connect a client with SSL, but if I just telnet to the server it's 
not possible to close the socket anymore (receiving data works fine through the 
non-ssl socket though).

I get a SSL exception like this: "SSLError: [Errno 1] _ssl.c:480: 
error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol". After 
that I am not able to close the socket, but still can send data on the 
non-ssl-wrapped socket. How would I close this now open non-ssl socket?

Simplified code:

read_sockets,write_sockets,error_sockets = select.select(CONNECTION_LIST,[],[])
for sock in read_sockets:
if sock == server_socket:
newsock, addr = server_socket.accept()

# SSL Setup
try:
sslsock = ssl.wrap_socket(newsock, server_side=True, 
certfile="../cert.pem", keyfile="../cert.pem")
CONNECTION_LIST.append(sslsock)
except:
print "ssl handshake failed"

try: 
newsock.send("bye\r\n") # succeeds
newsock.close() # doesn't work

--
components: IO
messages: 109697
nosy: metachris
priority: normal
severity: normal
status: open
title: Cannot close socket after ssl handshake failed
versions: Python 2.5, Python 2.6

___
Python tracker 

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



[issue3214] Suggest change to glossary explanation: "Duck Typing"

2010-07-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I actually would challenge the first sentence "A pythonic programming
> style which determines an object’s type by inspection of its method or
> attribute signature ". To me, and at least some usage on python-list,
> duck-typing means determining the interface (not type) by calling
> methods and catching exceptions if not present. This is the EAFP
> rather than inspection/LBYL style of duck typing.

Indeed. I would also remove "pythonic", because it will only confuse the
beginner.

--

___
Python tracker 

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



[issue2009] Grammar change to prevent shift/reduce problem with varargslist

2010-07-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

+!. I had to do a very similar refactoring recently when trying to fix the 
parser module to understand keyword-only arguments and annotations.

Taking keyword-only arguments into account, I think the replacement needs to be:

varargslist: (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' 
   ['*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef]]
 |  '*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef)

and the analogous replacement needs to be made in the production for 
'typedargslist', too.

BTW, I'm a bit surprised that the grammar doesn't allow for trailing commas 
after keyword-only arguments:  that is,

def f(a, b,): ... is fine, but
def f(*, a, b,): ...  is a SyntaxError

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This has broken all non-Windows buildbots. Can you take a look?

--
nosy: +pitrou

___
Python tracker 

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



[issue9208] SMTPHandler does not handle unicode strings

2010-07-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> vinay.sajip
nosy: +vinay.sajip
versions: +Python 3.2 -Python 2.5, Python 2.6

___
Python tracker 

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



[issue2009] Grammar change to prevent shift/reduce problem with varargslist

2010-07-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a patch.

I'm assuming that this doesn't violate the moratorium, since it's not so much a 
change to the grammar itself as a modification to the way that it's expressed.

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

___
Python tracker 

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



[issue9198] Should repr() print unicode characters outside the BMP?

2010-07-09 Thread Ezio Melotti

Ezio Melotti  added the comment:

Here is a patch to "fix" sys_displayhook (note: the patch is just a proof of 
concept -- it seems to work fine but I still have to clean it up, add comments, 
rename and reorganize some vars and add tests).
This is an example output while using iso-8859-1 as IO encoding:

w...@linuxvm:~/dev/py3k$ PYTHONIOENCODING=iso-8859-1 ./python
Python 3.2a0 (py3k:82643:82644M, Jul  9 2010, 11:39:25)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; sys.stdout.encoding, sys.stdin.encoding
('iso-8859-1', 'iso-8859-1')
>>> 'ascii string'
'ascii string'  # works fine
>>> 'some accented chars: öäå'
'some accented chars: öäå'  # works fine - these chars are encodable
>>> 'a snowman: \u2603'
'a snowman: \u2603'  # non-encodable - the char is escaped instead of raising 
an error
>>> 'snowman: \u2603, and accented öäå'
'snowman: \u2603, and accented öäå' # only non-encodable chars are escaped
>>> # the behavior of print is still the same:
>>> print('some accented chars: öäå') 
some accented chars: öäå
>>> print('a snowman: \u2603')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2603' in position 
11: ordinal not in range(256)

-

While testing the patch with PYTHONIOENCODING=iso-8859-1 I also found this 
weird issue that however is *not* related to the patch, since I managed to 
reproduce on a clean py3k using PYTHONIOENCODING=iso-8859-1:
>>> 'òàùèì  óáúéí  öäüëï'
'ò�\xa0ùèì  óáúé�\xad  öäüëï'
>>> 'òàùèì  óáúéí  öäüëï'.encode('iso-8859-1')
b'\xc3\xb2\xc3\xa0\xc3\xb9\xc3\xa8\xc3\xac  
\xc3\xb3\xc3\xa1\xc3\xba\xc3\xa9\xc3\xad  
\xc3\xb6\xc3\xa4\xc3\xbc\xc3\xab\xc3\xaf'
>>> 'òàùèì'.encode('utf-8')
b'\xc3\x83\xc2\xb2\xc3\x83\xc2\xa0\xc3\x83\xc2\xb9\xc3\x83\xc2\xa8\xc3\x83\xc2\xac'

I think there might be some conflict between the IO encoding that I specified 
and the one that my terminal actually uses, but I couldn't figure out what's 
going on exactly (it also weird that only 'à' and 'í' are not displayed 
correctly). Unless this behavior is expected I'll open another issue about it.

--
keywords: +patch
Added file: http://bugs.python.org/file17915/issue9198.diff

___
Python tracker 

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



[issue9208] SMTPHandler in the logging module does not handle unicode strings

2010-07-09 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
title: SMTPHandler does not handle unicode strings -> SMTPHandler in the 
logging module does not handle unicode strings

___
Python tracker 

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



[issue9211] Cannot close socket after ssl handshake failed

2010-07-09 Thread Christian Hager

Christian Hager  added the comment:

Sorry for posting that issue -- I was able to solve it with 
newsock.shutdown(socket.SHUT_WR) ("newsock.shutdown(socket.SHUT_RD)" doesn't 
work for that).

# SSL Setup
try:
sslsock = ssl.wrap_socket(newsock, server_side=True, 
certfile="../cert.pem", keyfile="../cert.pem")
CONNECTION_LIST.append(sslsock)

except:
print "ssl handshake failed"
newsock.shutdown(socket.SHUT_WR)
newsock.close()

--
status: open -> closed

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread Andrew Clegg

Changes by Andrew Clegg :


Removed file: http://bugs.python.org/file17901/py3k-fnmatch.patch

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread Andrew Clegg

Changes by Andrew Clegg :


Removed file: http://bugs.python.org/file17902/py27-fnmatch.patch

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread Andrew Clegg

Andrew Clegg  added the comment:

OK, regenerated both patches from the top level of the checkout (paths within 
the patch are 'Lib/fnmatch.py' and 'Lib/test/test_fnmatch.py'.

Sorry about the corrupted patch before - I've tested this version by reverting 
my changes and reapplying it, and it seems to work cleanly.

Cheers

--
Added file: http://bugs.python.org/file17916/py27-fnmatch.patch

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread Andrew Clegg

Changes by Andrew Clegg :


Added file: http://bugs.python.org/file17917/py3k-fnmatch.patch

___
Python tracker 

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



[issue2009] Grammar change to prevent shift/reduce problem with varargslist

2010-07-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

> BTW, I'm a bit surprised that the grammar doesn't allow for trailing commas 
> after keyword-only arguments:  that is,
>
> def f(a, b,): ...     is fine, but
> def f(*, a, b,): ...  is a SyntaxError

That seems more like an oversight than a deliberate restriction. Does
your patch eliminate the discrepancy?

(And agreed the moratorium doesn't apply).

--

___
Python tracker 

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



[issue2009] Grammar change to prevent shift/reduce problem with varargslist

2010-07-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

No,  "def f(*, a,): ..." is still a SyntaxError with the patch.  I'd think that 
allowing that extra comma *would* be a violation of the moratorium, though 
maybe it's debatable.  Perhaps worth bringing up on python-dev?

--

___
Python tracker 

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



[issue2009] Grammar change to prevent shift/reduce problem with varargslist

2010-07-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

> No,  "def f(*, a,): ..." is still a SyntaxError with the patch.  I'd think 
> that allowing that extra comma *would* be a violation of the moratorium, 
> though maybe it's debatable.  Perhaps worth bringing up on python-dev?

Good point - I just wouldn't worry about it in that case.

--

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Instead of writing `bytes('foo', encoding='ascii')`, you can just write 
`b'foo'`. Otherwise, patch looks ok.

--
nosy: +pitrou

___
Python tracker 

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



[issue1945] Document back ported C functions

2010-07-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: georg.brandl -> d...@python
nosy: +d...@python

___
Python tracker 

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



[issue5962] Ambiguity about the semantics of sys.exit() and os._exit() in multithreaded program

2010-07-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +exarkun, gps

___
Python tracker 

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



[issue4609] Allow use of > 256 FD's on solaris in 32 bit mode

2010-07-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

3.x doesn't use FILE pointers for the main I/O library (it uses unbuffered I/O 
instead). It only uses them for importing, and a couple of extension modules 
such as bz2 and zipimport.

It might still mean, though, that a Python program opening many files might 
fail importing a module afterwards.

--
nosy: +loewis, pitrou

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread Andrew Clegg

Andrew Clegg  added the comment:

Updated py3k patch to use the more concise bytes syntax, cheers.

--
Added file: http://bugs.python.org/file17918/py3k-fnmatch.patch

___
Python tracker 

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



[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-09 Thread Jesse Noller

Jesse Noller  added the comment:

I'm not sure if there would still be the possibility; the thing which worries 
me is the debug() function vanishing on us - something not good is happening on 
interpreter shutdown.

--

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-07-09 Thread Jesse Noller

Jesse Noller  added the comment:

Hi Stefan - I'm familiar with the license/etc of the original module. This bug 
isn't urgent; I shot a quick email to the PSF's secretary Pat to confirm we 
have a contributor agreement however.

--

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-07-09 Thread Stefan Krah

Stefan Krah  added the comment:

Jesse, there's no doubt that you know the original license. :)

I should have been more verbose: My BSD comment was intended for public
consumption. People often think GPL if they see a reference to COPYING.txt.

--

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-07-09 Thread Jesse Noller

Jesse Noller  added the comment:

Egad No! I gotcha. I'll find out what the deal with the contrib. agreement is. 
Pretty sure we had to wait on it when we brought it in.

--

___
Python tracker 

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



[issue9210] remove --with-wctype-functions configure option

2010-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Patch attached.

--
keywords: +patch
Added file: http://bugs.python.org/file17919/kill-wctype.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I'm building now and will report back shortly...

--
Added file: http://bugs.python.org/file17920/smime.p7s

___
Python tracker 

___

smime.p7s
Description: S/MIME cryptographic signature
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Also, GetFinalPathNameByHandle() is called 5 times with VOLUME_NAME_DOS, and 
once with VOLUME_NAME_NT.  This one looks suspect to me.

[I noticed this because these symbols are not defined with the SDK shipped with 
VS8.0. I'll propose another patch for this]

--

___
Python tracker 

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



[issue9210] remove --with-wctype-functions configure option

2010-07-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Amaury Forgeot d'Arc wrote:
> 
> Amaury Forgeot d'Arc  added the comment:
> 
> Patch attached.

Thanks. The patch looks good and I'd be +1 on applying it.

The only problem I see is that we may have to follow the deprecation
process.

OTOH, I've announce the plan in 2004 and confirmed it again in 2005:

http://mail.python.org/pipermail/python-dev/2004-December/050193.html
http://mail.python.org/pipermail/python-dev/2005-April/052989.html

--

___
Python tracker 

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



[issue9038] test_distutils failure

2010-07-09 Thread R. David Murray

R. David Murray  added the comment:

I see this error too, but only when running under -j.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> r.david.murray

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Here's a patch to address the posix failures:

- test_posixpath seems to have lost the creation of one test file.
- WindowsError doesn't exist on other platforms, so it can't be caught directly 
(in tarfile.py). I've written a work-around, but I don't particularly like it 
(catches all exceptions and tests the name).

There were three other tests that reported BAD for me.

test_os and test_subprocess were reporting bad due to skipped tests. I presume 
this will not break the buildbots?

test_readline is failing on readline.clear_history because it appears that 
attribute doesn't exist. I suspect this error is not related to the symlink 
patch.

--
Added file: http://bugs.python.org/file17921/posix-failures.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file17920/smime.p7s

___
Python tracker 

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



[issue2044] test_sunaudiodev.py converted to unittest

2010-07-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Not in Py3.

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

___
Python tracker 

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



[issue2024] test_gl.py converted to unittest

2010-07-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Not in Py3.

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

___
Python tracker 

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



[issue2022] test_al converted to unittest

2010-07-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Not in Py3.

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

___
Python tracker 

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



[issue2023] test_cd converted to unittest

2010-07-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Not in Py3.

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

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Hm, the patch could be more "pythonic". Something like:

symlink_exception = (AttributeError,)
try:
symlink_exception += (NotImplementedError, WindowsError)
except NameError:
pass

try:
...
except symlink_exception:
...

--

___
Python tracker 

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



[issue5121] PyRun_InteractiveLoop disagrees with documentation?

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm assuming that this will be a doc change, in which case it applies to all 
versions.  The comment is actually against PyRun_InteractiveLoopFlags.

--
assignee:  -> d...@python
components: +Documentation -Interpreter Core
nosy: +BreamoreBoy, d...@python
stage:  -> needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Hm, the patch could be more "pythonic". Something like:
> 
> symlink_exception = (AttributeError,)
> try:
> symlink_exception += (NotImplementedError, WindowsError)
> except NameError:
> pass

Probably better as:

symlink_exception = (AttributeError, NotImplementedError)
try:
symlink_exception += (WindowsError,)
except NameError:
pass

--

___
Python tracker 

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



[issue5089] Error in atexit._run_exitfuncs [...] Exception expected for value, tuple found

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can this be reproduced with 3.1, 3.2 or even 2.7, or can it be closed?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue749722] isinstance and weakref proxies.

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Being seven years old is this request still valid, or has it been overtaken by 
events?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5089] Error in atexit._run_exitfuncs [...] Exception expected for value, tuple found

2010-07-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

I haven't seen this for a while;  it can probably be closed.  Thanks!

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

___
Python tracker 

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



[issue2600] BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Pau, this isn't likely to be progressed unless you can provide a unit test and 
possibly doc patches as well.

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue9033] cmd module tab misbehavior

2010-07-09 Thread Zvezdan Petkovic

Zvezdan Petkovic  added the comment:

Does a translation really need to be in Python?

I use .editrc file in my home directory with this content:

python:bind ^I rl_complete

and everything works fine.

--
nosy: +zvezdan

___
Python tracker 

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



[issue4140] urllib2: request with digest auth through proxy fail

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

As it's not actually known whether urllib2 or IIS is at fault, I suggest this 
is closed, it can always be reopened.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue7846] Fnmatch cache is never cleared during usage

2010-07-09 Thread R. David Murray

R. David Murray  added the comment:

Committed to py3k in r82730, 3.1 in r82733, 2.7 in r82732, and, since 2.6.6 is 
still to come, 2.6 in r82740.

Andrew: FYI I changed the assertTrue to assertLessEqual to take advantage of 
the better failure messages provided by the newer unittest methods.

Thanks for the patch.

--
resolution: accepted -> fixed
stage: unit test needed -> committed/rejected
status: open -> closed
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



[issue902065] fails building C++ extensions when configured --without-cxx

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

This can be closed as a duplicate as Lib/distutils/sysconfig.py already refers 
to LDSHARED and CCSHARED.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-09 Thread Greg Brockman

Greg Brockman  added the comment:

Think http://www.mail-archive.com/python-l...@python.org/msg282114.html is 
relevant?

--

___
Python tracker 

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



[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-09 Thread Jesse Noller

Jesse Noller  added the comment:

Greg - yeah. it's the same problem.

--

___
Python tracker 

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



[issue921868] socket_htons does not work under AIX 64-bit

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Do the socket tests still fail under 64 bit AIX?  If yes could this patch or 
something similar be applied?  If no please close this issue.

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-07-09 Thread Brian Curtin

Brian Curtin  added the comment:

Committed Jason's patch with Antoine's twist as r82743 after running on Arch 
Linux. Thanks for catching and looking into this stuff.

--

___
Python tracker 

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



[issue877904] freeze: problems excluding site

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

This strikes me as a reasonable request, would someone please like to comment.

--
nosy: +BreamoreBoy
versions: +Python 3.1 -Python 2.7

___
Python tracker 

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



[issue1053687] PyOS_InputHook not called in IDLE subprocess

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Wuld anyone with the relevant expertise care to comment on this please?

--
nosy: +BreamoreBoy
title: PyOS_InputHook not called in subprocess -> PyOS_InputHook not called in 
IDLE subprocess
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-09 Thread Ask Solem

Changes by Ask Solem :


--
nosy: +asksol

___
Python tracker 

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



[issue1040439] Missing documentation on How To Link With libpython

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

The number of google hits tells me this is still an issue.

--
assignee:  -> d...@python
nosy: +BreamoreBoy, d...@python
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue8402] glob returns empty list with "[" character in the folder name

2010-07-09 Thread Eric Smith

Eric Smith  added the comment:

The note about no quoting meta-chars is in the docstring for fnmatch.translate, 
not the documentation. I still see it in 3.1. I have a to-do item to add this 
to the actual documentation. I'll add an issue.

--

___
Python tracker 

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



[issue1178136] cgitb.py support for frozen images

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

This is a small patch which could be useful, could someone please test it 
against a frozen program?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1158231] string.Template does not allow step-by-step replacements

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Stefan, could you provide a patch to move this forward, can this issue be 
closed, or what?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1158231] string.Template does not allow step-by-step replacements

2010-07-09 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.1 -Python 2.7

___
Python tracker 

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



[issue9033] cmd module tab misbehavior

2010-07-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

We either have to add some translation, or tweak parts of python:

* the cmd module needs to learn how to configure libedit when
  the readline extension was linked to libedit

* the rlcompleter documentation needs to be updated to do the same

And that's just the stdlib. IIRC ipython contains code that uses libedit
style configuration instead of readline when using /usr/bin/python on OSX, and 
there are probably other.

IMHO the current behavior is confusing: the module is named readline, but 
sometimes uses libedit behavior. At least I ensured that the usage of libedit 
can be detected by introspecting readline.__doc__.

A basic translator shouldn't be that hard...

--

___
Python tracker 

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



[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Anyone with Windows threading experience who could comment on this please, i.e. 
is it still an issue?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-09 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue6507] Enhance dis.dis to autocompile codestrings

2010-07-09 Thread Éric Araujo

Changes by Éric Araujo :


--
resolution: accepted -> fixed

___
Python tracker 

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



[issue1248658] dir should accept dirproxies for __dict__

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Ronald has this already been implemented, if not could you provide a patch for 
it, or what?

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue921868] socket_htons does not work under AIX 64-bit

2010-07-09 Thread Stefan Krah

Stefan Krah  added the comment:

The proposed change was for socket_htons() to use ints instead of
unsigned longs. This is the case now, so I'm closing the issue.

--
nosy: +skrah
resolution:  -> out of date
stage: unit test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue1248658] dir should accept dirproxies for __dict__

2010-07-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

AFAIK this is not yet implemented.

Patched would be appreciated. I will get around to doing it myself some day, 
but this issue doesn't have high priority for me.

--
priority: normal -> low

___
Python tracker 

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



[issue1250] Building external modules using Sun Studio 12

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm assuming this is still an issue, comments please.

--
components:  -Distutils
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue5024] sndhdr.whathdr returns -1 for WAV file frame count

2010-07-09 Thread Robert Pyle

Robert Pyle  added the comment:

On Jul 8, 2010, at 6:52 PM, Mark Lawrence wrote:

>
> Mark Lawrence  added the comment:
>
> Robert, could you provide a patch for this?
>
> --
> nosy: +BreamoreBoy
> stage:  -> needs patch
> versions: +Python 3.2
>
> ___
> Python tracker 
> 
> ___

Okay, I'm not sure exactly how I'm supposed to go about this.  Here's  
the output from diff   for sndhdr.py

131d130
< import wave
135,141c134,138
< f.seek(0)
< try:
< w = wave.openfp(f, 'r')
< except (EOFError, wave.Error):
< return None
< return ('wav', w.getframerate(), w.getnchannels(), \
< w.getnframes(), 8*w.getsampwidth())
---
 > style = get_short_le(h[20:22])
 > nchannels = get_short_le(h[22:24])
 > rate = get_long_le(h[24:28])
 > sample_bits = get_short_le(h[34:36])
 > return 'wav', rate, nchannels, -1, sample_bits
$

All I did was use test_aifc() as inspiration, so the patched sndhdr.py  
calls wave.py to get the file parameters.

Here's the new test_wav() in its entirety:


def test_wav(h, f):
 import wave
 # 'RIFF'  'WAVE' 'fmt ' 
 if h[:4] != 'RIFF' or h[8:12] != 'WAVE' or h[12:16] != 'fmt ':
 return None
 f.seek(0)
 try:
 w = wave.openfp(f, 'r')
 except (EOFError, wave.Error):
 return None
 return ('wav', w.getframerate(), w.getnchannels(), \
 w.getnframes(), 8*w.getsampwidth())


If you want anything else, please ask.

Bob Pyle

--

___
Python tracker 

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



[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Just a one line addition to mimetypes.py

--
nosy: +BreamoreBoy
stage:  -> patch review
versions: +Python 3.1, Python 3.2

___
Python tracker 

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



[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can anyone with a Linux box please check to see if this is still an issue.

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0

___
Python tracker 

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



[issue4044] test_output_textcalendar fails on non-englisch locale

2010-07-09 Thread R. David Murray

R. David Murray  added the comment:

This passes for me on linux (2.7), which is what I would expect, since the 
locale should not actually affect a python program unless locale.setlocale is 
called, which regrtest doesn't do.

I also tried OSX 2.7+, and the 10.4 system python (2.6.1).  test_calendar 
passed using the specified command line in all cases.

Can anyone reproduce this issue?

--
nosy: +r.david.murray
resolution:  -> works for me
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

What platform is this on?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights

2010-07-09 Thread Mark Lawrence

Changes by Mark Lawrence :


--
stage:  -> unit test needed
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5

___
Python tracker 

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



[issue5347] SocketIO redefines RawIOBase.__del__

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Does anyone need to do anything with this, or can it be closed?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5384] mmap and exception type

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Could someone please advise on the appropriate exception types for mmap.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

2010-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Yes, py3k r82745 still shows the problem

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue2941] Propagate define to resurce mingw32 compile

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm not entirely sure what msg67184 means but the patch is simple enough.

--
nosy: +BreamoreBoy
stage:  -> unit test needed
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6

___
Python tracker 

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



[issue5412] extend configparser to support [] syntax

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Patch is simple, are people for or against syntactic sugar in configparser?

--
nosy: +BreamoreBoy
stage:  -> unit test needed
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue5424] Packed IPaddr conversion tests should be extended

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Adding tests into test_socket.py for invalid input can't be wrong can it?  
Patch seems clean but would someone cast a more experienced Mk1 eyeball over it 
please.

--
nosy: +BreamoreBoy
stage:  -> patch review
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue9189] Improve CFLAGS handling

2010-07-09 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

Hearing no further comments, I've committed this as r82746. Let me know if it 
breaks anything.

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



[issue444582] Finding programs in PATH, adding shutil.which

2010-07-09 Thread Jan Killian

Jan Killian  added the comment:

@tarek:

Sorry for not reacting, it completely vaporized out of my head. I'll do the 
patch this weekend.

Agree, only which/which_files belong to public API.

Regarding PATHEXT:

1. When a new process is created, the value is taken from registry variable 
PATHEXT in the 'HKCU\Environment' key, or the 
'HKLM\System\CurrentControlSet\Control\Session Manager\Environment' key (in 
this order). The first key is for custom user values, and PATHEXT is not set by 
default there. The second key is a system-wide setting and defaults to:
A. ".COM;.EXE;.BAT;.CMD" in Windows NT, and possibly also W2K (although it is 
already 5.0 version)
B. ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH" in Wine [01], XP and WS 
2003 [02]
C. ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" in Vista and W7 and 
possibly also WS 2008.

2. When the PATHEXT is missing, or is set to be empty in registry, or  is set 
to be empty in the shell via "set PATHEXT=", then:
A. CMD.EXE, START.EXE and standard exec do use the default value, which is 
probably hardcoded somewhere (not taken from registry) ... tested on XP only
B. Wine [11] uses a hardcoded ".BAT;.COM;.CMD;.EXE" (I can't say I do see the 
reasons for this particular order)
C. GnuWin32 which utility [12] uses a hardcoded ".COM;.EXE;.BAT;.CMD"

So, in the corner case when the PATHEXT is set empty for whatever reason, we 
have basically the following options:

1. Find some magical way how to get the default value from windows. Any brave 
soul to fight this?

2. Stick with basic NT setting ".COM;.EXE;.BAT;.CMD", and document that it 
doesn't always match the execution behaviour in this case, eg. that .JS file 
would get executed on XP, but won't be found by which()

3. Resemble CMD.EXE/START.EXE and standard windows exec behavior, and hardcode 
the values for different windows versions from NT to W7, and for Wine. This is 
quite simple to do, as windows versions are well documented in 
platform.release()(we don't actually have to call this function, just check 
into which of the 3 intervals the current windows version fits). To do so, I 
only need someone to verify the correct default PATHEXT for W2K and WS 2008, as 
I do not have access to these.

My .02$ for 3, as this is what user expects.

What do you think?

[01]
http://source.winehq.org/source/tools/wine.inf.in#L556
http://archives.free.net.ph/message/20091231.134245.fce4d24a.en.html

[02]
http://technet.microsoft.com/en-us/library/bb490998.aspx
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
http://technet.microsoft.com/en-us/library/cc772691(WS.10).aspx
(the manual is same for XP and WS 2003 so maybe they just used copy/paste 
without checking.

[11]
http://source.winehq.org/source/programs/cmd/wcmdmain.c#L1019

[12]
http://gnuwin32.sourceforge.net/packages/which.htm
see which-2.20-src.zip / ... / which-2.20-src.diff line 388

--

___
Python tracker 

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



[issue1147646] Windows deadlock with PyEval_ReleaseLock

2010-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This issue looks invalid to me: PyEval_ReleaseLock manipulates the interpreter 
lock, but not the thread state.
Both have to be released/reset before another thread can install its own thread 
state and run.

In other words, PyEval_SaveThread() should be used instead (and 
PyEval_RestoreThread() at the end, but the example code does not care to 
finalize the interpreter)

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue9200] str.isprintable() is always False for large code points

2010-07-09 Thread Adam Olsen

Adam Olsen  added the comment:

There should be a way to walk the unicode string in Python too.  Afaik there 
isn't.

--
nosy: +Rhamphoryncus

___
Python tracker 

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



[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

2010-07-09 Thread Stefan Krah

Stefan Krah  added the comment:

Yes, it's an issue in py3k. Also, I prefer the behavior of 2.5, but
I'm not sure if that can be changed easily in 2.7.


$ python2.5 -c 'print((1, 2, 3))' > /dev/full
close failed: [Errno 28] No space left on device

$ python2.7 -c 'print((1, 2, 3))' > /dev/full
close failed in file object destructor:
Error in sys.excepthook:

Original exception was:


$ python3.2 -c 'print((1, 2, 3))' > /dev/full
$

--
nosy: +skrah

___
Python tracker 

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



[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2010-07-09 Thread Mark Lawrence

Mark Lawrence  added the comment:

Is this problem repeatable?  I haven't got a big enough box on which to try 
this out.

--
nosy: +BreamoreBoy
versions: +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



[issue7268] 2to3 execfile conversion changes behavior

2010-07-09 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file15273/unnamed

___
Python tracker 

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



[issue7268] 2to3 execfile conversion changes behavior

2010-07-09 Thread Éric Araujo

Éric Araujo  added the comment:

Not sure if this merits a new bug report: The conversion currently promotes the 
open().read() anti-pattern, which is not guaranteed to release file handles as 
soon as possible in all VMs. Using a with block would fix that.

--
nosy: +merwok

___
Python tracker 

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



  1   2   >