Skip to content

Releases: beeware/rubicon-objc

v0.4.9

03 May 01:55
ca6957e
Compare
Choose a tag to compare

Features

  • Objective-C methods with repeated argument names can now be called by using a __ suffix in the Python keyword argument to provide a unique name. (#148)
  • The error message has been improved when an Objective-C selector matching the provided arguments cannot be found. (#461)

Bugfixes

  • The handling of structure and union return types was updated to be compatible with changes to ctypes introduced in Python 3.13.0a6. (#444)

Backward Incompatible Changes

  • The order of keyword arguments used when invoking methods must now match the order they are defined in the Objective-C API. Previously arguments could be in any order. (#453)

Documentation

  • The README badges were updated to display correctly on GitHub. (#463)

Misc

0.4.8

03 Apr 05:28
72a52c6
Compare
Choose a tag to compare

Features

  • Name clashes caused by re-registering Objective C classes and protocols can now be automatically avoided by marking the class with auto_rename. (#181)
  • Apple Silicon is now formally tested by Rubicon's continuous integration configuration. (#374)
  • Support for Python 3.13 was added. (#374)
  • The __repr__ output for ObjCBoundMethod, ObjCClass, ObjCInstance, ObjCMethod, ObjCPartialMethod, and ObjCProtocol were simplified. (#432)

Bugfixes

  • The __all__ definition for rubicon.objc was corrected to use strings, rather than symbols. (#401)

Documentation

  • The documentation contribution guide was updated to use a more authoritative reStructuredText reference. (#427)

Misc

0.4.7

31 Oct 02:24
29fa257
Compare
Choose a tag to compare

Features

  • The __repr__ and __str__ implementations for NSPoint, CGPoint, NSRect, CGRect, NSSize, CGSize, NSRange, CFRange, NSEdgeInsets and UIEdgeInsets have been improved. (#222)
  • objc_id and objc_block are now exposed as part of the rubicon.objc namespace, rather than requiring an import from rubicon.objc.runtime. (#225)

Bugfixes

  • References to blocks obtained from an Objective C API can now be invoked on M1 hardware. (#225)
  • Rubicon is now compatible with PEP563 deferred annotations (from __future__ import annotations). (#308)
  • iOS now uses a full NSRunLoop, rather than a CFRunLoop. (#317)

Backward Incompatible Changes

  • Support for Python 3.7 was dropped. (#334)

Documentation

  • All code blocks were updated to add a button to copy the relevant contents on to the user's clipboard. (#300)

Misc

0.4.6

14 Apr 01:07
3fb9aa5
Compare
Choose a tag to compare

Bugfixes

  • The error message returned when a selector has the wrong type has been improved. (#271)
  • Rubicon now uses an implicit namespace package, instead of relying on the deprecated pkg_resources API. (#292)

Misc

0.4.5

02 Feb 23:58
a80a7dc
Compare
Choose a tag to compare

Bugfixes

  • Classes that undergo a class name change between alloc() and init() (e.g., NSWindow becomes NSKVONotifying_Window) no longer trigger instance cache eviction logic. (#258)

Misc

0.4.5rc1

25 Jan 00:04
650ccde
Compare
Choose a tag to compare
0.4.5rc1 Pre-release
Pre-release

Due to an incompatibility with Toga 0.3.0dev39, Rubicon-ObjC 0.4.4 was yanked from PyPI. This RC1 release was published so that development versions of Toga could access the bug fixes contained in that release.

Features

  • Support for Python 3.6 was dropped. (#371)

Misc

v0.4.4

23 Jan 00:05
e198bb0
Compare
Choose a tag to compare

Due to an incompatibility with Toga 0.3.0dev39, Rubicon-ObjC 0.4.4 was yanked from PyPI.

Bugfixes

  • Background threads will no longer lock up on iOS when an asyncio event loop is in use. (#228)
  • The ObjCInstance cache no longer returns a stale wrapper objects if a memory address is re-used by the Objective C runtime. (#249)
  • It is now safe to open an asyncio event loop on a secondary thread. Previously this would work, but would intermittently fail with a segfault when then loop was closed. (#250)
  • A potential race condition that would lead to duplicated creation on ObjCInstance wrapper objects has been resolved. (#251)
  • A race condition associated with populating the ObjCClass method/property cache has been resolved. (#252)

Misc

v0.4.3

04 Dec 22:54
925dd28
Compare
Choose a tag to compare

Features

  • Support for Python 3.11 has been added. (#224)
  • Support for Python 3.12 has been added. (#231)

Bugfixes

  • Enforce usage of argtypes when calling send_super. (#220)
  • The check identifying the architecture on which Rubicon is running has been corrected for x86_64 simulators using a recent Python-Apple-support releases. (#235)

Misc

v0.4.2

13 Nov 23:47
29f8b85
Compare
Choose a tag to compare

Features

  • Added autoreleasepool context manager to mimic Objective-C @autoreleasepool blocks. (#213)

  • Allow storing Python objects in Objective-C properties declared with @objc_property. (#214)

  • Added support for Python 3.10. (#218)

Bugfixes

  • Raise TypeError when trying to declare a weak property of a non-object type. (#215)

  • Corrected handling of methods when a class overrides a method defined in a grandparent. (#216)

v0.4.1

25 Jul 02:24
d1ff4a7
Compare
Choose a tag to compare

Features

  • Added official support for Python 3.9. (#193)

  • Added official support for macOS 11 (Big Sur). (#195)

  • Autorelease Objective-C instances when the corresponding Python instance is destroyed. (#200)

  • Improved memory management when a Python instance is assigned to a new ObjCInstance attribute. (#209)

  • Added support to declare weak properties on custom Objective-C classes. (#210)

Bugfixes

  • Fixed incorrect behavior of Block when trying to create a block with no arguments and using explicit types. This previously caused an incorrect exception about missing argument types; now a no-arg block is created as expected. (#153)

  • Fixed handling of type annotations when passing a bound Python method into Block. (#153)

  • A cooperative entry point for starting event loop has been added. This corrects a problem seen when using Python 3.8 on iOS. (#182)

  • Improved performance of Objective-C method calls and ObjCInstance creation in many cases. (#183)

  • Fix calling of signal handlers added to the asyncio loop with CFRunLoop integration. (#202)

  • Allow restarting a stopped event loop. (#205)

Deprecations and Removals

  • Removed automatic conversion of Objective-C numbers (NSNumber and NSDecimalNumber) to Python numbers when received from Objective-C (i.e. returned from an Objective-C method or property or passed into an Objective-C method implemented in Python). This automatic conversion significantly slowed down every Objective-C method call that returns an object, even though the conversion doesn't apply to most method calls. If you have code that receives an Objective-C number and needs to use it as a Python number, please convert it explicitly using py_from_ns or an appropriate Objective-C method.

    As a side effect, NSNumber and NSDecimalNumber values stored in Objective-C collections (NSArray, NSDictionary) are also no longer automatically unwrapped when retrieved from the collection, even when using Python syntax to access the collection. For example, if arr is a NSArray of integer NSNumber, arr[0] now returns an Objective-C NSNumber and not a Python int as before. If you need the contents of an Objective-C collection as Python values, you can use py_from_ns to convert either single values (e.g. py_from_ns(arr[0])) or the entire collection (e.g. py_from_ns(arr)). (#183)

  • Removed macOS 10.12 through 10.14 from our automatic test matrix, due to pricing changes in one of our CI services (Travis CI). OS X 10.11 is still included in the test matrix for now, but will probably be removed relatively soon. Automatic tests on macOS 10.15 and 11.0 are unaffected as they run on a different CI service (GitHub Actions).

    Rubicon will continue to support macOS 10.14 and earlier on a best-effort basis, even though compatibility is no longer tested automatically. If you encounter any bugs or other problems with Rubicon on these older macOS versions, please report them! (#197)

Misc