Commits

Ronald Oussoren committed 5a5a679

Loads of changes to improve behaviour with python 2.7 and in 64-bit mode.

A rather significant change is that Foundation.NSRect and Quartz.CGRect
are now aliases (because of the structure of PyObjC both are Foundation.NSRect).
Likewise for NSSize and NSPoint.

I've also added objc.array_property, objc.set_property and objc.dict_property,
but haven't fleshed out unittests for these yet.

  • Participants
  • Parent commits cb5d555
  • Branches pyobjc-ancient

Comments (0)

Files changed (179)

pyobjc-core/Doc/dev/coding-style.rst

 
 All (Objective-)C files in ``Modules/objc/`` should include ``"pyobjc.h"`` as
 their first include.  The (Objective-)C files in the wrappers for frameworks
-should include ``"pyobjc-api.h"`` and should not use other include-files in
-``Modules/objc`` other than ``pyobjc-api.h`` and ``wrapper-const-table.h``.
+should include ``"pyobjc-api.h"`` and should not use other headers files from
+``pyobjc-core``.
 
-.. _`PEP 7`: http://www.python.org/peps/pep-0007.txt
+The ``setup.py`` for a framework wrapper should defer most work to 
+``pyobjc_setup.py``, like so:
+
+.. code-block:: python
+
+   from pyobjc_setup import setup
+
+   setup(
+      name='pyobjc-framework-AddressBook',
+      version="2.3"
+      description = "Wrappers for the framework AddressBook on Mac OS X",
+      packages = [ "AddressBook" ],
+      install_requires = [
+          'pyobjc-core>=2.3b1',
+          'pyobjc-framework-Cocoa>=2.3b1',
+      ],
+   )
+
+The framework wrappers do *not* include a copy of ``pyobjc-api.h``, but 
+dynamicly fetches that at build time.
 
 Documentation
 -------------
         
 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
 
+.. _`PEP 7`: http://www.python.org/peps/pep-0007.txt

pyobjc-core/Doc/dev/wrapping.rst

 Introduction
 ------------
 
+.. warning::
+
+  This document is very dated and needs to be rewritten. The easiest way
+  to wrap a framework that requires more than what is described in
+  `The basics`_ is to copy an existing framework wrapper and adapt that.
+
+  Tool support is currently totally broken.
+
 This document describes how you can wrap on Objective-C class library using
 a Python module or package.  This document assumes that your class library is
 located in a framework.

pyobjc-core/Doc/lib/module-objc.rst

 
 This can also be used to convert a read-only property to a read-write one
 by adding a setter accessor.
-
-
-   
-   

pyobjc-core/Lib/objc/_properties.py

-__all__ = ('object_property', 'bool_property', )
-        #'array_property', 'set_property')
+__all__ = ('object_property', 'bool_property',
+        'array_property', 'set_property', 'dict_property')
 
 from objc import ivar, selector, _C_ID, _C_NSBOOL, _C_BOOL, NULL
 from objc import lookUpClass
                 name, read_only, copy, dynamic, ivar, typestr)
 
 
