Re: [Pyobjc-dev] Possible bug in PyObjC bridge (SyncService)
Brought to you by:
ronaldoussoren
From: Mani G. <ma...@tu...> - 2010-05-05 15:25:38
|
On Tue, May 4, 2010 at 3:14 PM, Ronald Oussoren <ron...@ma...> wrote: >> >> >> It looks like this is relatively easy to enhance the unittests of _pycoder to test with classic coders, my first result is a collection of failed tests: >> >> ====================================================================== >> ERROR: test_structseq (__main__.TestArchivePlainPython) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/test/pickletester.py", line 583, in test_structseq >> s = self.dumps(t, proto) >> File "test_archive_python.py", line 436, in dumps >> return NSArchiver.archivedDataWithRootObject_(arg) >> ValueError: NSInvalidArgumentException - *** -encodeInt:forKey: only defined for abstract class. Define -[NSArchiver encodeInt:forKey:]! >> >> Fixing the tests is more work, but should be relatively straightforward. >> >> Ronald > > Sadly enough it wasn't possible to implement this without changes to C code. I've committed an initial patch for this in r2465, but that's a partial commit from my workspace and I'm not 100% sure that I added everything to the commit. > > Anyway, the trunk is not compatible enough with 2.2 to just rebuild pyobjc-core, you'd have to rebuild all of PyObjC and I'm not quite ready to do a release. > > Ronald > > Hello Ronald, I will go ahead with your suggested workaround to use NSNull.null() instead of None, and will let you know if it solves the bug for our users. Thanks very much for your hard work! PyObjC is a great project and we really appreciate your supporting it. Regards, Mani |