[issue5114] 2.5.4.3 and 2.6.2 / test_threading hangs

2009-09-23 Thread Ian Donaldson

Ian Donaldson  added the comment:

FWIW it hangs on Solaris 9 also (sparc + x86)

--
nosy: +iandekit

___
Python tracker 

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



[issue4833] Explicit directories for zipfiles

2009-09-23 Thread Ralf Schmitt

Ralf Schmitt  added the comment:

it looks like this is fixed in 2.6.2.

I'm attaching a zipfile which cannot be extracted in 2.6.1

Running
python -c 'import zipfile; zipfile.ZipFile("test.zip").extractall()'
in 2.6.2 however works. 
but you should not do that anyway because of issue 6972

--
nosy: +schmir
Added file: http://bugs.python.org/file14956/test.zip

___
Python tracker 

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



[issue6964] import new fails

2009-09-23 Thread Georg Brandl

Georg Brandl  added the comment:

Bottom line: move over to the types module *before* running 2to3.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue6977] Getopt documentation ambiguity

2009-09-23 Thread SilentGhost

New submission from SilentGhost :

the following
>>> getopt.getopt('--testing=dr'.split(), '', ['testing'])[0]

would raise 'option --testing must not have an argument'.

Documentation reads, however: "Long options which require an argument
should be followed by an equal sign ('=')." Which is equivalent to
"options that don't require an argument, should not be followed by the
equal sign". The fact that in my example argument is not required does
not mean that argument cannot be passed.

--
assignee: georg.brandl
components: Documentation, Library (Lib)
messages: 93033
nosy: SilentGhost, georg.brandl
severity: normal
status: open
title: Getopt documentation ambiguity
versions: Python 2.6, Python 3.1

___
Python tracker 

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



[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-09-23 Thread Kees Bos

New submission from Kees Bos :

compiler.parse("d[1] = 1") should have a single tuple as subs


>>> compiler.parse("d[1] = 1")
Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN',
[Const(1)])], Const(1))]))
>>> compiler.parse("d[1,] = 2")
Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN',
[Const(1)])], Const(2))]))
>>> compiler.parse("d[1,2] = 3")
Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN', [Const(1),
Const(2)])], Const(3))]))
>>> compiler.parse("d[(1,)] = 2")
Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN',
[Tuple([Const(1)])])], Const(2))]))

--
components: Library (Lib)
files: compiler.transformer.patch
keywords: patch
messages: 93034
nosy: kees
severity: normal
status: open
title: compiler.transformer dict key bug d[1,] = 1
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file14957/compiler.transformer.patch

___
Python tracker 

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



[issue6977] Getopt documentation ambiguity

2009-09-23 Thread Georg Brandl

Georg Brandl  added the comment:

Sorry, I don't understand what the issue is.  Long options with
arguments use 'testing=', those without use 'testing'.  Could you please
elaborate?

--

___
Python tracker 

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



