[issue4918] Windows installer created with Python 2.5 does not work with Python 2.6.1

2009-01-11 Thread Juha Rantanen

Juha Rantanen  added the comment:

Python 2.6.1 was installed with option all users. I have admin rights
and the Windows version is:
XP Professional
Version 2002
Service Pack 3

___
Python tracker 

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



[issue4918] Windows installer created with Python 2.5 does not work with Python 2.6.1

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Was the 2.6 installation "for all users", or "just for me"? What Windows
version are you using?

--
nosy: +loewis

___
Python tracker 

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



[issue4918] Windows installer created with Python 2.5 does not work with Python 2.6.1

2009-01-11 Thread Juha Rantanen

New submission from Juha Rantanen :

1. Create Windows installer with Python 2.5 from attached project.
2. Install it with Python 2.6.1.
3. The post-installer will fail with error message: 
*** run_installscript: internal error 0x ***

The code causing this is:

import socket

and the actual error is:

ImportError
DLL load failed: The specified module could not be found.
  File "", line 6, in windows_binary_install
  File "c:\apps\python26\lib\socket.py", line 46, in 
import _socket

If the installer is created with Python 2.6.1, it works fine. 

The problem was noticed in the Robot Framework project and the issue can
be found from http://code.google.com/p/robotframework/issues/detail?id=196.

This problem was first asked as part of issue
http://bugs.python.org/issue4566, but Martin v. Löwis recommended to
open new issue for this.

--
components: Distutils
files: simple.zip
messages: 79647
nosy: rantanen
severity: normal
status: open
title: Windows installer created with Python 2.5  does not work with Python 
2.6.1
versions: Python 2.6
Added file: http://bugs.python.org/file12694/simple.zip

___
Python tracker 

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



[issue4881] Python's timezon handling: daylight saving option

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

For Ubuntu Intrepid, you need the package tzdata 2008h-2ubuntu1
installed; it contains a correction for the Argentinian DST definition.
Intrepid itself only shipped with 2008h-2.

Closing this as third-party.

--
resolution:  -> works for me
status: open -> closed
versions: +3rd party

___
Python tracker 

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



[issue3826] Problem with SocketIO for closing the socket

2009-01-11 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Committed all of our tests and the actual code to fix the problem from 
socket_real_close-5.patch in py3k r68539.

This still needs back porting to release30-maint assuming no other 
issues are found with it.

--
keywords:  -needs review

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Alex Robinson

Alex Robinson  added the comment:

Oh gob. I left a debug artifact in that code.

wavs= [ wavs, wv ]

needs to be without the 'wv'.

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Alex Robinson

Alex Robinson  added the comment:

Oh golly. I was confused. For some reason I was thinking
"writesamples()" when using "writeframes()".

So the current code reads ok. Which makes this "bug" a request for
writesamples() and readsamples() to be added to wave.py. They would
shield sleep deprived saps from the .wav file data frame format. :)


Here are python2.4-ish versions written for outside wave.py. Combos of 8
and 16 bit samples, mone and stereo, are tested. I did not test the
32-bit sample logic.

Sample values are expected to be +-32767 or +-128 ints (or +-2.x gig if
32-bit).


def readsamples(wf, nframes) :
""" Read an array of number-of-channels normalized int sample
arrays. """

wav = wf.readframes(nframes)

ifwf.getsampwidth() == 4 :
wav = struct.unpack("<%ul" % (len(wav) / 4), wav)
elif  wf.getsampwidth() == 2 :
wav = struct.unpack("<%uh" % (len(wav) / 2), wav)
else :
wav = struct.unpack("%uB"  %  len(wav),  wav)
wav = [ s - 128 for s in wav ]

nc  = wf.getnchannels()
if  nc > 1  :
wavs= []
for i in xrange(nc) :
wavs.append([ wav[si] for si in xrange(0, len(wav), nc) ])
pass
else :
wavs= [ wav ]

