no easy way to call destructor

Bug #534363 reported by Jelmer Vernooij
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
High
Unassigned
lazr.restfulclient
Fix Released
High
Unassigned

Bug Description

Destructors that are available over the API ("DELETE /path/to/item") can not be called easily from launchpadlib yet.

Gary Poster (gary)
Changed in launchpadlib:
status: New → Triaged
importance: Undecided → Low
tags: added: usability
Revision history for this message
Brad Crittenden (bac) wrote :

I think "no easy way" is misleading. It looks like there is no possible way, using launchpadlib, to call destructors exported with @export_destructor_operation.

Some methods currently use that decorator and are non-functional and untested:

IBranch destroySelfBreakReferences()
ICodeReviewVoteReferenceEdit delete()
IHWDeviceClass delete()

Gary Poster (gary)
Changed in launchpadlib:
importance: Low → High
Changed in launchpad-foundations:
importance: Undecided → High
milestone: none → 10.05
status: New → Triaged
Revision history for this message
Tim Penhey (thumper) wrote :

I was under the impression that __del__ for the entry did this. I may well be mistaken.

This isn't really a task on launchpad-code at all.

Changed in launchpad-code:
status: New → Invalid
Revision history for this message
Brad Crittenden (bac) wrote :

The bug was linked to launchpad-code because I had not seen the linked question and it appeared there was no way to test destructors, such as destroySelfBreakReferences. Sorry for the oversight, Tim.

Revision history for this message
Leonard Richardson (leonardr) wrote :

Implementing this as __del__ for the entry would be a great idea, but right now bac is correct, there is _no way_ to do this. I'm working on this; it shouldn't take too long.

Revision history for this message
Leonard Richardson (leonardr) wrote :

lazr.restfulclient 0.9.16 makes it easy to invoke a destructor with lp_delete().

affects: launchpadlib → lazr.restfulclient
Graham Binns (gmb)
Changed in launchpad-foundations:
status: Triaged → Fix Released
Gary Poster (gary)
Changed in lazr.restfulclient:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.