Bug 39761

Summary: Add (skip) annotation on tp_foo_new()
Product: Telepathy Reporter: Xavier Claessens <xclaesse>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED WONTFIX QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Xavier Claessens 2011-08-02 06:17:45 UTC
C constructors tp_foo_new() should be pure wrapper arround g_object_new() setting properties. They are confusing in other languages like python where you create your objects with factory = TelepathyGLib.SimpleClientFactory(dbus=bus) instead of factory = TelepathyGLib.SimpleClientFactory.new(dbus) for example. That way pygobject will call g_object_new() itself.
Comment 1 Guillaume Desmottes 2011-08-02 07:40:15 UTC
We have to be carreful here, some _new are more than a wrapper around g_object_new. For example some call tp_dbus_check_valid_object_path().

Also, be sure that work with gjs as well before deprecating.
Comment 2 Simon McVittie 2012-04-12 06:00:26 UTC
I'm inclined to WONTFIX this, because I think having a new() with known and documented parameters makes good documentation even for g-i languages: it's not always instantly obvious which properties you need to pass to the constructor to get a valid object.
Comment 3 Guillaume Desmottes 2012-04-12 06:51:39 UTC
I agree.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.