return(wavs)



def writesamples(wf, wavs) :
"""
Write samples to the wave file.
'wavs' looks like this:
   [ left_channel_samples,  right_channel_samples ]
or [ left_channel_samples ]
or   mono_samples
This routine calls setnchannels() from information about 'wavs'
length.
"""

if  wavs :
if  len(wavs) not in [ 1, 2, 4 ] :
wavs= [ wavs, wv ]

wf.setnchannels(len(wavs))

if  len(wavs)   > 1 :
wav = []
for w in zip(*wavs):
wav+= w
pass
else :
wav = wavs[0]

ifwf.getsampwidth() == 4 :
ws  = array.array('l', [ s   for s in wav ])
elif  wf.getsampwidth() == 2 :
ws  = array.array('h', [ s   for s in wav ])
else :
ws  = array.array('B', [ s + 128 for s in wav ])

ws  = ws.tostring()

wf.writeframes(ws)

pass

# end of code to edit and insert in wave.py

--
type: behavior -> feature request

___
Python tracker 

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



[issue4881] Python's timezon handling: daylight saving option

2009-01-11 Thread Pablo Castagnino

Pablo Castagnino  added the comment:

the last post on that link is the point - python supports daylight
savings, but if
your city recently started using daylight savings, and didn't before,
then either
python or linux needs to be updated to know that.

I'm using Ubuntu Intrepid Ibex.

___
Python tracker 

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



[issue4508] distutils compiler not handling spaces in path to output/src files

2009-01-11 Thread Brian Thorne

Brian Thorne  added the comment:

Ok - this bug has nothing to do with weave itself. I think any extension
written in C or C++ that has a space in the filename will raise the
error in both windows and gnu/linux.
Here is a simple c extension with and without spaces. The one with
spaces in the filename fails to build on standard python. Whereas the
one without should build fine. Did for me on windows 2000 on both python
2.5 and 2.6 with and without spaces in their paths.

Added file: http://bugs.python.org/file12693/python_extension_bug.rar

___
Python tracker 

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



[issue4917] PyBytes_Format documented but doesn't exist in C/API

2009-01-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

PyBytes_Format is not supported, so I removed the documentation in r68538.

--
nosy: +benjamin.peterson
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



[issue4917] PyBytes_Format documented but doesn't exist in C/API

2009-01-11 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee: theller -> 
components: +Interpreter Core -ctypes
nosy:  -theller
type: resource usage -> feature request
versions: +Python 3.1 -Python 3.0

___
Python tracker 

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



[issue4917] PyBytes_Format documented but doesn't exist in C/API

2009-01-11 Thread O. Morvant

New submission from O. Morvant :

