[issue12549] test_platform test_mac_ver fails on Darwin x86_64

Davide Rizzo report at bugs.python.org
Wed Jul 13 22:51:48 CEST 2011


Davide Rizzo <sorcio at gmail.com> added the comment:

I first saw it failing on 3.3 while testing for another bug, then run the test on other versions including 2.7 and it always fails. System Python 2.6 does NOT fail, but it has no _mac_ver_xml().

This is a MacBook Pro 13" with Intel Core i5.

--------------------
$ uname -m
x86_64
$ ./python.exe 
Python 3.3.0a0 (default:e0cd35660ae9, Jul 13 2011, 11:02:57) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[63386 refs]
>>> sys.maxsize
9223372036854775807
[63389 refs]
>>> import platform
[65649 refs]
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'x86_64')
[69688 refs]
>>> platform._mac_ver_xml()
('10.6.8', ('', '', ''), 'x86_64')
[69733 refs]
>>> platform._mac_ver_gestalt()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/davide/cpython/Lib/platform.py", line 682, in _mac_ver_gestalt
    return release,versioninfo,machine
NameError: global name 'versioninfo' is not defined
[69809 refs]
>>> import os
[69811 refs]
>>> os.uname()
('Darwin', 'Brude.local', '10.8.0', 'Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64', 'x86_64')
[69814 refs]

--------------------



The following is with System Python 2.6 on the same OS:
--------------------
Python 2.6.1 (r261:67515, Aug  2 2010, 20:10:18) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'i386')
>>> import sys
>>> sys.maxsize
9223372036854775807

--------------------


Then Python 2.7 from www.python.org:
--------------------
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
9223372036854775807
>>> import platform
>>> platform.mac_ver()
('10.6.8', ('', '', ''), 'x86_64')
>>> platform._mac_ver_xml()
('10.6.8', ('', '', ''), 'x86_64')
>>> platform._mac_ver_gestalt()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 768, in _mac_ver_gestalt
    return release,versioninfo,machine
NameError: global name 'versioninfo' is not defined

--------------------

If you need any more info feel free to ask.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12549>
_______________________________________


More information about the Python-bugs-list mailing list