I’ve pushed PyObjC 5.1.2 to PyPI with a number of bug fixes, see the full changelog for more information.
One of my plans for a future version of PyObjC is to add pervasive support for asyncio. This will in the end result in two changes to PyObjC:
Add an implementation of an asyncio event loop that is implemented on top of Apple’s NSRunLoop and CFRunLoop
Add “async” methods to Cocoa classes too change callback style programming with completion handlers into more or less standard async Python code.
To experiment with the latter I’ve created a small and crude script that lets me call the geocoder from CoreLocation in an async manner:
async def main(adress):
coder = CoreLocation.CLGeocoder.alloc().init()
placemarks, error = await coder.geocodeAdressString_(address)
print(f"placemarks: {placemarks}")
print(f"error: {error}")
This looks a lot nicer than the usual callback based code.
A link to the full script:. Most of the linked to script is support code that should mostly go away when I get around to adding an asyncio event loop to PyObjC.
Barriers can be fun!
I’ve uploaded PyObjC 5.1.1 to PyPI. This adds a couple of definitions that are new the macOS 10.14.1 SDK. Download at pypi.org/project/p…
The new iPad Pro looks very nice. Wondering if its worth an out-of-cycle update ;-)
For some reason “hg pull -u” fails on macOS 10.14.1 beta (in a VM) with a broken pipe message from ssh . Adding “IPQoS lowdelay throughput” to ~/.ssh/config makes it work again. Sigh…