-#
-#def _id(value):
-#    return value
-#
-#class array_proxy (object):
-#    def __init__(self, name, wrapped, read_only):
-#        self._name = name
-#        self._wrapped = wrapped
-#        self._ro = read_only
-#
-#    def __repr__(self):
-#        return '<array proxy for property ' + self._name + repr(self._wrapped) + '>'
-#
-#    def __reduce__(self):
-#        # Ensure that the proxy itself doesn't get stored
-#        # in pickles.
-#        return _id, self._wrapped
-#
-#    def __getitem__(self, index):
-#        return self._wrapped[index]
-#
-#    def __setitem__(self, index, value):
-#        # Generate the right willChange
-#        # - index can be a number or a slice
-#
-#        self._wrapped[index] = value
-#
-#        # Generate the right didChange
-#
-#    # Likewise for the rest of the list interface
-#
-#class array_property (object_property):
-#    # FIXME: getter should create an empty list on first access
-#    def __get__(self):
-#        v = object_property.__get__(self)
-#        return array_proxy(self._name, v, self._ro)
-#
-## Implement set proxy
-#
-#class set_property (object_property):
-#    # FIXME: getter should create an empty set on first access
-#    def __get__(self):
-#        v = object_property.__get__(self)
-#        return set_proxy(self._name, v, self._ro)
+
+def _id(value):
+    return value
+
+NSIndexSet = lookUpClass('NSIndexSet')
+NSMutableIndexSet = lookUpClass('NSMutableIndexSet')
+NSKeyValueChangeSetting = 1
+NSKeyValueChangeInsertion = 2
+NSKeyValueChangeRemoval = 3
+NSKeyValueChangeReplacement = 4
+
+
+class array_proxy (object):
+    # XXX: The implemenation should be complete, but is currently not
+    # tested.
+    __slots__ = ('_name', '_wrapped', '_parent', '_ro')
+
+    def __init__(cls, name, parent, wrapped, read_only):
+        v = cls.alloc().init()
+        v._name = name
+        v._wrapped = wrapped
+        v._parent = parent
+        v._ro = read_only
+
+
+    def __indexSetForIndex(self, index):
+        if isinstance(index, slice):
+            result = NSMutableIndexSet.alloc().init()
+            start, stop, step = index.indices(len(self._wrapped))
+            for i in xrange(start, stop, step):
+                result.addIndex(index)
+
+            return result
+
+        else:
+            if index < 0:
+                v = len(self) + index
+                if v < 0:
+                    raise IndexError(index)
+                return NSIndexSet.alloc().initWithIndex_(v)
+
+            else:
+                return NSIndexSet.alloc().initWithIndex_(v)
+        
+
+
+    def __repr__(self):
+        return '<array proxy for property ' + self._name + repr(self._wrapped) + '>'
+
+    def __reduce__(self):
+        # Ensure that the proxy itself doesn't get stored
+        # in pickles.
+        return _id, self._wrapped
+
+    def __getattr__(self, name):
+        # Default: just defer to wrapped list
+        return getattr(self._wrapped, name)
+
+    def __getitem__(self, index):
+        return self._wrapped[index]
+
+    def __setitem__(self, index, value):
+        if self._ro:
+            raise TypeError("Property '%s' is read-only"%(self._name,))
+
+        indexes = self.__indexSetForIndex(index)
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeSetting,
+                indexes, self._name)
+        try:
+            self._wrapped[index] = value
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeReplacement,
+                indexes, self._name)
+
+    def __delitem__(self, index):
+        if self._ro:
+            raise TypeError("Property '%s' is read-only"%(self._name,))
+
+        indexes = self.__indexSetForIndex(index)
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeRemoval,
+                indexes, self._name)
+        try:
+            self._wrapped[index] = value
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeRemoval,
+                indexes, self._name)
+
+    def append(self, value):
+        if self._ro:
+            raise TypeError("Property '%s' is read-only"%(self._name,))
+
+        index = len(self._wrapped)
+        indexes = NSIndexSet.alloc().initWithIndex_(index)
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeInsertion,
+                indexes, self._name)
+        try:
+            self._wrapped.append(value)
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeInsertion,
+                indexes, self._name)
+
+    def insert(self, index, value):
+        if isinstance(index, slice):
+            raise TypeError("insert argument 1 is a slice")
+
+        indexes = self.__indexSetForIndex(index)
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeInsertion,
+                indexes, self._name)
+        try:
+            self._wrapped.insert(index, value)
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeInsertion,
+                indexes, self._name)
+
+    def pop(self, index=-1):
+        if self._ro:
+            raise TypeError("Property '%s' is read-only"%(self._name,))
+
+        if isinstance(index, slice):
+            raise TypeError("insert argument 1 is a slice")
+
+        indexes = self.__indexSetForIndex(index)
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeRemoval,
+                indexes, self._name)
+        try:
+            self._wrapped.insert(index, value)
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeRemoval,
+                indexes, self._name)
+
+    def extend(self, values):
+        # XXX: This is suboptimal but correct
+        for item in values:
+            self.append(values)
+
+
+    def sort(self, cmp=None, key=None, reverse=False):
+        if self._ro:
+            raise TypeError("Property '%s' is read-only"%(self._name,))
+
+        indexes = NSIndexSet.alloc().initWithIndexesInRange_(
+                (0, len(self._wrapped)))
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeReplacement,
+                indexes, self._name)
+        try:
+            self._wrapped.sort(cmp=cmp, key=key, reverse=reverse)
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeReplacement,
+                indexes, self._name)
+
+    def reverse(self):
+        if self._ro:
+            raise TypeError("Property '%s' is read-only"%(self._name,))
+
+        indexes = NSIndexSet.alloc().initWithIndexesInRange_(
+                (0, len(self._wrapped)))
+        self._parent.willChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeReplacement,
+                indexes, self._name)
+        try:
+            self._wrapped.reverse()
+        finally:
+            self._parent.didChange_valuesAtIndexes_forKey_(
+                NSKeyValueChangeReplacement,
+                indexes, self._name)
+
+
+class array_property (object_property):
+    def __get__(self):
+        v = object_property.__get__(self)
+        if v is None:
+            v = list()
+            object_property.__set__(self, v)
+        return array_proxy(self._name, self, v, self._ro)
+
+NSKeyValueUnionSetMutation = 1,
+NSKeyValueMinusSetMutation = 2,
+NSKeyValueIntersectSetMutation = 3,
+NSKeyValueSetSetMutation = 4
+             
+
+class set_proxy (object):
+    __slots__ = ('_name', '_wrapped', '_parent', '_ro')
+
+    def __init__(cls, name, parent, wrapped, read_only):
+        v = cls.alloc().init()
+        v._name = name
+        v._wrapped = wrapped
+        v._parent = parent
+        v._ro = read_only
+
+    def __getattr__(self, attr):
+        return getattr(self.wrapped, attr)
+
+    def add(self, item):
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueUnionSetMutation,
+                set(item),
+        )
+        try:
+            self._wrapped.add(item)
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueUnionSetMutation,
+                set(item),
+            )
+
+    def clear(self):
+        object = set(self._wrapped)
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                object
+        )
+        try:
+            self._wrapped.clear()
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                object
+            )
+
+    def difference_update(self, *others):
+        s = set()
+        s.update(*others)
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                s
+        )
+        try:
+            self._wrapped.difference_update(s)
+
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                s
+            )
+
+
+    def discard(self, item):
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                set(item)
+        )
+        try:
+            self._wrapped.discard(s)
+
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                set(item)
+            )
+        
+    def intersection_update(self, other):
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueIntersectSetMutation,
+                set(item)
+        )
+        try:
+            self._wrapped.intersection_update(s)
+
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueIntersectSetMutation,
+                set(item)
+            )
+
+    def pop(self):
+        try:
+            v = iter(self).next()
+        except KeyError:
+            raise KeyError("Empty set")
+        
+        self.remove(v)
+
+
+    def remove(self, item):
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                set(item)
+        )
+        try:
+            self._wrapped.remove(s)
+
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                set(item)
+            )
+
+    def symmetric_difference_update(self, other):
+        other = set(other)
+        s = set()
+        for item in other:
+            if item in self:
+                s.add(item)
+
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                s
+        )
+        try:
+            self._wrapped.symmetric_difference_update(other)
+
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueMinusSetMutation,
+                s
+            )
+
+    def update(self, *others):
+        s = set()
+        s.update(*others)
+
+        self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueUnionSetMutation,
+                s
+        )
+        try:
+            self._wrapped.update(s)
+
+        finally:
+            self._parent.willChangeValueForKey_withSetMutation_usingObjects_(
+                self._name,
+                NSKeyValueUnionSetMutation,
+                s
+            )
+
+
+    def __ior__(self, other):
+        return self|other
+
+    def __isub__(self, other):
+        return self-other
+
+    def __ixor__(self, other):
+        return self^other
+
+    def __iand__(self, other):
+        return self&other
+
+
+
+class set_property (object_property):
+    def __get__(self):
+        v = object_property.__get__(self)
+        if v is None:
+            v = set()
+            object_property.__set__(self, v)
+        return set_proxy(self._name, v, self._ro)
+
+
+NSMutableDictionary = lookUpClass('NSMutableDictionary')
+
+class dict_property (object_property):
+    def __get__(self):
+        v = object_property.__get__(self)
+        if v is None:
+            v = NSMutableDictionary.alloc().init()
+            object_property.__set__(self, v)
+        return dict_proxy(self._name, v, self._ro)

pyobjc-core/Lib/objc/todo.txt