The C/API function PyBytes_Format(PyObject*, PyObject*) is documentated
in python 3.0 API (http://docs.python.org/3.0/c-api/bytes.html) at the
end of the Bytes Object description page. 

Examining the Python 3.0 source code, it can't be found in bytesobject.h
file or in any others files.

--
assignee: theller
components: ctypes
messages: 79639
nosy: omorvant, theller
severity: normal
status: open
title: PyBytes_Format documented but doesn't exist in C/API
type: resource usage
versions: Python 3.0

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

In r68537.

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Benjamin confirmed to me that the patch is ok, committing.

--
resolution:  -> fixed
stage: needs patch -> 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



[issue4908] adding a get_metadata in distutils

2009-01-11 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

heres a first simple draft, that works on .egg-info files,

(the Description extractor needs to rework, but this patch is enough to
discuss the feature)

--
keywords: +patch
Added file: http://bugs.python.org/file12692/get_metadata.diff

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Can you try with this one?

PS: do we have a buildbot with such a configuration?

--
keywords: +patch
Added file: http://bugs.python.org/file12691/issue4916.patch

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is because of the new utf16 decoding code. I'll post a patch soon.

--
assignee:  -> pitrou

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

MacOS 10.4 PPC

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ouch. What platform is this on?

--
nosy: +pitrou

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

Next attempt, exclude all win variants from check.

Added file: http://bugs.python.org/file12690/python-2.7-wince-sysmodule.2.patch

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
versions:  -Python 3.0

___
Python tracker 

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



[issue4916] test_io is broken on UCS4

2009-01-11 Thread Benjamin Peterson

New submission from Benjamin Peterson :

==
FAIL: testEncodedWrites (test.test_io.TextIOWrapperTest)
--
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_io.py", line 1082, in
testEncodedWrites
self.assertEquals(f.read(), data * 2)
AssertionError:
'\U0031\U0032\U0033\U0034\U0035\U0036\U0037\U0038\U0039\U0030\U0031\U0032\U0033\U0034\U0035\U0036\U0037\U003890'
!= '12345678901234567890'

==
FAIL: testNewlines (test.test_io.TextIOWrapperTest)
--
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_io.py", line 874, in testNewlines
self.assertEquals(got_line, exp_line)
AssertionError: '\U0075\U006e\U0069\U0078\n' != 'unix\n'

==
FAIL: test_newline_decoder (test.test_io.TextIOWrapperTest)
--
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_io.py", line 1275, in
test_newline_decoder
self.check_newline_decoder(decoder, enc)
  File "/temp/python/py3k/Lib/test/test_io.py", line 1263, in
check_newline_decoder
self.assertEquals(decoder.decode("abc".encode(encoding)), "abc")
AssertionError: '\U0061\U0062c' != 'abc'

--

--
components: Interpreter Core
messages: 79630
nosy: benjamin.peterson
priority: release blocker
severity: normal
stage: needs patch
status: open
title: test_io is broken on UCS4
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Do you want to remove the whole check for MS Windows then?

Yes, please. A comment that you can't really redirect from a dir
on Win32 might be useful.

> Are you 
> otherwise comfortable with the second part of the patch, the one about 
> resolving argv[0]?

That's fine - I trust you that the code is not needed on CE.

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

The CE documentation mentions directories, too, but is silent on the 
FILE_FLAG_BACKUP_SEMANTICS use for them. Also, even using that flag, I 
can't open a directory under CE. It seems that this check is 
superfluous there.

I can also confirm that you get an error if you try to redirect stdin 
via the commandline to a dir even before the executable is even 
launched. The only way to still have a dir as stdin could be to use 
CreateProcess(), but I'm neither sure nor do I care about such abuses.

Do you want to remove the whole check for MS Windows then? Are you 
otherwise comfortable with the second part of the patch, the one about 
resolving argv[0]?

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-01-11 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Benchmarking pitrou_dispatch_2.7.patch applied to trunk r68522 on a 32-
bit Efficeon (x86) using gcc 4.2.4-1ubuntu3 yields a 10% pybench 
speedup.

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

> That's all fine, but why do you need a variable named "e" in
> the first place? Can't you leave the code as it was before?"

There is an intermediate call to a function that retrieves the 
thread's ID. That function may or may not change the output of 
GetLastError(). It probably won't change errno, since it is just 
implemented as a call to the win32 API GetCurrentThreadId(). Still, 
when I have a function that fails and provides additional info through 
errno or GetLastError(), I personally prefer to save that value ASAP 
instead of relying on the fact that some call in between doesn't touch 
it.

I don't really care too much about this piece of code, since it's just 
debug output, but in other cases (like #4906) making such distinction 
is crucial. Since people might read and copy the code, I prefer to 
give them a good example. If you feel differently, just drop me a note 
and I'll change it.

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> I don't really know what happens when you try to read()/fread() from 
> stdin that is a directory, but I guess it will fail quickly even 
> without an explicit check by Python.

Without the explicit check, the interpreter crashed; this was the
reason to add the check in the first place. See issue 887946.

> A directory can be opened under 
> win32 just like a file, so I guess that you could also set one as 
> stdin for a process. 

I just tried to run

python.exe < c:\python25

on W2k3, and get "Access denied" (instead of getting the error
message of the Python interpreter). Indeed, it is apparently
*not* possible to open a directory just like a file under win32.
As

http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx

explains: you must pass FILE_FLAG_BACKUP_SEMANTICS, which
you normally don't pass.

Not sure whether this all applies to CE, though.

> All in all, I don't care whether the check is 
> made or not, but it doesn't hurt to be there either.

It does hurt. It clutters the code. So if it could be determined
that you can't open a directory at all with CreateFile on
Windows CE, then it would be better if the block was removed,
than fixed.

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Actually, I made the distinction between the 'int e' and the 'unsigned 
> e' consciously. When using 'errno', using an 'int' is correct. When
> using GetLastError(), I would have used a win32 DWORD if there was a 
> format sequence that correctly and portably formats it, so I 
> chose 'unsigned' as one that IMHO most likely matches it. 

That's all fine, but why do you need a variable named "e" in the first
place? Can't you leave the code as it was before?

> That is also 
> the reason for the two different error messages, otherwise I don't 
> think it makes a big difference.

Introducing an unnecessary variable should be avoided; this is just
cruft that accumulates. Please remove both variables.

___
Python tracker 

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I think Amaury's patch (mp_array_2.patch) is correct. If there is no
objection to its acceptance within the next two days, I think it should
be applied.

--
resolution:  -> accepted

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

Changed patch with curly brackets outside the conditional code.

Added file: http://bugs.python.org/file12689/python-2.7-wince-sysmodule.1.patch

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

I don't really know what happens when you try to read()/fread() from 
stdin that is a directory, but I guess it will fail quickly even 
without an explicit check by Python. A directory can be opened under 
win32 just like a file, so I guess that you could also set one as 
stdin for a process. All in all, I don't care whether the check is 
made or not, but it doesn't hurt to be there either.

I'll submit a changed patch that has the opening curly brackets 
outside the conditional code. Thanks for the review, Martin, I 
appreciate your support on this.

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

Actually, I made the distinction between the 'int e' and the 'unsigned 
e' consciously. When using 'errno', using an 'int' is correct. When 
using GetLastError(), I would have used a win32 DWORD if there was a 
format sequence that correctly and portably formats it, so I 
chose 'unsigned' as one that IMHO most likely matches it. That is also 
the reason for the two different error messages, otherwise I don't 
think it makes a big difference.

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Guilherme Polo

Guilherme Polo  added the comment:

Ah, yes :) But in the other case (the one where it is currently
multiplied) the multiplication happens because data is formatted to
either bytes, shorts or longs, so without the multiplication data length
would end up being divided by 1, 2 or 4.

So, besides the extras "if" statements all is good.

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Guilherme Polo

Guilherme Polo  added the comment:

Given the name of the function related to the problem: "writeframesraw",
it seems to be more correct to remove the sampwidth multiplication from
the other case (not add it in the other one), since you must already
pass the data multiplied by it.

Does that make sense to you Alex ?

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Guilherme Polo

Changes by Guilherme Polo :


Removed file: http://bugs.python.org/file12688/issue_4913.diff

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Guilherme Polo

Guilherme Polo  added the comment:

Oops, _framesize already takes sampwidth into account. So there is a
problem somewhere else, since reading the wave file is returning the
number of frames multiplied by the sampwidth.

___
Python tracker 

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



[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-11 Thread Guilherme Polo

Guilherme Polo  added the comment:

Wave_read.initfp also needs fixing on counting the frame number, correct
me if its wrong.

Patch added.

--
keywords: +patch
nosy: +gpolo
Added file: http://bugs.python.org/file12688/issue_4913.diff

___
Python tracker 

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



[issue4735] An error occurred during the installation of assembly

2009-01-11 Thread STINNER Victor

STINNER Victor  added the comment:

See also 
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=121817

___
Python tracker 

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



[issue4735] An error occurred during the installation of assembly

2009-01-11 Thread STINNER Victor

STINNER Victor  added the comment:

Issue 4911 is a duplicate of this issue.

Could the issue be related to http://support.microsoft.com/kb/839547?

--
nosy: +haypo

___
Python tracker 

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



[issue4911] Windows installer Quad processor issues

2009-01-11 Thread STINNER Victor

STINNER Victor  added the comment:

This issue is a duplicate of the issue #4735.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue4908] adding a get_metadata in distutils

2009-01-11 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

It looks like the best way to do this is to:

- make distutils.dist.DistributionMetadata also read existing egg-info files

- add get_metadata in pkgutil instead of distutils, and make it use 
  distutils.dist.DistributionMetadata

___
Python tracker 

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



[issue4911] Windows installer Quad processor issues

2009-01-11 Thread STINNER Victor

STINNER Victor  added the comment:

Could it be related to http://support.microsoft.com/kb/839547?

--
nosy: +haypo
title: Quad processor issues -> Windows installer Quad processor issues

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The gettext module is intentionally written in pure Python; it should
stay that way. Whether or not the _locale module should also grow
support for pgettext is a different issue.

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2009-01-11 Thread STINNER Victor

STINNER Victor  added the comment:

I don't see any change in Modules/_localemodule.c: you reimplemented 
pgettext() in pure Python. Why no reusing existing pgettext() function 
(at least when it's present)?

--
nosy: +haypo

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The S_ISDIR test is to prevent the case

  python < /etc

Is it really possible to invoke Python in such a way on CE? If not, it
would be better if the entire test wasn't performed on CE. If it does
get performed, I think it would be better if the code kept a matching
number of parentheses (i.e. don't incorporate the opening curly bracket
into the conditional).

--
nosy: +loewis

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The introduction of "int e" is redundant now, right?

___
Python tracker 

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



[issue4903] binascii.crc32() - document signed vs unsigned results

2009-01-11 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

binascii and zlib documentation updated in trunk r68535.  I'll close the 
issue after I've merged it into release26-maint, release30-maint and 
py3k.

Any objections to the wording?

http://svn.python.org/view/python/trunk/Doc/library/binascii.rst?
rev=68535&view=diff&r1=68535&r2=68534&p1=python/trunk/Doc/library/binasc
ii.rst&p2=/python/trunk/Doc/library/binascii.rst

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-01-11 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

Here's a port of threadedceval5.patch to trunk. It passes the tests. I
haven't benchmarked this exact patch, but on one Intel Core2, a similar
patch got an 11%-14% speedup (on 2to3 and pybench).

I've also cleaned up Jakob Sievers' vmgen patch (representing
forth-style dispatch) a bit so that it passes all the tests, and on the
same machine it got a 13%-17% speedup. The vmgen patch is not quite at
feature parity (it throws out support for LLTRACE and a couple other
#defines), and there are fairly good arguments against committing it to
python at all (it requires installing and modifying vmgen to build), but
I'll post it after I've ported it to trunk.

Re skip and paolo: JITting and machine-specific assembly will probably
be important to speeding up Python in the long run, but they'll also
take a long while to get right, so we shouldn't let them distract us
from committing the dispatch optimization.

Added file: http://bugs.python.org/file12687/pitrou_dispatch_2.7.patch

___
Python tracker 

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



[issue4907] ast.literal_eval does not properly handled complex numbers

2009-01-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

I'm not sure that this is desirable behaviour.  There's no such thing as a 
complex literal---only imaginary literals.  Why allow evaluation of 2+1j
but not of 2 + 1, or 2*1j.

In any case, I'm not sure that the patch behaves as intended.  For 
example,

>>> ast.literal_eval('2 + (3 + 4j)')
(5+4j)

--
nosy: +marketdickinson

___
Python tracker 

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



[issue1731717] race condition in subprocess module

2009-01-11 Thread Martina Oefelein

Changes by Martina Oefelein :


--
nosy: +oefe

___
Python tracker 

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



[issue2320] Race condition in subprocess using stdin

2009-01-11 Thread Martina Oefelein

Changes by Martina Oefelein :


--
nosy: +oefe

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

Okay, hopefully this patch is final. The last one was using 'errno' in
debug mode, but under CE using CreateThread() it should use
GetLastError(). I also took the liberty of saving that error information
for both variants directly after creating the thread fails, so
intermediate calls don't clobber that value.

Added file: http://bugs.python.org/file12686/python-2.7-wince-threads.2.patch

___
Python tracker 

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



[issue4879] Allow buffering for HTTPResponse

2009-01-11 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Checked in as revision: 68532

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue4879] Allow buffering for HTTPResponse

2009-01-11 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Yes, if you think so.  But my intention was to indicate that 
the "nobuffering" is a special feature the user can turn off to resort 
to what could be considered normal, buffered, behaviour.

But either way is fine, and I'll be happy to change it.

___
Python tracker 

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



[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

New submission from Ulrich Eckhardt :

The attached patch is for sysmodule.c, it contains two changes:

1. The check whether stdin is a directory is rewritten without using
fstat(), which doesn't exist under CE.

2. Replacing sys.argv[0] with the full path is skipped, CE doesn't have
a current working dir or paths relative to it, so it must already be an
absolute path.

--
components: Interpreter Core
files: python-2.7-wince-sysmodule.0.patch
keywords: patch
messages: 79600
nosy: eckhardt
severity: normal
status: open
title: Port sysmodule.c to MS Windows CE
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file12685/python-2.7-wince-sysmodule.0.patch

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-11 Thread Skip Montanaro

Skip Montanaro  added the comment:

pybench comparison...

% ./python.exe Tools/pybench/pybench.py -s stock.out -c why.out 
-
--
PYBENCH 2.0
---
* using CPython 3.1a0 (py3k:68444M, Jan 11 2009, 10:02:04) [GCC 4.0.1 (Apple 
Inc. 
build 5490)]
* disabled garbage collection
* system check interval set to maximum: 2147483647
* using timer: time.time

---
Benchmark: stock.out
---

Rounds: 10
Warp:   10
Timer:  time.time

Machine Details:
   Platform ID:Darwin-9.6.0-i386-32bit
   Processor:  i386

Python:
   Implementation: CPython
   Executable: /Users/skip/src/python/py3k/python.exe
   Version:3.1.0
   Compiler:   GCC 4.0.1 (Apple Inc. build 5490)
   Bits:   32bit
   Build:  Jan 11 2009 09:57:51 (#py3k:68444)
   Unicode:UCS2


---
Comparing with: why.out
---

Rounds: 10
Warp:   10
Timer:  time.time

Machine Details:
   Platform ID:Darwin-9.6.0-i386-32bit
   Processor:  i386

Python:
   Implementation: CPython
   Executable: /Users/skip/src/python/py3k/python.exe
   Version:3.1.0
   Compiler:   GCC 4.0.1 (Apple Inc. build 5490)
   Bits:   32bit
   Build:  Jan 11 2009 10:02:04 (#py3k:68444M)
   Unicode:UCS2


Test minimum run-timeaverage  run-time
 thisother   diffthisother   diff
---
  BuiltinFunctionCalls:   110ms   106ms   +4.1%   111ms   107ms   +3.7%
   BuiltinMethodLookup:78ms79ms   -0.7%80ms80ms   -0.4%
 CompareFloats:   105ms   113ms   -7.3%   106ms   114ms   -6.8%
 CompareFloatsIntegers:   161ms   146ms  +10.8%   163ms   151ms   +7.7%
   CompareIntegers:   145ms   151ms   -3.8%   147ms   152ms   -3.1%
CompareInternedStrings:   109ms   134ms  -18.9%   110ms   135ms  -18.9%
  CompareLongs:86ms90ms   -4.5%86ms91ms   -4.8%
CompareStrings:89ms88ms   +0.4%91ms89ms   +2.3%
ComplexPythonFunctionCalls:   146ms   141ms   +3.1%   151ms   143ms   +5.9%
 ConcatStrings:   124ms   123ms   +0.8%   126ms   129ms   -2.0%
   CreateInstances:   146ms   144ms   +1.9%   148ms   146ms   +1.2%
CreateNewInstances:   110ms   109ms   +1.2%   111ms   110ms   +0.6%
   CreateStringsWithConcat:   171ms   158ms   +8.4%   175ms   165ms   +5.8%
  DictCreation:85ms80ms   +6.5%86ms81ms   +6.8%
 DictWithFloatKeys:98ms99ms   -1.0%99ms   100ms   -1.0%
   DictWithIntegerKeys:94ms97ms   -3.4%94ms   103ms   -8.6%
DictWithStringKeys:84ms88ms   -5.0%84ms92ms   -8.3%
  ForLoops:85ms82ms   +3.0%85ms83ms   +3.1%
IfThenElse:   116ms   132ms  -12.1%   117ms   133ms  -12.5%
   ListSlicing:   119ms   118ms   +0.1%   124ms   124ms   -0.1%
NestedForLoops:   141ms   129ms   +9.1%   142ms   132ms   +7.8%
  NestedListComprehensions:   164ms   159ms   +3.4%   166ms   160ms   +3.8%
  NormalClassAttribute:   215ms   218ms   -1.2%   217ms   220ms   -1.2%
   NormalInstanceAttribute:   111ms   115ms   -3.0%   113ms   117ms   -3.7%
   PythonFunctionCalls:   104ms   123ms  -15.5%   104ms   124ms  -15.6%
 PythonMethodCalls:   144ms   144ms   -0.3%   148ms   149ms   -0.6%
 Recursion:   180ms   195ms   -7.8%   191ms   198ms   -3.7%
  SecondImport:   106ms   107ms   -1.1%   107ms   108ms   -1.1%
   SecondPackageImport:   118ms   117ms   +1.3%   119ms   118ms   +1.1%
 SecondSubmoduleImport:   154ms   156ms   -1.2%   156ms   157ms   -0.6%
   SimpleComplexArithmetic:87ms89ms   -1.9%88ms95ms   -7.4%
SimpleDictManipulation:   180ms   176ms   +2.5%   183ms   178ms   +2.6%
 SimpleFloatArithmetic:92ms99ms   -7.3%93ms   102ms   -9.0%
  SimpleIntFloatArithmetic:   127ms   127ms   -0.4%   128ms   129ms   -0.8%
   SimpleIntegerArithmetic:   127ms   136ms   -6.7%   128ms   138ms   -7.6%
  SimpleListComprehensions:   128ms   129ms   -0.4%   131ms   130ms   +0.2%
SimpleListManipulation:95ms   108ms  -12.5%97ms   110ms  -11.6%
  Si

[issue4896] Faster why variable manipulation in ceval.c

2009-01-11 Thread Skip Montanaro

Skip Montanaro  added the comment:

Pystone results:

apply why patch

py3k% rm $TMPDIR/*.[coi] ; make python.exe && rm -f /tmp/trash ; 
./python.exe Lib/test/pystone.py
rm: /tmp/*.[coi]: No such file or directory
make: `python.exe' is up to date.
Pystone(1.1) time for 5 passes = 1.08154
This machine benchmarks at 46230.2 pystones/second
py3k% rm $TMPDIR/*.[coi] ; make python.exe && rm -f /tmp/trash ; 
./python.exe Lib/test/pystone.py
rm: /tmp/*.[coi]: No such file or directory
make: `python.exe' is up to date.
Pystone(1.1) time for 5 passes = 1.08365
This machine benchmarks at 46140.4 pystones/second
py3k% rm $TMPDIR/*.[coi] ; make python.exe && rm -f /tmp/trash ; 
./python.exe Lib/test/pystone.py
rm: /tmp/*.[coi]: No such file or directory
make: `python.exe' is up to date.
Pystone(1.1) time for 5 passes = 1.08598
This machine benchmarks at 46041.4 pystones/second

remove patch

py3k% rm $TMPDIR/*.[coi] ; make python.exe && rm -f /tmp/trash ; 
./python.exe Lib/test/pystone.py
rm: /tmp/*.[coi]: No such file or directory
make: `python.exe' is up to date.
Pystone(1.1) time for 5 passes = 1.10093
This machine benchmarks at 45416.3 pystones/second
py3k% rm $TMPDIR/*.[coi] ; make python.exe && rm -f /tmp/trash ; 
./python.exe Lib/test/pystone.py
rm: /tmp/*.[coi]: No such file or directory
make: `python.exe' is up to date.
Pystone(1.1) time for 5 passes = 1.10458
This machine benchmarks at 45266.1 pystones/second
py3k% rm $TMPDIR/*.[coi] ; make python.exe && rm -f /tmp/trash ; 
./python.exe Lib/test/pystone.py
rm: /tmp/*.[coi]: No such file or directory
make: `python.exe' is up to date.
Pystone(1.1) time for 5 passes = 1.10333
This machine benchmarks at 45317.5 pystones/second

___
Python tracker 

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



[issue1293741] doctest runner cannot handle non-ascii characters

2009-01-11 Thread Luciano Ramalho

Luciano Ramalho  added the comment:

I have confirmed everything that akaihola reports in Python 2.4, 2.5 and
2.6, but the problem is not limited to non-matching test output. It also
happens with doctests with zero failures when the module is run with the
-v command-line switch, or testmod is called with verbose=True.

The attached file shows a work-around: handle the UnicodeEncodeError
thrown by testmod, and display the "object" attribute of the exception
to see exactly where the problem is.

--
nosy: +luciano
title: doctest runner cannot handle non-ascii characters  -> doctest runner 
cannot handle non-ascii characters
versions: +Python 2.5, Python 2.6
Added file: http://bugs.python.org/file12684/issue1293741.py

___
Python tracker 

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



[issue4220] Builtins treated as free variables?

2009-01-11 Thread Georg Brandl

Georg Brandl  added the comment:

There is no way for the interpreter to distinguish between builtins and
"other" types of free variables.

If you need unqualified exec to work in an innner function, use function
parameters with defaults, like this:

def a():
def b(long=long):
x = long(3)
exec ""

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-01-11 Thread Andrew Bennetts

Changes by Andrew Bennetts :


--
nosy: +spiv

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2009-01-11 Thread Dwayne Bailey

Changes by Dwayne Bailey :


--
nosy: +dwayne

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

Okay, the changes necessary to the NT thread code are rather minimal,
see attached patch. The file thread_wince.c could then be removed, too.

I also removed a comment which was left over from the version before but
doesn't apply any more.

Added file: http://bugs.python.org/file12683/python-2.7-wince-threads.1.patch

___
Python tracker 

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



[issue4895] Missing strdup() under MS Windows CE

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Thanks for the patch. Committed as r68527, r68528.

--
nosy: +loewis
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue4288] parsermodule and grammar variable

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

This is now fixed with the resolution to issue 4279.

--
resolution:  -> fixed
status: open -> closed
superseder:  -> Module 'parser' fails to build

___
Python tracker 

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



[issue4279] Module 'parser' fails to build

2009-01-11 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I have now committed 2.6.1-parsermodule.patch as r68523, r68524, r68525,
and r68526. Thanks for the patch.

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