This commit is contained in:
Mario Fetka
2022-07-12 15:04:49 +02:00
parent fdb09f2a58
commit b7fef62ebd
43 changed files with 1060 additions and 207 deletions

View File

@@ -0,0 +1,3 @@
AUX 0001-Import-abstract-base-classes-from-collections.abc.patch 1429 BLAKE2B 2f08c58ac13e5d921639bf1db40fb83987356edcd84c2455cf872f752357e531d217f5215a132f53c8afbf9b0793205f4295ef2ff4bdb2d7673c0ad7809bd61c SHA512 f9ab50f63a6ac75509311c5f142ee075a0a54ff8fb0045973c30d545333e877818bae9f8884ce4aa1d6f8bc5212ef3b2baf04c115308a2f6508c2ac182eadc0a
DIST twodict-1.2.tar.gz 7016 BLAKE2B dd396dd1a712474b6d07614190d69aee2cf47c46829d9bb9dec3e56e067a4f8289cd94aa9d2a7d9144a7b472fd13e4b1be8d229e3aff036bf65175be2b155027 SHA512 82fc49568d95fb742bb014789937e2c4fc54a1f680fd9743643bbfe50f580a62dc20e363974a3359586e6a47b72015e059f435f3b6470adcb567249a50cac434
EBUILD twodict-1.2.ebuild 556 BLAKE2B ebdd476f2fb6e67756bae0037aa63613259f0400bc2ecc2b47d5f062d3842a018f21d579241cbf354838eab0b1a3a843e66dd7ae5be83e76f852f92a88cffd5f SHA512 4badddf55251ac2fe11fd08888f4038edc38f320e268da1aa8177a42b1b432861bfd2b46a653ee2131580ca8814a2a2a02d4b66bcb00fef5abd151da0b28d6fa

View File

@@ -0,0 +1,48 @@
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Sun, 20 Feb 2022 20:12:28 +0100
Subject: Import abstract base classes from collections.abc
---
twodict.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/twodict.py b/twodict.py
index 824e539..efbd342 100644
--- a/twodict.py
+++ b/twodict.py
@@ -6,7 +6,7 @@ Attributes:
"""
import sys
-import collections
+import collections.abc
__all__ = ["TwoWayOrderedDict"]
@@ -22,7 +22,7 @@ _DEFAULT_OBJECT = object()
########## Custom views to mimic Python3 view objects ##########
# See: https://docs.python.org/3/library/stdtypes.html#dict-views
-class DictKeysView(collections.KeysView):
+class DictKeysView(collections.abc.KeysView):
def __init__(self, data):
super(DictKeysView, self).__init__(data)
@@ -35,7 +35,7 @@ class DictKeysView(collections.KeysView):
return key in [key for key in self.__data]
-class DictValuesView(collections.ValuesView):
+class DictValuesView(collections.abc.ValuesView):
def __init__(self, data):
super(DictValuesView, self).__init__(data)
@@ -48,7 +48,7 @@ class DictValuesView(collections.ValuesView):
return value in [self.__data[key] for key in self.__data]
-class DictItemsView(collections.ItemsView):
+class DictItemsView(collections.abc.ItemsView):
def __init__(self, data):
super(DictItemsView, self).__init__(data)

View File

@@ -0,0 +1,23 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7,8,9,10} )
PATCHES=(
"${FILESDIR}/0001-Import-abstract-base-classes-from-collections.abc.patch"
)
inherit distutils-r1
DESCRIPTION="Simple two way ordered dictionary for Python"
HOMEPAGE="https://github.com/MrS0m30n3/twodict"
LICENSE="Unlicense"
SRC_URI="https://github.com/MrS0m30n3/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 x86"
SLOT="0"
DEPEND=""
RDEPEND="${PYTHON_DEPS}"