There's no need for a separate _published_archives here, as nothing needs the actual ResultSet. Just inline it.
Additionally, you might want to invalidate this sometimes, though it's not used much so it's not hugely important. But IIRC SPPH creation is well encapsulated in PS.newSourcePublication,
143 + sprs = prefill_ packageupload_ caches( urces, pubs, pucs)
144 + uploads, packageuploadso
Is this not already done by the underlying model method?
444 +def prefill_ packageupload_ caches( uploads, puses, pubs, pucs):
My eyes are burning.
Oh, god, they burn.
Can you add a bit of VWS, perhaps? There are several logical sections which could be separated.
468 + for spr in sprs: cache(spr) .published_ archives = []
469 + get_property_
The other three caches get away without this. Are they initialised elsewhere? Perhaps move them into this function as well.
471 + spr = get_property_ cache(publicati on.sourcepackag erelease)
That's no SPR.
506 + @cachedproperty archives( self): _published_ archives( ))
507 + def published_
508 + return list(self.
There's no need for a separate _published_archives here, as nothing needs the actual ResultSet. Just inline it.
Additionally, you might want to invalidate this sometimes, though it's not used much so it's not hugely important. But IIRC SPPH creation is well encapsulated in PS.newSourcePub lication,