In OSX 10.8 the Gestalt() funtion in CoreServices is deprecated. This function is used in the _gestalt extension and exported to Python code.
The only in-tree user of this (private) extension is the platform module, it uses gestalt as one of the alternatives to get the OSX release; and a fallback at that.
A stackoverflow user has done some sleuthing and discovered that the gestalt function uses the same XML file to determine the OSX release as is used by the primary alternative used by the platform module (see <http://stackoverflow.com/questions/11072804/mac-os-x-10-8-replacement-for-gestalt-for-testing-os-version-at-runtime>). The gestalt alternative will therefore likely be useful at all (it is only used when the file it reads is not available in the first place).
The easiest solution to avoid this deprecated API is therefore to drop the _gestalt extension and remove its use in platform.mac_ver()

The attached patch removes the use of the Gestalt API.
The removed code is effectively dead, I yet have to find a machine were platform._mac_ver_xml does not work and the gestalt based code only gets used when the XML variant does not work.

On 07.07.2013 11:11, Ronald Oussoren wrote:
> The easiest solution to avoid this deprecated API is therefore to drop the _gestalt extension and remove its use in platform.mac_ver()
I think it should only be removed in case we no longer support
Mac OS X platforms that still have it. Otherwise, please simply
follow our standard procedure for deprecating public functions.

Do we follow the deprecation procedure for private functions as well?
The patch removes a private and undocumented extension, and removes a private function that uses that extension. There is no change in the public API.
Also, as I mentioned before the removed code is effectively dead because it will never be called on systems that aren't totally broken.

On 08.07.2013 13:55, Ronald Oussoren wrote:
>
> Do we follow the deprecation procedure for private functions as well?
>
> The patch removes a private and undocumented extension, and removes a private function that uses that extension. There is no change in the public API.
>
> Also, as I mentioned before the removed code is effectively dead because it will never be called on systems that aren't totally broken.
Oh, I was under the impression that the API is public. I just did a
grep: the _gestalt module is not documented and neither is the
gestalt function, so I guess we can speed up the deprecation procedure
or even drop it right away in 3.4 :-)