This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_get_platform_osx failure on Python 3.5.0a0 osx 10.6
Type: Stage: resolved
Components: macOS Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Alex.LordThorsen, ned.deily, ronaldoussoren
Priority: normal Keywords: patch

Created on 2015-04-13 20:39 by Alex.LordThorsen, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_get_platform_osx.patch Alex.LordThorsen, 2015-04-13 20:39
Messages (4)
msg240741 - (view) Author: Alex LordThorsen (Alex.LordThorsen) * Date: 2015-04-13 20:39
On a fresh clone of cpython 3.5.0a0 if you run

$ ./configure --with-pydebug && make -j2
$ ./python.exe -m test.test__osx_support -j3

on osx 10.10.2 (14C109) these two test failures are reported.

    ======================================================================
    FAIL: test_get_platform_osx (__main__.Test_OSXSupport)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/alexlord/mercurial/cpython/Lib/test/test__osx_support.py", line 272, in test_get_platform_osx
        self.assertEqual(('macosx', '10.6', 'fat'), result)
    AssertionError: Tuples differ: ('macosx', '10.6', 'fat') != ('macosx', '10.6', ' ')

    First differing element 2:
    fat


    - ('macosx', '10.6', 'fat')
    ?                     ^^^

    + ('macosx', '10.6', ' ')
    ?                     ^


    ----------------------------------------------------------------------
    Ran 14 tests in 0.354s


Doing a little more digging I found that this if statement is the one failing.

    if ((macrelease + '.') >= '10.4.' and$
                 '-arch' in cflags.strip()):

Specifically this line 

    (macrelease + '.') >= '10.4'

I used distutils.version.StrictVersion to solve this comparison error.

which is failing because

'10.10' >= '10.4' # This fails because the character 4 is greater than 1.
msg240759 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-04-13 21:21
Alex, I think you are not building with an up-to-date source tree.  This problem and others like it related to a two-digit OS X version number (10.8 -> 10.10) should have all been fixed with the changes for Issue21811 which were pushed nearly a year ago.  The version of a current build from the default branch (i.e. what will be released as 3.5.0) should look something like:

Python 3.5.0a3+ (default:24f2c0279120, Apr 13 2015, 14:17:12)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.49)] on darwin

Make sure you do an "hg pull ; hg update -C default" from the upstream repo or the equivalent.
msg240779 - (view) Author: Alex LordThorsen (Alex.LordThorsen) * Date: 2015-04-13 22:11
Ah, Alright. I thought that hg up would bring me up to speed. Sorry for that.
msg240782 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-04-13 22:15
No problem, and thanks for looking into it.
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68127
2015-04-13 22:15:51ned.deilysetstatus: open -> closed

messages: + msg240782
2015-04-13 22:11:55Alex.LordThorsensetstatus: pending -> open

messages: + msg240779
2015-04-13 21:21:44ned.deilysetstatus: open -> pending
resolution: out of date
messages: + msg240759

stage: resolved
2015-04-13 20:41:21Alex.LordThorsensetnosy: + ronaldoussoren, ned.deily
components: + macOS
2015-04-13 20:39:11Alex.LordThorsencreate