+- TODO:
+  * Later: automaticly parse the property definitions in the objc runtime
+    and do the right thing (but: also add global flag to enable/disable this)
+
+    Partially done: there is a function for parsing property definitions, but
+    that isn't used yet.
+
+  * Later: add metadata hooks + the data itself to define properties (again:
+    using the global flag to enable/disable properties on existing classes)
+
+  * The plan: flag == False in 2.3, flag == True in 2.4, remove flag in 2.5.
+    (and: add hooks to py2app to enable setting the flag in setup.py)
+
+- Binaries are build using a local copy of libxml by default, to avoid
+  problems when building on OSX 10.6 and running on earlier releases.
+
+- TODO: compile bridgesupport files into something more efficient.
+
+  (At the very least least: the PyObjCMethodSignature objects can be shared 
+  more than they are now). 
+
+  This needs further investigation to determine why we seem to use more memory
+  than Ruby.
+
+- TODO: Drop support for 2.5 and 
+
+  * implement '__dir__'
+
+  * avoid scanning the entire class
+
+  * drop 'addConvenienceForSelector', but instead of that add convenience methods
+    to classes.
+
+  This should improve performance and reduce memory usage (when proper caching
+  is used).
+
+- TODO:
+
+  * Test memory usage using the Instruments tool to check which bits
+    of PyObjC use (too) much memory. Do this using a build of
+    Python without pymalloc (because pymalloc confuses Instruments)
+
+- TODO:
+
+  * NSData/NSMutableData should have same interface as bytes/bytearray
+    (the former obviously only for 3.x)
+
+  * Move manual wrappers and metadata for NSArray, NSData, NSDictionary,
+    NSSet and their mutable variants to pyobjc-core
+

pyobjc-core/Modules/objc/OC_PythonObject.m

 }
 
 
+/*
+ * Fake implementation for _cfTypeID, which gets called by
+ * system frameworks on some occassions.
+ */
+static BOOL haveTypeID = NO;
+static CFTypeID _NSObjectTypeID;
+
+-(CFTypeID)_cfTypeID
+{
+	if (haveTypeID) {
+		NSObject* obj = [[NSObject alloc] init];
+		_NSObjectTypeID = CFGetTypeID((CFTypeRef)obj);
+		[obj release];
+		haveTypeID = YES;
+	}
+	return _NSObjectTypeID;
+}
+
 
 @end /* OC_PythonObject class implementation */
 

pyobjc-core/Modules/objc/class-builder.m

 
 	if ([base_class instancesRespondToSelector:@selector(copyWithZone:)]) {
 		methinfo = PyObjCMethodSignature_FromSignature(
-				copyWithZone_signature);
+				copyWithZone_signature, NO);
 		if (methinfo == NULL) goto error_cleanup; 
 		closure = PyObjCFFI_MakeClosure(methinfo, 
 				object_method_copyWithZone_, base_class);
 	}
 	if ([base_class instancesRespondToSelector:@selector(mutableCopyWithZone:)]) {
 		methinfo = PyObjCMethodSignature_FromSignature(
-				copyWithZone_signature);
+				copyWithZone_signature, NO);
 		if (methinfo == NULL) goto error_cleanup; 
 		closure = PyObjCFFI_MakeClosure(methinfo, 
 				object_method_copyWithZone_, base_class);
 			copyWithZone_signature);
 	}
 
-	methinfo = PyObjCMethodSignature_FromSignature("v@:");
+	methinfo = PyObjCMethodSignature_FromSignature("v@:", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, object_method_dealloc,
 		base_class);
 	preclass_addMethod( intermediate_class, @selector(dealloc),
 			(IMP)closure, "v@:");
 
-	methinfo = PyObjCMethodSignature_FromSignature("v@:");
+	methinfo = PyObjCMethodSignature_FromSignature("v@:", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, object_method_finalize,
 		base_class);
 	preclass_addMethod( intermediate_class, @selector(finalize),
 			(IMP)closure, "v@:");
 
-	methinfo = PyObjCMethodSignature_FromSignature("@@:@");
+	methinfo = PyObjCMethodSignature_FromSignature("@@:@", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, object_method_valueForKey_,
 		base_class);
 	preclass_addMethod(intermediate_class, @selector(storedValueForKey:),
 		(IMP)closure, "@@:@");
 
-	methinfo = PyObjCMethodSignature_FromSignature("v@:@@");
+	methinfo = PyObjCMethodSignature_FromSignature("v@:@@", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, object_method_setValue_forKey_,
 		base_class);
 		@selector(takeValue:forKey:),       (IMP)closure, "v@:@@");
 
 
-	methinfo = PyObjCMethodSignature_FromSignature("c@::");
+	methinfo = PyObjCMethodSignature_FromSignature("c@::", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, 
 		object_method_respondsToSelector,
 		@selector(respondsToSelector:), 
 		(IMP)closure, "c@::");
 
-	methinfo = PyObjCMethodSignature_FromSignature("@@::");
+	methinfo = PyObjCMethodSignature_FromSignature("@@::", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, 
 		object_method_methodSignatureForSelector,
 		@selector(methodSignatureForSelector:), 
 		(IMP)closure, "@@::");
 
-	methinfo = PyObjCMethodSignature_FromSignature("v@:@");
+	methinfo = PyObjCMethodSignature_FromSignature("v@:@", NO);
 	if (methinfo == NULL) goto error_cleanup; 
 	closure = PyObjCFFI_MakeClosure(methinfo, 
 		object_method_forwardInvocation,
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
 	if (_KVOHackLevel() == BROKEN_KVO) {
-		methinfo = PyObjCMethodSignature_FromSignature("v@:@");
+		methinfo = PyObjCMethodSignature_FromSignature("v@:@", NO);
 		if (methinfo == NULL) goto error_cleanup; 
 		closure = PyObjCFFI_MakeClosure(methinfo, object_method_willOrDidChangeValueForKey_,
 			base_class);
 		PyObjCMethodSignature* methinfo;
 
 #		define METH(pyname, selector, types, imp) 		\
-		        methinfo = PyObjCMethodSignature_FromSignature(types); \
+		        methinfo = PyObjCMethodSignature_FromSignature(types, NO); \
 			if (methinfo == NULL) goto error_cleanup; \
 			closure = PyObjCFFI_MakeClosure(methinfo, imp, \
 					super_class); \
 
 
 	signature = PyObjCMethodSignature_FromSignature(
-		PyObjCSelector_Signature(pymeth));
+		PyObjCSelector_Signature(pymeth), NO);
 	len = Py_SIZE(signature);
 
 	Py_XDECREF(pymeth); pymeth = NULL;

pyobjc-core/Modules/objc/function.m

 	result->name = NULL;
 	result->module = NULL;
 
-	result->methinfo= PyObjCMethodSignature_WithMetaData(signature, meta);
+	result->methinfo= PyObjCMethodSignature_WithMetaData(signature, meta, NO);
 	if (result->methinfo == NULL) {
 		Py_DECREF(result->methinfo);
 		return NULL;

pyobjc-core/Modules/objc/libffi_support.m

 
 static ffi_type* signature_to_ffi_type(const char* argtype);
 
-#if PY_MAJOR_VERSION == 2
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 6
 static void cleanup_ffitype_capsule(void* ptr)
 {
 	free_type(ptr);
 				pythonSelector->sel_class, 
 				(pythonSelector->sel_flags & PyObjCSelector_kCLASS_METHOD) != 0,
 				pythonSelector->sel_selector,
-				pythonSelector->sel_python_signature);
+				pythonSelector->sel_python_signature,
+				PyObjCNativeSelector_Check(pythonSelector));
 
 		result = PyObjCFFI_MakeIMPForSignature(methinfo, pythonSelector->sel_selector, pythonSelector->callable);
 		Py_DECREF(methinfo);
 
 
 #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 7
-static void imp_capsule_cleanup(void* ptr, void* context __attribute__((__unused__)))
+static void imp_capsule_cleanup(void* ptr)
 {
 	PyObjCFFI_FreeIMP(ptr);
 }
-static void block_capsule_cleanup(void* ptr, void* context __attribute__((__unused__)))
+static void block_capsule_cleanup(void* ptr)
 {
 	PyObjCBlock_Release(ptr);
 }

pyobjc-core/Modules/objc/method-signature.h

 };
 
 
