[issue9202] Update platform.win32_ver() to account for change to #8413

2010-07-08 Thread Brian Curtin

Brian Curtin  added the comment:

Agreed. This started out as a knee-jerk reaction to regrtest not working, but 
the problem is deeper.

Closing this. The structseq stuff is being dealt with elsewhere.

--
resolution:  -> rejected
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



[issue9202] Update platform.win32_ver() to account for change to #8413

2010-07-08 Thread Eric Smith

Eric Smith  added the comment:

Surely we don't want to find every place that uses structseq and fix them. This 
will no doubt break user code as well.

I think we'll need to fix structseq to somehow have its old behavior.

--
nosy: +eric.smith

___
Python tracker 

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



[issue9202] Update platform.win32_ver() to account for change to #8413

2010-07-08 Thread Brian Curtin

Brian Curtin  added the comment:

The following little patch could do the trick.


--- platform.py (revision 82643)
+++ platform.py (working copy)
@@ -606,7 +606,9 @@
 
 # Find out the registry key and some general version infos
 winver = GetVersionEx()
-maj,min,buildno,plat,csd = winver
+# If sys.getwindowsversion in 3.2 gets used, it contains extra fields
+# which don't get used. Always use slicing in order to stay compatible.
+maj,min,buildno,plat,csd = winver[:5]
 version = '%i.%i.%i' % (maj,min,buildno & 0x)
 if hasattr(winver, "service_pack"):
 if winver.service_pack != "":

--
components: +Library (Lib) -None
keywords: +needs review, patch

___
Python tracker 

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



[issue9202] Update platform.win32_ver() to account for change to #8413

2010-07-08 Thread Brian Curtin

New submission from Brian Curtin :

The change to #8413 broke the use of sys.getwindowsversion() in 
platform.platform() calls on Windows, which subsequently breaks all runs of 
regrtest (e.g. buildbots) since it outputs platform info at the start.

Now that structseq subclasses tuple, every field of sys.getwindowsversion() is 
returned, rather than only the specific ones inserted into the structseq (for 
backwards compatibility). Since platform.py needs to maintain backwards 
compatibility with older versions, the change will need to handle both the new 
and old way.

--
assignee: brian.curtin
components: None
messages: 109546
nosy: benjamin.peterson, brian.curtin, lemburg
priority: high
severity: normal
stage: needs patch
status: open
title: Update platform.win32_ver() to account for change to #8413
type: behavior
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