<div dir="ltr">Hi,<div><br></div><div>I am seeking to understand why this script</div><div><br></div><div>import CoreLocation<br>from time import sleep<br><br>location_manager = CoreLocation.CLLocationManager.alloc().init()<br>location_manager.startUpdatingLocation()<br><br>max_wait = 60<br># Get the current authorization status for Python<br>for i in range(1, max_wait):<br>    authorization_status = location_manager.authorizationStatus()<br>    print("Authorization status: ", authorization_status)<br>    if authorization_status == 3 or authorization_status == 4:<br>        print("Python has been authorized for location services")<br>        break<br>    if i == max_wait-1:<br>        exit("Unable to obtain authorization, exiting")<br>    sleep(1)<br><br>coord = location_manager.location().coordinate()<br>lat, lon = coord.latitude, coord.longitude<br>print("Your location is %f, %f" % (lat, lon))<br></div><div><br></div><div>pops an authorization prompt when using Apple's python and not the one in MacPorts (python312 @3.12.4_0+lto+optimizations) on Ventura. In either case, the python application appears in "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?Privacy_LocationServices" for manual authorization but I'd like to understand what causes the difference in behavior.</div><div><br></div><div>N.B. -> The auth prompt that Apple's python pops is -- "Python" would like to use your current location. Don't allow - button . OK - button.</div><div><br></div><div>Thanks.</div><div><br></div><div>B</div></div>