-extern PyObjCMethodSignature* PyObjCMethodSignature_WithMetaData(const char* signature, PyObject* metadata);
+extern PyObjCMethodSignature* PyObjCMethodSignature_WithMetaData(const char* signature, PyObject* metadata, BOOL is_native);
 
 extern PyObjCMethodSignature* PyObjCMethodSignature_ForSelector(
-		                Class cls, BOOL isClassMethod, SEL sel, const char* signature);
+	Class cls, BOOL isClassMethod, SEL sel, const char* signature, BOOL is_native);
 
 
 
 PyObjCMethodSignature_AsDict(PyObjCMethodSignature* methinfo);
 
 static inline PyObjCMethodSignature* PyObjCMethodSignature_FromSignature(
-		const char* sig)
+		const char* sig, BOOL is_native)
 {
-	return PyObjCMethodSignature_WithMetaData(sig, NULL);
+	return PyObjCMethodSignature_WithMetaData(sig, NULL, is_native);
 }
 
 #endif /* PyObjC_METHODSIGNATURE_H */

pyobjc-core/Modules/objc/method-signature.m

 }
 
 
-static int setup_meta(struct _PyObjC_ArgDescr* descr, PyObject* meta)
+static int setup_meta(struct _PyObjC_ArgDescr* descr, PyObject* meta, BOOL is_native)
 {
 	PyObject* d;
 	char typeModifier = 0;
 				buffer[0] = _C_ID;
 				buffer[1] = '\0';
 			}
-			descr->callable = PyObjCMethodSignature_WithMetaData(buffer, d);
+			descr->callable = PyObjCMethodSignature_WithMetaData(buffer, d, NO);
 			if (descr->callable == NULL) {
 				return -1;
 			}
 			return -1;
 		}
 
-		char* type = PyBytes_AsString(bytes);
+		const char* type = PyBytes_AsString(bytes);
 
