- Added a workaround for bpo-36880 (https://bugs.python.org/issue36880), which caused memory
- Renamed the objc.async module to objc.eventloop to avoid keyword clashes.
- Add support for Mojave
- Add support for High Sierra
- Removed support for Python 3.4
- Removed support for Yosemite
- Added Pythonic operators and methods on
NSStringobjects, similar to those for
NSDictionary. * Only a small subset of the standard
strmethods is supported at the moment. Additional
strmethods may be implemented in the future, but some methods (like
format) will never be supported, as they cannot be implemented efficiently based on
- Removed automatic conversion of
strwhen returned from Objective-C methods. This feature made it difficult to call Objective-C methods on
NSStringobjects, because there was no easy way to prevent the automatic conversion. * In most cases, this change will not affect existing code, because
NSStringobjects now support operations similar to
str. * If an actual
strobject is required, the
NSStringobject can be wrapped in a
strcall to convert it.
- Added support for
objc_propertywith non-object types.
- Added public
set_ivarfunctions for manipulating ivars.
- Changed the implementation of
objc_propertyto use ivars instead of Python attributes for storage. This fixes name conflicts in some situations.
objc_propertysetters on non-macOS platforms. (cculianu)
- Fixed various bugs in the collection
ObjCInstancesubclasses: * Fixed getting/setting/deleting items or slices with indices lower than
-len(obj). Previously this crashed Python, now an
IndexErroris raised. * Fixed slices with step size 0. Previously they were ignored and 1 was incorrectly used as the step size, now an
IndexErroris raised. * Fixed equality checks between Objective-C arrays/dictionaries and non-sequence/mapping objects. Previously this incorrectly raised a
TypeError, now it returns
False. * Fixed equality checks between Objective-C arrays and sequences of different lengths. Previously this incorrectly returned
Trueif the shorter sequence was a prefix of the longer one, now
Falseis returned. * Fixed calling
popitemon an empty Objective-C dictionary. Previously this crashed Python, now a
KeyErroris raised. * Fixed calling
updatewith both a mapping and keyword arguments on an Objective-C dictionary. Previously the kwargs were incorrectly ignored if a mapping was given, now both are respected.
- Fixed calling methods using kwarg syntax if a superclass and subclass define methods with the same prefix, but different names. For example, if a superclass had a method
initWithFoo:bar:and the subclass
initWithFoo:spam:, the former could not be called on instances of the subclass.
- Rewrote almost all Core Foundation-based functions to use Foundation instead.
* The functions
NSDecimalNumber.from_decimalhave been removed and replaced by
ns_from_py. * The function
atis now an alias for
ns_from_py. * The function
is_strhas been removed.
is_str(obj)calls should be replaced with
isinstance(obj, NSString). * The functions
to_valuehave been removed and replaced by
declare_propertynot applying to subclasses of the class it was called on.
ObjCBoundMethodwhen the wrapped method is not an
- Fixed the encodings of
NSRecton 32-bit systems.
- Renamed the
asyncsupport package to
eventloopto avoid a Python 3.5+ keyword clash.
- Improved handling of boolean types.
- Added support for using primitives as object values (e.g, as the key/value in an NSDictonary).
- Added support for passing Python lists as Objective-C NSArray arguments, and Python dicts as Objective-C NSDictionary arguments.
- Corrected support to storing strings and other objects as properties on Python-defined Objective-C classes.
- Added support for creating Objective-C blocks from Python callables. (ojii)
- Added support for returning compound values (structures and unions) from Objective-C methods defined in Python.
- Added support for creating, extending and conforming to Objective-C protocols.
- Added an
objc_constconvenience function to look up global Objective-C object constants in a DLL.
- Added support for registering custom
ObjCInstancesubclasses to be used to represent Objective-C objects of specific classes.
- Added support for integrating NSApplication and UIApplication event loops with Python’s asyncio event loop.
- Added support for using native Python sequence/mapping syntax with
- Added support for calling Objective-C blocks in Python. (ojii)
- Added functions for declaring custom conversions between Objective-C type encodings and
- Added functions for splitting and decoding Objective-C method signature encodings.
- Added automatic conversion of Python sequences to C arrays or structures in method arguments.
- Extended the Objective-C type encoding decoder to support block types, bit fields (in structures), typed object pointers, and arbitrary qualifiers. If unknown pointer, array, struct or union types are encountered, they are created and registered on the fly.
- Changed the
PyObjectEncodingto match the real definition of
- Fixed the declaration of
c_wchar, is now
- Removed the
get_selectorfunction. Use the
- Removed some runtime function declarations that are deprecated or unlikely to be useful.
- Removed the encoding constants. Use
encoding_for_ctypeto get the encoding of a type.
- (#40) Added the ability to explicitly declare no-attribute methods as properties. This is to enable a workaround when Apple introduces readonly properties as a way to access these methods.
- Added a more compact syntax for calling Objective-C methods, using Python keyword arguments. (The old syntax is still fully supported and will not be removed; certain method names even require the old syntax.)
- Added a
- Added official support for Python 3.6.
- Added keyword arguments to disable argument and/or return value conversion when calling an Objective-C method.
- Added support for (
strof Objective-C classes and objects to return the
debugDescription, or for
NSStrings, the string value.
ObjCInstance(in addition to
type), and added an
ObjCMetaClassclass to represent metaclasses.
- Fixed some issues on non-x86_64 architectures (i386, ARM32, ARM64).
- Fixed example code in README. (Dayof)
- Removed the last of the Python 2 compatibility code.
objc_propertyfunction for adding properties to custom Objective-C subclasses. (Longhanks)
- Removed most Python 2 compatibility code.
- Dropped support for Python 3.3.
- Added conversion of Python
enum.Enumobjects to their underlying values when passed to an Objective-C method.
- Added syntax highlighting to example code in README. (stsievert)
- Fixed the
setup.pyshebang line. (uranusjr)
- Fixed setting of
ObjCInstanceattributes that are not Objective-C properties.
- First beta release.
- Dropped support for Python 2. Python 3 is now required, the minimum tested version is Python 3.3.
- Added error detection when attempting to create an Objective-C class with a name that is already in use.
- Added automatic conversion between Python
NSDecimalin method arguments and return values.
- Added PyPy to the list of test platforms.
- When subclassing Objective-C classes, the return and argument types of
methods are now specified using Python type annotation syntax and
- Improved property support.
- Fixed some issues on ARM64 (iOS 64-bit).
NSStringconversion in a few situations.
- Fixed some issues on iOS and 32-bit platforms.
- Objective-C classes can now be subclassed using Python class syntax, by
ObjCClassas the superclass.
ObjCSubclass, which is made obsolete by the new subclassing syntax.
- Initial alpha release.
- Objective-C classes and instances can be accessed via
- Methods can be called on classes and instances with Python method call syntax.
- Properties can be read and written with Python attribute syntax.
- Method return and argument types are read automatically from the method type encoding.
- A small number of commonly used structs are supported as return and argument types.
- Python strings are automatically converted to and from
NSStringwhen passed to or returned from a method.
- Subclasses of Objective-C classes can be created with