=========Todolist=========..contents:Introduction------------Thisdocumentcontainsan(incomplete)listofworkitems.TODOfor1.1------------*Syncwithlatestlibffi(optional)*TestonOSX10.2andcreateinstaller*TestonOSX10.1Importantitems---------------Betterdocumentation....................Thereshouldbemoredeveloperdocumentationandend-userdocumentationisvirtuallynon-existant.Relatedtothisisthewebsite:Thisshouldbefilled.Weshouldalsoaddscriptstoconvertdocumentationtoaformatthatisuseableonthewebsite.Alsoneeded:documentlistingthedifferencesbetweenObjective-CCocoaandPythonCocoa:whichfunctions/methodsarenotavailable,listdifferencesinarguments(e.g.NSBeginAlertSheethasavariablenumberofargumentsinObjective-C,theformat-argumentsarenotpresentinPython).Multi-threadingsupport.......................ThankstotheautoGILmoduletheGILisgivenupwhenthemainrunloopsleeps.WecouldgiveuptheGILbeforecallingintoObjective-C,butthatrequiresalotofworkforminimaladvantages.Testsuite..........Thetestsuiteneedstobeenhanced.*TeststhatexerciseKey-ValueObservinginawaythatcrashesolderversionsofPyObjC.*testsforallfunctionsin``Modules/*/*Mapping*.m``(inclusingIMPs)*testsforallnon-generatedfunctionwrappers(andsomeforthegeneratedfunctionsaswell,justincasethegeneratorscriptisbuggy)*testswherePythonimplementationofmethodwithoutputargumentsreturnsthewrongvalue(type,numberofvalues)*Addtestsforacceptinganysequencewhendepythonifyingstructsandarrays.*Addmoretestsforobjc_support.mtounittest.c*AddtestsforOC_PythonArray,OC_PythonDicttounittest.cThefirsttwobulletsrequireatleastsomeGUItests.Lessimportantitems--------------------Refactorsomepartsofthebridge.................................Fromthetopofmyhead:*Restructureselector.m,thisfileistoolongandcomplicated.WecoulddoawaywiththedifferencebetweenmethodimplementedinPythonandObjC.*Likewiseforclass-builder.m,thisfileiswaytolarge.SupportforGNUstep...................ThecurrentCVSversioncontainssomesupportforGNUstep,thisneedstobeenhanced.Namingconvention/codingstyle................................Globalsymbolsshouldbenamedwithaprefix.Wecurrentlyuseseveralprefixesandsomesymbolsdonothaveaprefixatall.Seethedocument`Codingstyle`foraproposalforacodingstyleandnamingconvention.Thecodeshouldbechangedtoconformtothisdocument..._`Codingstyle`:coding-style.txtAddtemplatesforvariousfiletypes....................................AddXcode/PBfiletemplatesforvarioustypesoffiles,atleastforanemptypythonfile.Addtemplatesforvariousproject-types.......................................WecurrentlyhaveaProjectBuildertemplateforabasicPyObjCapplication.Weshouldsimulartemplatesforotherusefullprojectsandmostimportantlyadocument-basedapplication.Otherpossibiliesinclude:*StandaloneService*IBPalette*PreferencePane*ScreenSaver*CocoaBundleIncontrasttoatemplateforadocument-basedapplicationtheselastfourrequireadditional(Objective-C)code:Thereneedstobeamechanismtoinitializeapythoninterpreterandloadthepythoncodeintheprojectwhentheplugin/bundleisloaded.Furthermoreweneedtomakesurethatexactlyoneinterpreteriscreated,evenwhenmorethanonePythonbasedplugin/bundleisloaded.NOTE:Allthesearesupportedfor'pure python'projects,wejusthavetofindawaytomakeiteasiertomaintainPBtemplates.Thecurrentlyistoomuchmanuallaborinvolvedinupdatingthem.CompleteCocoawrapping.......................Wedonotyethavea100%coverageoftheCocoaAPI's. We also need code inthe testsuite that checks if the function wrappers are working as expected.Someone needs to check if we correctly export all constants from Cocoa and ifthe generation script finds all global functions. Simularly for the annotationsfor input/output arguments.We also don'tsupportall"difficult"methodsyet,implementingtheseisnottoohardbutitisalotofwork.NSDecimal(theC-type)isnotyetsupported.WealsoneedmoresupportcodeforNSDecimalNumber.Picklesupport..............Objective-Cobjectsdon't support pickling. They do pickle without errors usingprotocol version 2 (Python >= 2.3a2), but that doesn'tincludethestateoftheObjective-Cobjectonlythatoftheproxy.Thisispost-1.0work,ingeneralthisisahardproblembecauseitmayinvolveobjectcyclesthatcrossthePython-ObjCboundary.NOTE:1.0b1+containsapatchthatdisablespicklingevenforpickleprotocol2,that's more usefull than writing incomplete objects to the pickle.NSCoder support...............It might be usefull to add default implementations of ``encodeWithCoder:`` and``initWithCoder:`` methods to Python subclasses of Objective-C classes that implement these.See also `Pickle support`.Known issues............It is impossible to support methods with a variable number of arguments in thegeneric code (you have to reimplement allmost all of the logic of these methods in order to know how many and which types of arguments are expected).Luckily there are not many varargs methods and most (if no all) of them canbe easily avoided.XXX: The paragraph above should be moved to the documentation, it is not a todo item.All existing varargs methods should be located and documented. Where possiblewe should provide custom wrappers, otherwise we should document alternatives.We should further investigate why the call to ``PyType_Ready(&PyTuple_Type)``in module.m is necessary. See `bug #77730`__... _: http://sourceforge.net/tracker/index.php?func=detail&aid=777308&group_id=14534&atid=114534Code cleanup............* Check all error/exception messages* Check/cleanup error handling* Finish in-code documentation for the C codeCleanup Examples................The CurrentConvertor example should be removed, this should be the same as thefinal step of the tutorial. It isn'tatthemomentbecauseadditionalcruftintheexample.*addressbook.pyCleanup,maybetransformthisintoausefullutility(import/exportfrom/toCSVspringstomind).*autoreadme.pyAdddocumentation*dictionary.pyShouldbeaunittest,andshouldbeaddedtothe(non-existing)manual*pydict-to-objcdict.pyMovetounittests*subclassing-objective-c.pyMovetodocumentation(unittest?)*super-call.pyMovetodocumentation(unittest?)Addexamplesthatdemonstrate:-howtousealotofCocoafeatures-howtointegratewithMacPythonAccesstomethodimplementations................................Addawrapperfor'instanceMethodForSelector:'and'methodForSelector:',theseshouldreturnselectorobjectsthatcallaspecificCfunction.ThiswouldmakeitpossibletouseclassAddMethodstoreplaceexistingmethodswhilestillcallingthepreviousimplementation.Thesamemechanismcouldbeusedtowrap"simple"globalfunctions.OTOHthecurrentmechanismworksgoodenoughatthemoment.Performancetuning/testing..........................Designandimplementasetofperformancetestsforthebridge.Usethistoinvestigateandfixanypossibleperformanceproblems.Addfreelists.............PyObjCSelectorobjectsandPyObjCObjectobjectsarecreatedonaregularbasis,weshouldcheckifusingfreelistswouldspeedthisup.Seealso`Performancetuning/testing`.Key-ValueEncoding..................XXX:Needtocheckifthecurrentimplementationiscorrect.ThetakeValue:forKey:implementationcorrectlyemitsnotifications(onMacOSX10.3).MacOSX10.3iscurrentlydetectedatcompile-time,thisshouldprobablybedonedynamicly.Therightnotificationsarenotyetemittedfor:*setattr()onObjective-CobjectsThereispreliminary(sp?)supportinobjc-object.m,butI'm not sure if this we really should do this at all. * setattr() on pure Python objects It is impossible to detect such changes, even finding the right ObjC wrapper is not possible at the moment (but that is fixable). The documentation should mention that observations don'tworkforpurePythonobjects.FormalProtocols,DistributedObjects.....................................``DO``seemstouseformalprotocols,wedon't support those at all. Links to Apple documentation............................Links to Apple documentation are not stable, can we add a layer of indirectionhere, e.g. link to the PyObjC website that will redirect to the rightlocation?But: we should also provide links to locally installed documetation, especiallyin the documentation that will be installed on the users machine.Installer support for OSX 10.3..............................XXX: I have an osxpkg module, but that is completely untested.There should be at least two installers: one for Jaguar and one for Panther,they should share as much source-code as possible.Related to this: it would probably be usefull to rewrite buildpkg.py, thismodule has been hacked up to support new-style packages. It should be rewrittenbased on the Apple documentation on the layout of packages, there is no needto support 10.1-style packages. This new module should be donated toMacPython).Implement more of NSMutableDictionary in OC_PythonDictionary.............................................................The implementation of OC_PythonDictionary is very minimal, we should addadditional methods in the NSMutableDictionary interface if those can be implemented efficiently. The default implementation will take care of themethods we cannot implement efficiently.And the same is true of OC_PythonArrayFinish support for methodForSelector:-------------------------------------* All call_ functions in Foundation and AppKit should support calling IMP-wrappers.* You should be able to use an IMP as the implementation of a method in a different class.* More unittestsMake it possible to redefine classes....................................For IDE'sitwouldbeprettyusefulltobeabletoredefineclasses.ItshouldnotbepossibletoredefinepureObjCclasses,andtheredefinedclassshouldbeinthesamemodule(determinedbyname).Bothareneededtoavoidaccidentalerrors(e.g.twomodulesdefininingaclasswiththesamename,whichisperfectlyvalidinplainPython).Rewritepackagingscripts.........................Thescriptsweusefordoingreleasesshouldbecleanedup,genericfunctionalityshouldbemadeavailableforothers.