Date: Fri, 25 Mar 2022 13:49:46 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: ec801b0f3107 - main - deskutils/py-pystash: Fix build with setuptools 58.0.0+ Message-ID: <202203251349.22PDnkwQ027791@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=ec801b0f310772ffcc00434d23a9f1147aa86e4d commit ec801b0f310772ffcc00434d23a9f1147aa86e4d Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-03-25 13:32:08 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-03-25 13:38:06 +0000 deskutils/py-pystash: Fix build with setuptools 58.0.0+ With hat: python --- deskutils/py-pystash/files/patch-2to3 | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/deskutils/py-pystash/files/patch-2to3 b/deskutils/py-pystash/files/patch-2to3 new file mode 100644 index 000000000000..5accd5cd1def --- /dev/null +++ b/deskutils/py-pystash/files/patch-2to3 @@ -0,0 +1,50 @@ +--- pystash/common.py.orig 2014-05-17 19:30:11 UTC ++++ pystash/common.py +@@ -79,12 +79,11 @@ class StashedItem(): + return '\n'.join(items) + + +-class AbstractStorage(object): ++class AbstractStorage(object, metaclass=abc.ABCMeta): + # todo: update methods signature + """ + Here will be a docstring + """ +- __metaclass__ = abc.ABCMeta + + @abc.abstractmethod + def get_connection(self, db): +@@ -140,7 +139,7 @@ class ShelveStorage(AbstractStorage): + self.DBFILE = db_file if db_file is not None else self.DBFILE + path_to_dir = os.path.join('/', *self.DBFILE.split('/')[1:-1]) + if not os.path.exists(path_to_dir): +- os.makedirs(path_to_dir, 0755) ++ os.makedirs(path_to_dir, 0o755) + self.connection = self.get_connection(self.DBFILE) + if not 'storage' in self.connection: + self.connection['storage'] = {} +@@ -224,13 +223,13 @@ class ShelveStorage(AbstractStorage): + + def get_all(self): + result = {} +- for k, v in self.db.iteritems(): ++ for k, v in self.db.items(): + result[k] = StashedItem(v) + return result + + def tags(self, tag): + result = {} +- for k, v in self.db.iteritems(): ++ for k, v in self.db.items(): + if 'tags' in v: + if tag in v['tags']: + result[k] = StashedItem(v) +@@ -238,7 +237,7 @@ class ShelveStorage(AbstractStorage): + + def alltags(self): + result = [] +- for k, v in self.db.iteritems(): ++ for k, v in self.db.items(): + if 'tags' in v: + for tag in v['tags']: + result.append(tag)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203251349.22PDnkwQ027791>