[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-09-23 Thread Kees Bos

Kees Bos  added the comment:

I just see that my patch is not correct, since the following is
supported by the language:

O[1:2:3, 4:5:6]

Where O[1:2:3, 4:5:6] == O[slice(1,2,3), slice(4,5,6)] ==
O.__getitem__((slice(1,2,3), slice(4,5,6)))

--

___
Python tracker 

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



[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-09-23 Thread Kees Bos

Kees Bos  added the comment:

patch which honors O[1:2:3, 4:5:6]

--
Added file: http://bugs.python.org/file14958/compiler.transformer.patch

___
Python tracker 

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



[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-09-23 Thread Kees Bos

Changes by Kees Bos :


Removed file: http://bugs.python.org/file14957/compiler.transformer.patch

___
Python tracker 

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



[issue6977] Getopt documentation ambiguity

2009-09-23 Thread SilentGhost

SilentGhost  added the comment:

issue is in the wording: "Long options which require an argument
should be followed by an equal sign ('=')." What if the argument is
optional? Then by definition it is not required, but as my example shows
omitting the equal sign, would produce the error. 

I'd suggest that the docs should read something along these lines: "Long
options which accept an argument should be followed by an equal sign
('='). Passing an argument to an option without an equal sign is illegal."

Basically, it's not clear that "optional" arguments should be passed
like this:
>>> getopt.getopt('--testing='.split(), '', ['testing'])
Note the difference with my previous example.

--

___
Python tracker 

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



[issue6977] Getopt documentation ambiguity

2009-09-23 Thread Doug Hellmann

Doug Hellmann  added the comment:

Is there a way in getopt to define an option that takes an optional
argument?  I thought options either required args or did not accept them
at all.

--
nosy: +doughellmann

___
Python tracker 

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



[issue6977] Getopt documentation ambiguity

2009-09-23 Thread SilentGhost

SilentGhost  added the comment:

Yes, that's true Doug. May be it should be explicitly stated?

--

___
Python tracker 

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



[issue1472251] pdb 'run' crashes when the it's first argument is non-string

2009-09-23 Thread Kuba Kończyk

Kuba Kończyk  added the comment:

Updated patch with tests and documentation.It fixes the issue by leaving
argument checking to exec and eval functions.The result is a more
readable error messages when invoking run/runeval with incorrect
arguments (see discussion above) and also ability to run pdb on an open
file objects.

--
keywords: +patch
versions: +Python 2.4, Python 2.5, Python 2.7, Python 3.0, Python 3.1, Python 
3.2
Added file: http://bugs.python.org/file14959/bdb-run.patch

___
Python tracker 

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



[issue1472251] pdb 'run' crashes when the it's first argument is non-string

2009-09-23 Thread Kuba Kończyk

Changes by Kuba Kończyk :


Removed file: http://bugs.python.org/file1975/bdb-run.patch

___
Python tracker 

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



[issue1472251] pdb 'run' crashes when the it's first argument is non-string

2009-09-23 Thread Kuba Kończyk

Kuba Kończyk  added the comment:

BTW, patch is based on trunk.

--

___
Python tracker 

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



[issue6979] Passing output arguments to an ActiveX application

2009-09-23 Thread Benjamin

New submission from Benjamin :

Hi.

I hope I'm in the good thing to expose my problem...
I try to make a script in Python working under ControlDesk, a dSpace 
simulator.
In this script I call an ActiveX application given by an external 
software, System Monitor, to get some information from my ECU (Engine 
Control Unit).

I can access to the ActiveX, I can call functions but only ones which 
don't need output argument.
When I use functions which need only input argument, it's working 
perfectly.
If I want to use functions which need some output argument, I have a 
message error from Python...


Here is an example of a working script:
***

import os
import win32com.client

if __name__ == '__main__':
print ""
Kit = "C:\\U\\TNR_MES_2009\\THR2RAT11BA01.m"

SysMonApp = win32com.client.Dispatch("System Monitor API")
if SysMonApp == None:
print "Pas d'instance System Monitor"
#endif
Err = SysMonApp.SetLiveUpdates(True)
if Err != 0:
print Err
#endif
print "LiveUpdates Actif"
Err = SysMonApp.MatlabImport(Kit)
if Err !=0:
print Err
#endif
print "Import kit .m termine"

SysMonApp = None
print "Fin du script"
#endif


Here is an example of a NON-working script:
import os
import win32com.client
from ctypes import *

if __name__ == '__main__':
print ""
Kit = "C:\\U\\TNR_MES_2009\\THR2RAT11BA01.m"

SysMonApp = win32com.client.Dispatch("System Monitor API")
if SysMonApp == None:
print "Pas d'instance System Monitor"
#endif

#OnlineSt = False
OnlineSt = c_double()
Err = SysMonApp.GetOnline(byref(OnlineSt))
if Err != 0:
print Err
#endif
if OnlineSt == True:
print "ECU Online"
else:
print "ECU Offline"
#endif

SysMonApp = None
print "Fin du script"
#endif


The error message is:

Traceback (most recent call last):
  File "C:\Python26\Lib\site-
packages\pythonwin\pywin\framework\scriptutils.py", line 325, in 
RunScript
exec codeObject in __main__.__dict__
  File "C:\U\TNR_MES_2009\EssaiSysMonSeul_Output_KO.py", line 16, in 

Err = SysMonApp.GetOnline(byref(OnlineSt))
  File "", line 2, in GetOnline
TypeError: Objects of type 'CArgObject' can not be converted to a COM 
VARIANT


As you can see I use the ctype library to try pass output argument, 
using byref.
But I also try to pass argument directly under python, without ctypes:

OnlineSt = False
Err = SysMonApp.GetOnline(OnlineSt)

and I had the folowing error message:

Traceback (most recent call last):
  File "C:\Python26\Lib\site-
packages\pythonwin\pywin\framework\scriptutils.py", line 325, in 
RunScript
exec codeObject in __main__.__dict__
  File "C:\U\TNR_MES_2009\EssaiSysMonSeul_Output_KO.py", line 16, in 

Err = SysMonApp.GetOnline(OnlineSt)
  File "", line 2, in GetOnline
com_error: (-2147352571, 'Le type ne correspond pas.', None, 1)


The help for the activeX function explain that the output arguments 
need to be pass as pointer:

GetOnline 
Returns whether the ECU is online or not.
Arguments:
 bool* bResult - whether the ECU is online or offline. 
 



Do you have any idea to solve this problem?

Many thanks

Benjamin

--
components: Library (Lib)
messages: 93043
nosy: benji13
severity: normal
status: open
title: Passing output arguments to an ActiveX application
type: compile error
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



[issue6979] Passing output arguments to an ActiveX application

2009-09-23 Thread Ezio Melotti

Ezio Melotti  added the comment:

If you need general help, the bug tracker is not the right place where
to ask. If you think you have found a bug please follow these
instructions and explain clearly what the problem is:
http://www.python.org/dev/workflow/.

--
nosy: +ezio.melotti
resolution:  -> invalid
status: open -> pending

___
Python tracker 

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



[issue6979] Passing output arguments to an ActiveX application

2009-09-23 Thread Mark Dickinson

Mark Dickinson  added the comment:

You might try asking on the ctypes-users mailing list:

https://lists.sourceforge.net/lists/listinfo/ctypes-users

I'll close this for now;  if, after discussing this on the ctypes-users 
list, you're reasonably sure that you've found a bug in Python itself 
(which is what this tracker is for), please come back and open another bug 
report.

--
nosy: +mark.dickinson
status: pending -> closed

___
Python tracker 

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



[issue5885] uuid.uuid1() is too slow

2009-09-23 Thread Thijs Triemstra

Changes by Thijs Triemstra :


--
nosy: +thijs

___
Python tracker 

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



[issue3212] ssl module - should test for a wrong cert

2009-09-23 Thread Thijs Triemstra

Thijs Triemstra  added the comment:

Guess it can be closed then.

--
nosy: +thijs

___
Python tracker 

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



[issue6005] Bug in socket example

2009-09-23 Thread Thijs Triemstra

Changes by Thijs Triemstra :


--
nosy: +thijs

___
Python tracker 

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



[issue4434] Embedding into a shared library fails

2009-09-23 Thread Thijs Triemstra

Changes by Thijs Triemstra :


--
nosy: +thijs

___
Python tracker 

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



[issue1143] Update to latest ElementTree in Python 2.7

2009-09-23 Thread Thijs Triemstra

Changes by Thijs Triemstra :


--
nosy: +thijs

___
Python tracker 

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



[issue6980] fix ctypes build failure on armel-linux-gnueabi with -mfloat-abi=softfp

2009-09-23 Thread Matthias Klose

New submission from Matthias Klose :

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41443
should be imported.

I'm checking this in on the 2.6 branch for the upcoming 2.6.3 release.

--
assignee: theller
components: ctypes
messages: 93047
nosy: doko, theller
severity: normal
status: open
title: fix ctypes build failure on armel-linux-gnueabi with -mfloat-abi=softfp
type: compile error
versions: Python 2.6, Python 2.7, 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



[issue6981] locale.getdefaultlocale() envvars default code and documentation mismatch

2009-09-23 Thread Ville Skyttä

New submission from Ville Skyttä :

The default list of locale.getdefaultlocale() is documented to be the
one of GNU gettext; in the source docs in Python 2.7 trunk:

"envvars defaults to the search path used in GNU gettext; it must
 always contain the variable name 'LANG'."

...and at http://docs.python.org/dev/library/locale.html in addition to
that:

"The GNU gettext search path contains 'LANGUAGE', 'LC_ALL',
 'LC_CTYPE', and 'LANG', in that order."

This is correct, cf.
http://www.gnu.org/software/gettext/manual/gettext.html#Locale-Environment-Variables

However, the code in locale.py does not match the documentation; the
patch in issue #1166948 (svn r39572) moved LANGUAGE to the end of the
list.  I suggest putting it back at the beginning as documented (the
other change in r39572 is ok).

The py3k branch appears to have the same problem.

--
components: Library (Lib)
messages: 93048
nosy: scop
severity: normal
status: open
title: locale.getdefaultlocale() envvars default code and documentation mismatch
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue6982] make clean does not remove pickle files

2009-09-23 Thread egreen

New submission from egreen :

make clean and make distclean don't remove the grammar pickles generated
by load_grammar in Lib/lib2to3/pgen2/driver.py
(Lib/lib2to3/Grammar3.2.0.alpha.0.pickle,
Lib/lib2to3/PatternGrammar3.2.0.alpha.0.pickle).

Proposed patch attached. It removes all *.pickle files, which I assume
is safe. (Patch also corrects a comment.)

--
components: 2to3 (2.x to 3.0 conversion tool), Build
files: clean-pickles.patch
keywords: patch
messages: 93049
nosy: egreen
severity: normal
status: open
title: make clean does not remove pickle files
versions: Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14960/clean-pickles.patch

___
Python tracker 

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



[issue6983] Add specific get_platform() for freebsd

2009-09-23 Thread Stef Walter

New submission from Stef Walter :

In Lib/distutils/util.py in the get_platform() function there's OS 
specific code to create a string which describes the current platform. 
This usually includes the OS + version + arch. 

FreeBSD specific code is missing from this function. Currently 
get_platform() returns a string specific to the security patch level of 
freebsd. For example:

freebsd-7.2-RELEASE-p3-i386

This results in eggs that only work on a specific patch level release of 
FreeBSD and are not portable between (for example) 7.2-RELEASE-p2 and 
7.2-RELEASE-p3.

However FreeBSD is actually binary compatible within a major version 
number. For example 7.1 and 7.2 are binary compatible.

This patch adds freebsd specific code to get_platform() after which it 
will return a string like:

freebsd-7-i386

--
assignee: tarek
components: Distutils
files: patch-python-distutils-osrel.diff
keywords: patch
messages: 93050
nosy: stefw, tarek
severity: normal
status: open
title: Add specific get_platform() for freebsd
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file14961/patch-python-distutils-osrel.diff

___
Python tracker 

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



[issue6982] make clean does not remove pickle files

2009-09-23 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +benjamin.peterson
priority:  -> low
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue6272] Upgrading xml.etree to ElementTree 1.3

2009-09-23 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

This is duplicate of Issue1143

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



[issue6984] typo in Unicode HOWTO

2009-09-23 Thread Yinon Ehrlich

New submission from Yinon Ehrlich :

at http://docs.python.org/dev/3.0/howto/unicode.html:
Uniode should be Unicode

--
assignee: georg.brandl
components: Documentation
messages: 93052
nosy: Yinon, georg.brandl
severity: normal
status: open
title: typo in Unicode HOWTO
versions: Python 3.1

___
Python tracker 

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



[issue6984] typo in Unicode HOWTO

2009-09-23 Thread Yinon Ehrlich

Yinon Ehrlich  added the comment:

oops, appear in http://docs.python.org/3.1/howto/unicode.html too...

--

___
Python tracker 

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



[issue6984] typo in Unicode HOWTO

2009-09-23 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r75043.

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