On Mar 7, 11:08 am, Bruce Smith <[email protected]> wrote: > On Mon, Mar 7, 2011 at 8:28 AM, Charles Brandt <[email protected]>wrote: > > > On 2/28/11 7:45 PM, Richard Jones wrote: > > >> Python 3 doesn't include the MacOS module which is used by non-cocoa > >> pyglet. Unfortunately the cocoa branch doesn't do Python 3 code > >> translation :-) > > > Is this a good time to merge the cocoa branch back to the 1.2dev trunk? > > A question for the Cocoa branch developers: > > Does the Cocoa branch treat Cocoa as a fourth "platform choice" for pyglet, > in addition to linux, windows, and (macos) carbon? > > If it does, and if running pyglet on a Mac would choose carbon by default > (except in case when carbon can't possibly work), then although I know > essentially nothing about the Cocoa branch, I see no reason it couldn't be > merged at any time. > > If it is, instead, an alternative implementation of the existing "mac" > platform choice, then I don't see how it can ever be merged without changing > that, until it becomes so complete that no one ever needs carbon again.
Certain parts of the Cocoa branch only work on Mac OS X 10.6 and probably require the latest version of PyObjC to be installed on top of that, so it unfortunately cannot replace the Carbon code entirely. Several of the Carbon-based module files were deleted when the Cocoa branch was created. These need to be restored and then, as you say, an option added to select between the Carbon and Cocoa platforms. This shouldn't be too difficult: it can be set automatically by querying sys.maxint, platform.release(), and objc.__version__. I haven't had time to work on the code in a while, but I should be able to get around to it after next week. Other cleanup tasks should probably be done before the merge as well. In particular, I would like to remove the Cocoa code that starts up a separate thread to periodically clean out the NSAutorelease pools. I've been reluctant to get rid of it since I didn't write it and don't know the justification for it's existence, but I don't think that it's necessary and it seems to occasionally generate exceptions. Also, I haven't gotten any feedback on whether or not the branch is working properly for anyone else? --phillip -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
