mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-19 22:31:07 +00:00
archive.py: support python 3.6
this is needed for the backports to bionic Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
parent
c7058559c5
commit
3a903ca628
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -1,3 +1,12 @@
|
||||
ubuntu-dev-tools (0.188) UNRELEASED; urgency=medium
|
||||
|
||||
[ Mattia Rizzolo ]
|
||||
* archive.py:
|
||||
+ Support Python 3.6 by calling functools.lru_cache() as a function, and
|
||||
avoid using @functools.cached_property (both new in Python 3.8).
|
||||
|
||||
-- Mattia Rizzolo <mattia@debian.org> Thu, 09 Dec 2021 17:54:27 +0100
|
||||
|
||||
ubuntu-dev-tools (0.187) unstable; urgency=medium
|
||||
|
||||
[ Paride Legovini ]
|
||||
|
@ -649,14 +649,15 @@ class PersonalPackageArchiveSourcePackage(UbuntuSourcePackage):
|
||||
self._ppaname = ppa[1]
|
||||
self.masters = []
|
||||
|
||||
@functools.cached_property
|
||||
@property
|
||||
@functools.lru_cache(maxsize=None)
|
||||
def team(self):
|
||||
try:
|
||||
return PersonTeam.fetch(self._teamname)
|
||||
except KeyError:
|
||||
raise ValueError(f"No user/team '{self._teamname}' found on Launchpad")
|
||||
|
||||
@functools.lru_cache
|
||||
@functools.lru_cache()
|
||||
def getArchive(self):
|
||||
ppa = self.team.getPPAByName(self._ppaname)
|
||||
Logger.debug(f"Using PPA '{ppa.web_link}'")
|
||||
@ -727,7 +728,7 @@ class UbuntuCloudArchiveSourcePackage(PersonalPackageArchiveSourcePackage):
|
||||
return super(UbuntuCloudArchiveSourcePackage, self).pull_binaries(arch, name, ext)
|
||||
|
||||
@classmethod
|
||||
@functools.lru_cache
|
||||
@functools.lru_cache()
|
||||
def getUbuntuCloudArchiveProject(cls):
|
||||
return Project(cls.PROJECT)
|
||||
|
||||
@ -754,12 +755,12 @@ class UbuntuCloudArchiveSourcePackage(PersonalPackageArchiveSourcePackage):
|
||||
return cls.getUbuntuCloudArchiveReleaseNames()[0]
|
||||
|
||||
@classmethod
|
||||
@functools.lru_cache
|
||||
@functools.lru_cache()
|
||||
def getUbuntuCloudArchiveTeam(cls):
|
||||
return PersonTeam.fetch(cls.TEAM)
|
||||
|
||||
@classmethod
|
||||
@functools.lru_cache
|
||||
@functools.lru_cache()
|
||||
def getUbuntuCloudArchivePPAs(cls, release=None, pocket=None):
|
||||
""" Get sorted list of UCA ppa Archive objects
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user