forked from pool/python-aenum
- update to 3.1.5:
* fix support of `auto()` kwds * rename `aenum.property` to `aenum.enum_property` * fix `extend_enum()` for unhashable values * fix `extend_enum()` for most cases OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aenum?expand=0&rev=16
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:87f0e9ef4f828578ab06af30e4d7944043bf4ecd3f4b7bd1cbe37e2173cde94a
|
||||
size 121115
|
||||
3
aenum-3.1.5.tar.gz
Normal file
3
aenum-3.1.5.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ebad8590b6a0183c0d9893523b458edce987ae4533339c5ac185cfac32daf1a
|
||||
size 126566
|
||||
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 10 14:57:17 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 3.1.5:
|
||||
* fix support of `auto()` kwds
|
||||
* rename `aenum.property` to `aenum.enum_property`
|
||||
* fix `extend_enum()` for unhashable values
|
||||
* fix `extend_enum()` for most cases
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 28 20:45:16 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-aenum
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-aenum
|
||||
Version: 3.1.0
|
||||
Version: 3.1.5
|
||||
Release: 0
|
||||
Summary: Advanced Enumerations, NamedTuples, and NamedConstants
|
||||
License: BSD-3-Clause
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
aenum/test.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/aenum/test.py
|
||||
+++ b/aenum/test.py
|
||||
@@ -6218,6 +6218,7 @@ CONVERT_TEST_EIO = 7
|
||||
Index: aenum-3.1.5/aenum/test.py
|
||||
===================================================================
|
||||
--- aenum-3.1.5.orig/aenum/test.py
|
||||
+++ aenum-3.1.5/aenum/test.py
|
||||
@@ -6569,6 +6569,7 @@ CONVERT_TEST_EIO = 7
|
||||
CONVERT_TEST_EBUS = 7 # and this one
|
||||
|
||||
class TestIntEnumConvert(TestCase):
|
||||
@@ -12,7 +14,7 @@
|
||||
def test_convert_value_lookup_priority(self):
|
||||
test_type = IntEnum._convert_(
|
||||
'UnittestConvert',
|
||||
@@ -6238,6 +6239,7 @@ class TestIntEnumConvert(TestCase):
|
||||
@@ -6589,6 +6590,7 @@ class TestIntEnumConvert(TestCase):
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
aenum/test.py | 32 ++++++++++++++++----------------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/aenum/test.py
|
||||
+++ b/aenum/test.py
|
||||
@@ -48,13 +48,18 @@ def load_tests(loader, tests, ignore):
|
||||
Index: aenum-3.1.5/aenum/test.py
|
||||
===================================================================
|
||||
--- aenum-3.1.5.orig/aenum/test.py
|
||||
+++ aenum-3.1.5/aenum/test.py
|
||||
@@ -49,13 +49,18 @@ def load_tests(loader, tests, ignore):
|
||||
return tests
|
||||
|
||||
class TestCase(unittest.TestCase):
|
||||
@@ -17,14 +19,14 @@
|
||||
|
||||
+ def setUp(self):
|
||||
+ self.tempdir = tempfile.mkdtemp()
|
||||
+ if pyver >= 3.0:
|
||||
+ if pyver >= (3, ):
|
||||
+ test_v3.tempdir = self.tempdir
|
||||
+ # self.addCleanup(shutil.rmtree, self.tempdir, True)
|
||||
+
|
||||
|
||||
# for pickle tests
|
||||
try:
|
||||
@@ -903,6 +908,8 @@ class TestEnum(TestCase):
|
||||
@@ -943,6 +948,8 @@ class TestEnum(TestCase):
|
||||
IDES_OF_MARCH = 2013, 3, 15
|
||||
self.Holiday = Holiday
|
||||
|
||||
@@ -33,7 +35,7 @@
|
||||
def test_set_name(self):
|
||||
class Descriptor(object):
|
||||
name = None
|
||||
@@ -2011,7 +2018,7 @@ class TestEnum(TestCase):
|
||||
@@ -2051,7 +2058,7 @@ class TestEnum(TestCase):
|
||||
# for use with both Python 2/3
|
||||
JSONEnum = JSONEnumMeta('JsonEnum', (Enum, ), {})
|
||||
|
||||
@@ -42,7 +44,7 @@
|
||||
with open(test_file, 'w') as f:
|
||||
f.write(
|
||||
'[{"name":"Afghanistan","alpha-2":"AF","country-code":"004","notes":{"description":"pretty"}},'
|
||||
@@ -4122,6 +4129,8 @@ class TestFlag(TestCase):
|
||||
@@ -4002,6 +4009,8 @@ class TestFlag(TestCase):
|
||||
CE = 1<<19
|
||||
self.Open = Open
|
||||
|
||||
@@ -51,7 +53,7 @@
|
||||
def test_set_name(self):
|
||||
class Descriptor(object):
|
||||
name = None
|
||||
@@ -4384,7 +4393,7 @@ class TestFlag(TestCase):
|
||||
@@ -4264,7 +4273,7 @@ class TestFlag(TestCase):
|
||||
self.assertEqual(AS.STREET._value_, 32)
|
||||
self.assertEqual(AS.SECONDARY_TYPE._value_, 128)
|
||||
self.assertEqual((AS.NAME | AS.STREET)._value_, 48, "%r is not 48" % (AS.NAME | AS.STREET))
|
||||
@@ -60,7 +62,7 @@
|
||||
def test_iteration(self):
|
||||
C = self.Color
|
||||
self.assertEqual(list(C), [C.RED, C.GREEN, C.BLUE])
|
||||
@@ -5093,6 +5102,8 @@ class TestIntFlag(TestCase):
|
||||
@@ -4957,6 +4966,8 @@ class TestIntFlag(TestCase):
|
||||
self.Color = Color
|
||||
self.Open = Open
|
||||
|
||||
@@ -69,7 +71,7 @@
|
||||
def test_set_name(self):
|
||||
class Descriptor(object):
|
||||
name = None
|
||||
@@ -6315,10 +6326,10 @@ class TestStackoverflowAnswers(TestCase)
|
||||
@@ -6127,10 +6138,10 @@ class TestStackoverflowAnswers(TestCase)
|
||||
fh.write('#define %s %r\n' % (enum.name, enum.value))
|
||||
class Arduino(CHeader):
|
||||
_order_ = 'ONE TWO'
|
||||
@@ -82,18 +84,22 @@
|
||||
data = fh.read()
|
||||
self.assertEqual(textwrap.dedent("""\
|
||||
initial header stuff here
|
||||
@@ -6347,14 +6358,3 @@ class TestStackoverflowAnswers(TestCase)
|
||||
SIX = "SIX"
|
||||
#
|
||||
self.assertTrue(LabelEnum.has_name('Enum_Three'))
|
||||
@@ -6595,18 +6606,3 @@ class TestIntEnumConvert(TestCase):
|
||||
if name[0:2] not in ('CO', '__')],
|
||||
[], msg='Names other than CONVERT_TEST_* found.')
|
||||
|
||||
-
|
||||
-
|
||||
-if __name__ == '__main__':
|
||||
- tempdir = tempfile.mkdtemp()
|
||||
- try:
|
||||
- if pyver >= 3.0:
|
||||
- if PY3:
|
||||
- test_v3.tempdir = tempdir
|
||||
- unittest.main()
|
||||
- test = unittest.main(exit=False)
|
||||
- sys.stdout.flush()
|
||||
- for name, reason in test.result.skipped:
|
||||
- print("%s: %s" % (name, reason))
|
||||
- finally:
|
||||
- shutil.rmtree(tempdir, True)
|
||||
- sys.exit(len(test.result.errors or test.result.failures) and 1 or 0)
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user