@protocol and method signatures

Issue #160 new
Ronald Oussoren
repo owner created an issue

PyObjC currently automatically uses the right Objective-C signature when a method name is the same as a selector in a protocol, even when the Python class does not conform to that protocol.

This is getting problematic due to wider use of protocols in OSX, where some of the protocols use fairly generic names.

For a future version: - In release X: warn about this and tell users to add protocol conformance to their code - In release X+1: use warnings machinery to make this warning and error (giving users a way to turn this off for a while) - In release X+2: no longer set method signatures for protocols unless the class explicitly conforms to the protocol (either itself or through a superclass)

Problem with the last step: this will give silent failures for users skipping versions.

Note that this will require changes to metadata as well as core code.

Comments (0)

  1. Log in to comment