-		if (!PyObjC_signatures_compatible(descr->type, type)) {
+		if (is_native && !PyObjC_signatures_compatible(descr->type, type)) {
 			/* The new signature is not compatible enough, ignore the 
 			 * override.
 			 */
 }
 
 PyObjCMethodSignature* 
-PyObjCMethodSignature_WithMetaData(const char* signature, PyObject* metadata)
+PyObjCMethodSignature_WithMetaData(const char* signature, PyObject* metadata, BOOL is_native)
 {
 	PyObjCMethodSignature* methinfo;
 	PyObject* v;
 
 	if (metadata) {
 		PyObject* retval = PyDict_GetItemString(metadata, "retval");
-		if (setup_meta(&methinfo->rettype, retval) == -1) {
+		if (setup_meta(&methinfo->rettype, retval, is_native) == -1) {
 			Py_DECREF(methinfo);
 			return NULL;
 		}
 		} else {
 			d = NULL;
 		}
-		if (setup_meta(methinfo->argtype + i, d) == -1) {
+		if (setup_meta(methinfo->argtype + i, d, is_native) == -1) {
 			Py_DECREF(k);
 			Py_DECREF(methinfo);
 			return NULL;
 
 
 PyObjCMethodSignature* PyObjCMethodSignature_ForSelector(
-		Class cls, BOOL isClassMethod, SEL sel, const char* signature)
+		Class cls, BOOL isClassMethod, SEL sel, const char* signature,
+		BOOL is_native)
 {
 	PyObjCMethodSignature* methinfo;
 	PyObject* metadata;
 
 	metadata = PyObjC_FindInRegistry(registry, cls, sel);
-	methinfo =  PyObjCMethodSignature_WithMetaData(signature, metadata);
+	methinfo =  PyObjCMethodSignature_WithMetaData(signature, metadata, is_native);
 	if (isClassMethod) {
 		const char* nm  = sel_getName(sel);
 		if (strncmp(nm, "new", 3) == 0 && ((nm[3] == 0) || isupper(nm[3]))) {

pyobjc-core/Modules/objc/objc-class.m

 
 #if PY_VERSION_HEX >= 0x02060000
 
-
 static int
 nsdata_getbuffer(PyObject* obj, Py_buffer* view, int flags)
 {
 	info->protectedMethods = protectedMethods;
 	info->hiddenSelectors = hiddenSelectors;
 
+	objc_class_register(objc_class, result);
+
 	/*
 	 * Support the buffer protocol in the wrappers for NSData and
 	 * NSMutableData, the only two classes where this makes sense.
 	 */
-	if (strcmp(className, "NSData") == 0) {
+#if 0
+	if (strcmp(className, "_NSZombie_") == 0) {
+		/* pass */
+	} else if (strcmp(className, "nil") == 0) {
+		/* pass */
+	} else if ([objc_class isSubclassOfClass:[NSMutableData class]]) {
+	/*} else if (strcmp(className, "NSMutableData") == 0) {*/
+		((PyTypeObject *)result)->tp_as_buffer = &nsmutabledata_as_buffer;
+	} else if ([objc_class isSubclassOfClass:[NSData class]]) {
+	/*if (strcmp(className, "NSData") == 0) { */
 		((PyTypeObject *)result)->tp_as_buffer = &nsdata_as_buffer;
-	} else if (strcmp(className, "NSMutableData") == 0) {
-		((PyTypeObject *)result)->tp_as_buffer = &nsmutabledata_as_buffer;
 	} else if (strcmp(className, "NSBlock") == 0) {
 		((PyTypeObject *)result)->tp_basicsize = sizeof(PyObjCBlockObject);
 		PyType_Modified((PyTypeObject*)result);
 		PyType_Ready((PyTypeObject *)result);
 	}
+#else
+	if (strcmp(className, "NSMutableData") == 0) {
+		((PyTypeObject *)result)->tp_as_buffer = &nsmutabledata_as_buffer;
+#if PY_VERSION_HEX >= 0x02060000
+		((PyTypeObject *)result)->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER;
+#endif
+		PyType_Modified((PyTypeObject*)result);
+		PyType_Ready((PyTypeObject *)result);
+	} else if (strcmp(className, "NSData") == 0) {
+		((PyTypeObject *)result)->tp_as_buffer = &nsdata_as_buffer;
+#if PY_VERSION_HEX >= 0x02060000
+		((PyTypeObject *)result)->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER;
+#endif
+		PyType_Modified((PyTypeObject*)result);
+		PyType_Ready((PyTypeObject *)result);
+	} else if (strcmp(className, "NSBlock") == 0) {
+		((PyTypeObject *)result)->tp_basicsize = sizeof(PyObjCBlockObject);
+		PyType_Modified((PyTypeObject*)result);
+		PyType_Ready((PyTypeObject *)result);
+	}
+#endif
 
 
 	var = class_getInstanceVariable(objc_class, "__dict__");
 		PyErr_Clear();
 	}
 
-	objc_class_register(objc_class, result);
 
 	return result;
 }

pyobjc-core/Modules/objc/objc-object.m

 }
 
 
-void break_point(void) {
-	printf("break here\n");
-}
 static PyObject *
 object_getattro(PyObject *obj, PyObject * volatile name)
 {
 
 
 	namestr = PyBytes_AsString(bytes);
-	if (strcmp(namestr, "_attributeWithoutModel") == 0) {
-		break_point();
-	}
 	if (namestr == NULL) {
 		if (!PyErr_Occurred()) {
 			PyErr_SetString(PyExc_ValueError, "Empty name");

pyobjc-core/Modules/objc/objc_support.m

 	Py_DECREF(proxy);
 }
 
-BOOL _PyObjC_signatures_compatible(const char* type1, const char* type2)
+static BOOL _PyObjC_signatures_compatible(const char* type1, const char* type2)
 {
-	return YES;
+	//return YES;
 	/* Ignore type modifiers */
 	type1 = PyObjCRT_SkipTypeQualifiers(type1);
 	type2 = PyObjCRT_SkipTypeQualifiers(type2);
 
+	if (*type1 == _C_ARY_B) {
+		if (type2[0] == _C_PTR) {
+			type1++;
+			while (isdigit(*type1)) type1++;
+			return PyObjC_signatures_compatible(type1, type2+1);
+		} else if (type2[0] == _C_ARY_B) {
+			type1++;
+			while (isdigit(*type1)) type1++;
+			type2++;
+			while (isdigit(*type2)) type2++;
+			return PyObjC_signatures_compatible(type1, type2);
+		}
+		return NO;
+	}
+
+
 	if (PyObjCRT_SizeOfType(type1) != PyObjCRT_SizeOfType(type2)) {
 		return NO;
 	}
 		}
 	
 	case _C_PTR:
-		if (type2[1] == _C_VOID && type2[0] == _C_ID) {
+		if (type1[1] == _C_VOID && type2[0] == _C_ID) {
 			return YES;
 		}
 		if (*type2 == _C_CHARPTR) {
 		if (*type2 != _C_PTR) {
 			return NO;
 		}
+		if (type1[1] == _C_VOID || type2[1] == _C_VOID) {
+			return YES;
+		}
 		return PyObjC_signatures_compatible(type1+1, type2+1);
+
 	
 	default:
 		switch (*type2) {
 		}
 	}
 }
+
 BOOL PyObjC_signatures_compatible(const char* type1, const char* type2)
 {
 	BOOL r =  _PyObjC_signatures_compatible(type1, type2);

pyobjc-core/Modules/objc/opaque-pointer.m

 
 	if (new_cif == NULL) {
 		PyObjCMethodSignature* signature;
-		signature = PyObjCMethodSignature_FromSignature(new_cif_signature);
+		signature = PyObjCMethodSignature_FromSignature(new_cif_signature, NO);
 		new_cif = PyObjCFFI_CIFForSignature(signature);
 		Py_DECREF(signature);
 		if (new_cif == NULL) {
 
 	if (convert_cif == NULL) {
 		PyObjCMethodSignature* signature;
-		signature = PyObjCMethodSignature_FromSignature(convert_cif_signature); 
+		signature = PyObjCMethodSignature_FromSignature(convert_cif_signature, YES); 
 		convert_cif = PyObjCFFI_CIFForSignature(signature);
 		Py_DECREF(signature);
 		if (convert_cif == NULL) {

pyobjc-core/Modules/objc/pyobjc.h

  * Central include file for PyObjC. 
  */
 
-#define OBJC_VERSION "2.3a0"
+#define OBJC_VERSION "2.3b1"
 
 // Loading in AppKit on Mac OS X 10.3 results in
 // a bit less than 1500 classes.

pyobjc-core/Modules/objc/selector.h

 #define PyObjCSelector_GET_CLASS(obj) (((PyObjCSelector*)(obj))->sel_class)
 #define PyObjCSelector_GET_SELECTOR(obj) (((PyObjCSelector*)(obj))->sel_selector)
 
-PyObject* PyObjCSelector_New(PyObject* callable, SEL selector, char* signature, int class_method, Class class) ;
+PyObject* PyObjCSelector_New(PyObject* callable, SEL selector, const char* signature, int class_method, Class class) ;
 SEL PyObjCSelector_DefaultSelector(const char* methname);
 
 

pyobjc-core/Modules/objc/selector.m

 			self->sel_class,
 			(self->sel_flags & PyObjCSelector_kCLASS_METHOD) != 0,
 			self->sel_selector,
-			self->sel_python_signature);
+			self->sel_python_signature,
+			PyObjCNativeSelector_Check(self)
+			);
 		if (self->sel_methinfo == NULL) return NULL;
 
 		if (PyObjCPythonSelector_Check(_self)) {
 
 PyObject*
 PyObjCSelector_New(PyObject* callable, 
-	SEL selector, char* signature, int class_method, Class cls)
+	SEL selector, const char* signature, int class_method, Class cls)
 {
 	PyObjCPythonSelector* result;
 	if (signature == NULL) {

pyobjc-core/Modules/objc/struct-wrapper.m

 
 	if (init_cif == NULL) {
 		PyObjCMethodSignature* signature;
-		signature = PyObjCMethodSignature_FromSignature("i^v^v^v");
+		signature = PyObjCMethodSignature_FromSignature("i^v^v^v", YES);
 		init_cif = PyObjCFFI_CIFForSignature(signature);
 		Py_DECREF(signature);
 		if (init_cif == NULL) {

pyobjc-core/Modules/objc/super-call.m

 
 #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 7
 
-static void memblock_capsule_cleanup(void* ptr, void* closure __attribute__((__unused__)))
+static void memblock_capsule_cleanup(void* ptr)
 {
 	PyMem_Free(ptr);
 }
 		methinfo = PyObjCMethodSignature_ForSelector(
 				class, (PyObjCSelector_GetFlags(sel) & PyObjCSelector_kCLASS_METHOD) != 0,
 				PyObjCSelector_GetSelector(sel),
-				PyObjCSelector_Signature(sel));
+				PyObjCSelector_Signature(sel),
+				PyObjCNativeSelector_Check(sel));
 		if (methinfo == NULL) {
 			return NULL;
 		}
 		methinfo = PyObjCMethodSignature_ForSelector(
 				class, (PyObjCSelector_GetFlags(sel) & PyObjCSelector_kCLASS_METHOD) != 0,
 				PyObjCSelector_GetSelector(sel),
-				PyObjCSelector_Signature(sel));
+				PyObjCSelector_Signature(sel),
+				PyObjCNativeSelector_Check(sel));
 		if (methinfo == NULL) {
 			return NULL;
 		}

pyobjc-core/Modules/objc/toll-free-bridging.m

 
 #if 0
 //#if !defined(__OBJC2__) && (PY_VERSION_HEX < 0x03000000)
-#endif
-#if PY_MAJOR_VERSION == 2
+//#endif
+//#if PY_MAJOR_VERSION == 2
 	int r;
 
 	/* Fall back to MacPython CFType support: */

pyobjc-core/NEWS.txt

 
 An overview of the relevant changes in new, and older, releases.
 
-Version 2.3a0
+Version 2.3b1
 -------------
 
-- TODO: 
-
-  * Test memory usage using the Instruments tool to check which bits
-    of PyObjC use (too) much memory. Do this using a build of
-    Python without pymalloc (because pymalloc confuses Instruments)
-
-- TODO:
-
-  * NSData/NSMutableData should have same interface as bytes/bytearray
-    (the former obviously only for 3.x)
-
-  * Move manual wrappers and metadata for NSArray, NSData, NSDictionary,
-    NSSet and their mutable variants to pyobjc-core
+- This version requires Python 2.6 or later, and also supports
+  Python 3.1 or later.
+
+- BUGFIX: The generic proxy for Python objects now implements
+  ``-(CFTypeID)_cfTypeID``, which should result in less hard to
+  understand Objective-C exceptions.
+
+- BUGFIX: The metadata file support now checks if the metadata is 
+  compatible with information gathered from the Objective-C runtime. 
+
+  This ensures that when a native method signature is incompatible
+  with the signature in a metadata file the brige won't garble the
+  correct information (and that in turn avoids hard crashes).
 
 - PyObjC's support for ``NSCoding`` now also works with plain ``NSArchiver``
   instances, not just with ``NSKeyedArchiver``.
 
   * Documentation updates
 
-  * Implement python3 dict, list, ... APIs for NSDictionary and friends,
-    with unittests.
-
 - The Python 3.x port does not support transparent proxies for 'FILE*'
   "objects" because the ``file`` type in Python3 is not implemented on
   top of the C library stdio.
   or the data instance is resized. That's a result of API restrictions
   in Apple's frameworks.
 
-
 - The PyObjCTest testsuite now supports version-specific tests: for
   Python 2.x it will load modules whose name starts with 'test2_' and for
   Python 3.x those starting with 'test3_'. For both versions it will
   ``property``, but integrates better with Objective-C code and APIs like
   Key-Value Observation.
 
-
-- TODO:
-  * Later: automaticly parse the property definitions in the objc runtime
-    and do the right thing (but: also add global flag to enable/disable this)
-
-    Partially done: there is a function for parsing property definitions, but
-    that isn't used yet.
-
-  * Later: add metadata hooks + the data itself to define properties (again:
-    using the global flag to enable/disable properties on existing classes)
-
-  * The plan: flag == False in 2.3, flag == True in 2.4, remove flag in 2.5.
-    (and: add hooks to py2app to enable setting the flag in setup.py)
-
-- Binaries are build using a local copy of libxml by default, to avoid
-  problems when building on OSX 10.6 and running on earlier releases.
-
-- TODO: compile bridgesupport files into something more efficient.
-
-  (At the very least least: the PyObjCMethodSignature objects can be shared 
-  more than they are now). 
-
-  This needs further investigation to determine why we seem to use more memory
-  than Ruby.
-
-- TODO: Drop support for 2.5 and 
-
-  * implement '__dir__'
-
-  * avoid scanning the entire class
-
-  * drop 'addConvenienceForSelector', but instead of that add convenience methods
-    to classes.
-
-  This should improve performance and reduce memory usage (when proper caching
-  is used).
+- Added ``objc.array_property``. This is simular to ``objc.object_property``,
+  but models a list-like object and implements the right Objective-C interfaces
+  for Key-Value Coding/Observations.
+
+- Added ``objc.set_property``. This is simular to 
+  ``objc.object_property``, but models a set-like object and implements the 
+  right Objective-C interfaces for Key-Value Coding/Observations.
+
+- Added ``objc.dict_property``. This is simular to
+  ``objc.object_property``, but models a dict-like object and implements the
+  right Objective-C interfaces for Key-Value Coding/Observations.
+
+- NOTE: The interfaces of ``array_property``, ``set_property`` and ``dict_property``
+  are minimal w.r.t. options for tweaking their behaviour. That will change in
+  future versions of PyObjC. 
+  
+  Please let us know which hooks would be usefull.
 
 - The documentation is now written using Sphinx.
 
+  NOTE: This is an operation in progress, the documentation needs work to be
+  truly usefull.
+
 - The (undocument) module ``PyObjCTools.DistUtilsSupport`` is no longer
   present.
 

pyobjc-core/PyObjCTest/test_array_property.py

+from PyObjCTools.TestSupport import *
+
+
+class TestArrayProperty (TestCase):
+    def testMissing(self):
+        self.fail("Implement tests")
+
+    def testGetting(self):
+        # Check that default value is an empty value
+        # Check that value is a proxy object
+        self.fail("todo")
+
+    def testSetting(self):
+        # Set value, check that 
+        # (1) value gets copied
+        # (2) accessing the property result in proxy
+        self.fail("todo")
+
+    def testGetSetItem(self):
+        # Use __getitem__, __setitem__ interface and check
+        # that the correct KVO events get emitted.
+        self.fail("todo")
+
+    def testGetSetSlice(self):
+        # Same as testGetSetItem, but using slice
+        self.fail("todo")
+
+    def testInsert(self):
+        # Use insert method and check that the correct
+        # KVO events get emitted
+        self.fail("todo")
+
+    def testPop(self):
+        # Use pop method and check that the correct
+        # KVO events get emitted
+        self.fail("todo")
+
+    def testDelItem(self):
+        # Use __delitem__and check that the correct
+        # KVO events get emitted
+        self.fail("todo")
+
+    def testDelSlice(self):
+        # As testDelItem, but using slices
+        self.fail("todo")
+
+    def testSort(self):
+        # Use sort method and check that the correct
+        # KVO events get emitted
+        self.fail("todo")
+
+    def testReverse(self):
+        # Use reverse method and check that the correct
+        # KVO events get emitted
+        self.fail("todo")
+
+    def testKVOFromObjC(self):
+        # Check that the right interfaces are implemented
+        # to enable accessing and changing the property 
+        # from ObjC, using an NSArrayController
+        # (Which probably means that a number of KVC methods
+        # need to be implemented)
+        self.fail("todo")
+
+    # Verify docs and/or implementation to check for other
+    # mutating methods
+
+    def testReadingMethods(self):
+        # Check that all read-only methods work as well
+        self.fail("todo")
+
+    def testMutatingReadonlyProperty(self):
+        # Check that trying to mutate a read-only property
+        # will raise an exception
+        self.fail("todo")
+
+    def testMutatingReadonlyPropertyObjC(self):
+        # Check that trying to mutate a read-only property
+        # from ObjC will raise an exception
+        self.fail("todo")
+
+
+if __name__ == "__main__":
+    main()

pyobjc-core/PyObjCTest/test_classhooks.py

         self.fail("Test (and implementation) incomplete")
 
 
-class TestKVOProperty_Array (TestCase):
-    def testIncomplete(self):
-        self.fail("Implement objc.array_property")
-
-class TestKVOProperty_Set (TestCase):
-    def testIncomplete(self):
-        self.fail("Implement objc.set_property")
-
 
 if __name__ == "__main__":
     main()

pyobjc-core/PyObjCTest/test_dict_property.py

+
+from PyObjCTools.TestSupport import *
+
+
+class TestDictProperty (TestCase):
+    def testMissing(self):
+        self.fail("Implement tests")
+
+
+if __name__ == "__main__":
+    main()

pyobjc-core/PyObjCTest/test_set_property.py

+from PyObjCTools.TestSupport import *
+
+
+class TestSetProperty (TestCase):
+    def testMissing(self):
+        self.fail("Implement tests")
+
+
+if __name__ == "__main__":
+    main()

pyobjc-core/Tools/genHeaderTests.py

+#!/usr/bin/python
+
+import os, sys
+
+TMPL="""
+from PyObjCTools.TestSupport import *
+from %(framework)s import *
+
+class Test%(basename)s (TestCase):
+    def testIncomplete(self):
+        self.fail("Add header tests for <%(framework)s/%(basename)s.h>")
+
+if __name__ == "__main__":
+    main()
+"""
+
+def main():
+    framework = sys.argv[1]
+
+    if framework[0] == '/':
+        dirpath = os.path.join(framework, 'Headers')
+        framework = os.path.basename(framework)[:-10]
+
+    else:
+        dirpath = '/System/Library/Frameworks/%s.framework/Headers'%(framework,)
+
+    for fn in os.listdir(dirpath):
+        basename = os.path.splitext(fn)[0]
+        outfn = 'test_%s.py'%(basename.lower())
+
+        if not os.path.exists(outfn):
+            print outfn
+            fd = open(outfn, 'w')
+            fd.write(TMPL % locals() )
+            fd.close()
+
+
+if __name__ == "__main__":
+    main()

pyobjc-core/distribute_setup.py

             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.8"
+DEFAULT_VERSION = "0.6.4"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_PKG_INFO = """\
 Metadata-Version: 1.0

pyobjc-core/setup.py

 # We need at least Python 2.5
 MIN_PYTHON = (2, 5)
 
+# FIXME: autodetect default values for USE_* variables:
+#  both should be false by default, unless
+#  1) python is /usr/bin/python: both should be true
+#  2) python build with --with-system-libffi: USE_SYSTEM_FFI
+#     should be true.
+
 # Set USE_SYSTEM_FFI to True to link to the system version
 # of libffi
 USE_SYSTEM_FFI = False
 Natural Language :: English
 Operating System :: MacOS :: MacOS X
 Programming Language :: Python
+Programming Language :: Python :: 3
 Programming Language :: Objective C
 Topic :: Software Development :: Libraries :: Python Modules
 Topic :: Software Development :: User Interfaces

pyobjc-framework-AddressBook/Lib/AddressBook/PyObjC.bridgesupport

   </function>
   <function name='ABPickerGetFrame'>
     <arg type='^{OpaqueABPicker=}' />
-    <arg type='^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
+    <arg type='^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='^{_NSRect={_NSPoint=dd}{_NSSize=dd}}' type_modifier='o' />
   </function>
   <function name='ABPickerIsVisible'>
     <retval type='Z' />
   </function>
   <function name='ABPickerSetFrame'>
     <arg type='^{OpaqueABPicker=}' />
-    <arg type='^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='n' />
+    <arg type='^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='^{_NSRect={_NSPoint=dd}{_NSSize=dd}}' type_modifier='n' />
   </function>
   <function name='ABPickerSetVisibility'>
     <arg type='^{OpaqueABPicker=}' />

pyobjc-framework-AddressBook/distribute_setup.py

             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.8"
+DEFAULT_VERSION = "0.6.4"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_PKG_INFO = """\
 Metadata-Version: 1.0

pyobjc-framework-AddressBook/setup.py

 
 setup(
     name='pyobjc-framework-AddressBook',
-    version="2.2",
+    version="2.3b1",
     description = "Wrappers for the framework AddressBook on Mac OS X",
     packages = [ "AddressBook" ],
     install_requires = [ 
-        'pyobjc-core>=2.2',
-        'pyobjc-framework-Cocoa>=2.2',
+        'pyobjc-core>=2.3b1',
+        'pyobjc-framework-Cocoa>=2.3b1',
     ],
 )

pyobjc-framework-AppleScriptKit/distribute_setup.py

             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.8"
+DEFAULT_VERSION = "0.6.4"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_PKG_INFO = """\
 Metadata-Version: 1.0

pyobjc-framework-AppleScriptKit/setup.py

 
 setup(
     name='pyobjc-framework-AppleScriptKit',
-    version='2.2',
+    version="2.3b1",
     description = "Wrappers for the framework AppleScriptKit on Mac OS X",
     packages = [ "AppleScriptKit" ],
     install_requires = [ 
-        'pyobjc-core>=2.2',
-        'pyobjc-framework-Cocoa>=2.2',
+        'pyobjc-core>=2.3b1',
+        'pyobjc-framework-Cocoa>=2.3b1',
     ],
 )

pyobjc-framework-AppleScriptObjC/distribute_setup.py

             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.8"
+DEFAULT_VERSION = "0.6.4"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_PKG_INFO = """\
 Metadata-Version: 1.0

pyobjc-framework-AppleScriptObjC/setup.py

 setup(
     min_os_level='10.6',
     name='pyobjc-framework-AppleScriptObjC',
-    version='2.2',
+    version="2.3b1",
     description = "Wrappers for the framework AppleScriptObjC on Mac OS X",
     packages = [ "AppleScriptObjC" ],
     install_requires = [ 
-        'pyobjc-core>=2.2',
-        'pyobjc-framework-Cocoa>=2.2',
+        'pyobjc-core>=2.3b1',
+        'pyobjc-framework-Cocoa>=2.3b1',
     ],
 )

pyobjc-framework-Automator/distribute_setup.py

             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.8"
+DEFAULT_VERSION = "0.6.4"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_PKG_INFO = """\
 Metadata-Version: 1.0

pyobjc-framework-Automator/setup.py

 
 setup(
     name='pyobjc-framework-Automator',
-    version='2.2',
+    version="2.3b1",
     description = "Wrappers for the framework Automator on Mac OS X",
     packages = [ "Automator" ],
     install_requires = [ 
-        'pyobjc-core>=2.2',
-        'pyobjc-framework-Cocoa>=2.2',
+        'pyobjc-core>=2.3b1',
+        'pyobjc-framework-Cocoa>=2.3b1',
     ],
 )

pyobjc-framework-CFNetwork/setup.py

 
 setup(
     name='pyobjc-framework-CFNetwork',
-    version='2.2',
+    version="2.3b1",
     description = "Wrappers for the framework CFNetwork on Mac OS X",
     packages = [ "CFNetwork" ],
     install_requires = [ 
-        'pyobjc-core>=2.2',
-        'pyobjc-framework-Cocoa>=2.2',
+        'pyobjc-core>=2.3b1',
+        'pyobjc-framework-Cocoa>=2.3b1',
     ],
     ext_modules = [
         Extension("CFNetwork._manual",

pyobjc-framework-CalendarStore/distribute_setup.py

             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.8"
+DEFAULT_VERSION = "0.6.4"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_PKG_INFO = """\
 Metadata-Version: 1.0

pyobjc-framework-CalendarStore/setup.py

 setup(
     min_os_level='10.5',
     name='pyobjc-framework-CalendarStore',
-    version='2.2',
+    version="2.3b1",
     description = "Wrappers for the framework CalendarStore on Mac OS X",
     packages = [ "CalendarStore" ],
     install_requires = [ 
-        'pyobjc-core>=2.2',
-        'pyobjc-framework-Cocoa>=2.2',
+        'pyobjc-core>=2.3b1',
+        'pyobjc-framework-Cocoa>=2.3b1',
     ],
 )

pyobjc-framework-Cocoa/Exceptions/AppKit.bridgesupport

       <arg comment='where does this come from?' index='0' type='^v' />
     </method>
     <method comment='needs work' selector='getRectsBeingDrawn:count:'>
-      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{CGRect}' />
+      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{_NSRect}' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='getRectsExposedDuringLiveResize:count:'>
-      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
+      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{_NSRect={_NSPoint=dd}{_NSSize=dd}}' type_modifier='o' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='knowsPageRange:'>
       <arg comment='where does this come from?' index='0' type='^v' />
     </method>
     <method comment='needs work' selector='getRectsBeingDrawn:count:'>
-      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{CGRect}' />
+      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{_NSRect}' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='getRectsExposedDuringLiveResize:count:'>
-      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
+      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{_NSRect={_NSPoint=dd}{_NSSize=dd}}' type_modifier='o' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='knowsPageRange:'>
       <arg comment='where does this come from?' index='0' type='^v' />
     </method>
     <method comment='needs work' selector='getRectsBeingDrawn:count:'>
-      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{CGRect}' />
+      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{_NSRect}' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='getRectsExposedDuringLiveResize:count:'>
-      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
+      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{_NSRect={_NSPoint=dd}{_NSSize=dd}}' type_modifier='o' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='knowsPageRange:'>
       <arg comment='where does this come from?' index='0' type='^v' />
     </method>
     <method comment='needs work' selector='getRectsBeingDrawn:count:'>
-      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{CGRect}' />
+      <arg comment='fixme: c-array-of-count by-reference' index='0' type='r^^{_NSRect}' type64='r^^{_NSRect}' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='getRectsExposedDuringLiveResize:count:'>
-      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
+      <arg comment='not quite true, but cannot describe otherwise' index='0' type='r^{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='r^{_NSRect={_NSPoint=dd}{_NSSize=dd}}' type_modifier='o' />
       <arg index='1' type_modifier='o' />
     </method>
     <method selector='knowsPageRange:'>
       <arg comment='where does this come from?' index='0' type='^v' />
     </method>
     <method comment='needs work' selector='getRectsBeingDrawn:count:'>