These three stack fragments resulted in separate queries.
I've still not managed to trigger bugsubscription queries in testing, however, fixing this particular case will be useful itself.
File "/home/robertc/launchpad/lp-branches/working/lib/canonical/cachedproperty.py", line 220, in __get__
result = self.fn(inst)
File "/home/robertc/launchpad/lp-branches/working/lib/lp/registry/browser/milestone.py", line 272, in bugtasks
return [self._getListingItem(bugtask) for bugtask in self._bugtasks]
File "/home/robertc/launchpad/lp-branches/working/lib/canonical/cachedproperty.py", line 220, in __get__
result = self.fn(inst)
File "/home/robertc/launchpad/lp-branches/working/lib/lp/registry/browser/milestone.py", line 239, in _bugtasks
[task.bug.id for task in tasks])
File "/home/robertc/launchpad/lp-branches/working/lib/canonical/cachedproperty.py", line 220, in __get__
result = self.fn(inst)
File "/home/robertc/launchpad/lp-branches/working/lib/lp/registry/browser/milestone.py", line 272, in bugtasks
return [self._getListingItem(bugtask) for bugtask in self._bugtasks]
File "/home/robertc/launchpad/lp-branches/working/lib/canonical/cachedproperty.py", line 220, in __get__
result = self.fn(inst)
File "/home/robertc/launchpad/lp-branches/working/lib/lp/registry/browser/milestone.py", line 239, in _bugtasks
[task.bug.id for task in tasks])
File "/home/robertc/launchpad/lp-branches/working/lib/lp/bugs/model/bugtask.py", line 1410, in getBugTasks
for bug, task in result:
File "/home/robertc/launchpad/lp-branches/working/lib/canonical/cachedproperty.py", line 220, in __get__
result = self.fn(inst)
File "/home/robertc/launchpad/lp-branches/working/lib/lp/registry/browser/milestone.py", line 272, in bugtasks
return [self._getListingItem(bugtask) for bugtask in self._bugtasks]
File "/home/robertc/launchpad/lp-branches/working/lib/canonical/cachedproperty.py", line 220, in __get__
result = self.fn(inst)
File "/home/robertc/launchpad/lp-branches/working/lib/lp/registry/browser/milestone.py", line 241, in _bugtasks
for task in tasks:
specifics on the repeated lookups:
These three stack fragments resulted in separate queries.
I've still not managed to trigger bugsubscription queries in testing, however, fixing this particular case will be useful itself.
File "/home/ robertc/ launchpad/ lp-branches/ working/ lib/canonical/ cachedproperty. py", line 220, in __get__ robertc/ launchpad/ lp-branches/ working/ lib/lp/ registry/ browser/ milestone. py", line 272, in bugtasks getListingItem( bugtask) for bugtask in self._bugtasks] robertc/ launchpad/ lp-branches/ working/ lib/canonical/ cachedproperty. py", line 220, in __get__ robertc/ launchpad/ lp-branches/ working/ lib/lp/ registry/ browser/ milestone. py", line 239, in _bugtasks
result = self.fn(inst)
File "/home/
return [self._
File "/home/
result = self.fn(inst)
File "/home/
[task.bug.id for task in tasks])
File "/home/ robertc/ launchpad/ lp-branches/ working/ lib/canonical/ cachedproperty. py", line 220, in __get__ robertc/ launchpad/ lp-branches/ working/ lib/lp/ registry/ browser/ milestone. py", line 272, in bugtasks getListingItem( bugtask) for bugtask in self._bugtasks] robertc/ launchpad/ lp-branches/ working/ lib/canonical/ cachedproperty. py", line 220, in __get__ robertc/ launchpad/ lp-branches/ working/ lib/lp/ registry/ browser/ milestone. py", line 239, in _bugtasks robertc/ launchpad/ lp-branches/ working/ lib/lp/ bugs/model/ bugtask. py", line 1410, in getBugTasks
result = self.fn(inst)
File "/home/
return [self._
File "/home/
result = self.fn(inst)
File "/home/
[task.bug.id for task in tasks])
File "/home/
for bug, task in result:
File "/home/ robertc/ launchpad/ lp-branches/ working/ lib/canonical/ cachedproperty. py", line 220, in __get__ robertc/ launchpad/ lp-branches/ working/ lib/lp/ registry/ browser/ milestone. py", line 272, in bugtasks getListingItem( bugtask) for bugtask in self._bugtasks] robertc/ launchpad/ lp-branches/ working/ lib/canonical/ cachedproperty. py", line 220, in __get__ robertc/ launchpad/ lp-branches/ working/ lib/lp/ registry/ browser/ milestone. py", line 241, in _bugtasks
result = self.fn(inst)
File "/home/
return [self._
File "/home/
result = self.fn(inst)
File "/home/
for task in tasks: