{"id":6077,"library":"pyobjc-framework-calendarstore","title":"PyObjC CalendarStore Framework","description":"PyObjC-framework-CalendarStore provides Python wrappers for the macOS CalendarStore framework (deprecated since macOS 10.8). It enables Python scripts to access, modify, and receive notifications for iCal data, including calendars, events, and tasks. The library releases new versions regularly, typically aligning with macOS SDK updates and Python version support, with version 12.1 being the current stable release.","status":"active","version":"12.1","language":"en","source_language":"en","source_url":"https://github.com/ronaldoussoren/pyobjc","tags":["macos","objective-c","cocoa","calendar","eventkit","framework"],"install":[{"cmd":"pip install pyobjc-framework-calendarstore","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Provides the core Python to Objective-C bridge.","package":"pyobjc-core","optional":false},{"reason":"Provides fundamental Cocoa framework bindings, often implicitly required by other PyObjC frameworks.","package":"pyobjc-framework-cocoa","optional":false}],"imports":[{"note":"The CalendarStore framework itself is deprecated by Apple in macOS 10.8. EventKit is the recommended modern alternative.","symbol":"CalCalendarStore","correct":"from CalendarStore import CalCalendarStore"},{"note":"The CalendarStore framework itself is deprecated by Apple in macOS 10.8. EventKit is the recommended modern alternative.","symbol":"CalEvent","correct":"from CalendarStore import CalEvent"},{"note":"The CalendarStore framework itself is deprecated by Apple in macOS 10.8. EventKit is the recommended modern alternative.","symbol":"CalTask","correct":"from CalendarStore import CalTask"}],"quickstart":{"code":"import objc\nfrom CalendarStore import CalCalendarStore\nfrom Cocoa import NSDate, NSLog # Required for NSDate, commonly used with CalendarStore\n\n# Get the default calendar store\nstore = CalCalendarStore.defaultCalendarStore()\n\nif store:\n    NSLog(\"Successfully connected to CalendarStore.\")\n    # List all calendars\n    calendars = store.calendars()\n    if calendars:\n        NSLog(f\"Found {len(calendars)} calendars:\")\n        for calendar in calendars:\n            NSLog(f\"  Name: {calendar.title()}, Type: {calendar.type()}\")\n    else:\n        NSLog(\"No calendars found.\")\nelse:\n    NSLog(\"Failed to get default CalendarStore.\")\n","lang":"python","description":"This quickstart code demonstrates how to access the default CalendarStore, list available calendars, and print their titles and types. It requires the `pyobjc-framework-cocoa` for `NSDate` and `NSLog` functionality, which are commonly used in PyObjC applications."},"warnings":[{"fix":"For new applications, consider using PyObjC bindings for EventKit (pyobjc-framework-eventkit) instead. Existing applications may continue to use CalendarStore but should be aware of its deprecated status.","message":"The underlying macOS CalendarStore framework has been deprecated by Apple since macOS 10.8. For new development, Apple recommends using the EventKit framework. While pyobjc-framework-calendarstore is still maintained, its functionality is built upon an outdated macOS API.","severity":"deprecated","affected_versions":"All versions (due to underlying macOS API deprecation)"},{"fix":"Upgrade to Python 3.10 or later for PyObjC 12.x. For older Python versions, use PyObjC 11.1 (for Python 3.9) or PyObjC 10.3 (for Python 3.8).","message":"PyObjC 12.0 and later dropped support for Python 3.9. PyObjC 11.0 dropped support for Python 3.8. Ensure your Python environment meets the minimum requirements for the PyObjC version you are using.","severity":"breaking","affected_versions":"pyobjc-framework-calendarstore 11.0+"},{"fix":"If subclassing Objective-C classes in Python and experiencing issues with `__init__`, ensure you are using PyObjC 10.3.1 or later. If you must use 10.3.0, explicitly implement `__new__` in your Python subclass if you also define `__init__`.","message":"In PyObjC 10.3, a change prevented user-defined `__init__` methods in Python subclasses of Objective-C classes from being called if a custom `__new__` method was not also explicitly implemented. This was partially reverted in 10.3.1 to allow `__init__` to work when `__new__` is present.","severity":"gotcha","affected_versions":"pyobjc-framework-calendarstore 10.3 - 10.3.0"},{"fix":"Review code that customizes `alloc` and `init` sequences for Objective-C objects, especially where reference counting for `self` was explicitly managed or assumed specific behavior from older PyObjC versions. Refer to PyObjC 11.1 release notes for details on the ARC changes.","message":"PyObjC 11.1 aligned its behavior for initializer methods (those starting with 'init' in Objective-C) with `clang`'s Automatic Reference Counting (ARC) documentation. These methods now correctly 'steal' a reference to `self` and return a new reference. This might break code that relied on the previous PyObjC proxy behavior for `[NSObject alloc]` and its subsequent `init` method.","severity":"breaking","affected_versions":"pyobjc-framework-calendarstore 11.1+"},{"fix":"When using PyObjC with Python 3.13's free-threading, thoroughly test your application for thread-related issues. Consult PyObjC documentation and release notes regarding free-threading support for best practices and known limitations.","message":"PyObjC 11.0 introduced experimental support for free-threading (PEP 703) in Python 3.13. This involved significant internal changes to the core bridge. While aimed at performance improvements, experimental features can have unexpected behavior or require careful consideration for thread safety.","severity":"gotcha","affected_versions":"pyobjc-framework-calendarstore 11.0+ with Python 3.13+"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}