From cdd46a78995d325f799a88110dbc43417b13f259356bca6eb13f3ca65edd3956 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Jan 2022 14:58:01 +0000 Subject: [PATCH] - 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 --- aenum-3.1.0.tar.gz | 3 --- aenum-3.1.5.tar.gz | 3 +++ python-aenum.changes | 9 +++++++++ python-aenum.spec | 4 ++-- skip_failing_testcases.patch | 10 ++++++---- tempdir_missing.patch | 38 +++++++++++++++++++++--------------- 6 files changed, 42 insertions(+), 25 deletions(-) delete mode 100644 aenum-3.1.0.tar.gz create mode 100644 aenum-3.1.5.tar.gz diff --git a/aenum-3.1.0.tar.gz b/aenum-3.1.0.tar.gz deleted file mode 100644 index 959deea..0000000 --- a/aenum-3.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87f0e9ef4f828578ab06af30e4d7944043bf4ecd3f4b7bd1cbe37e2173cde94a -size 121115 diff --git a/aenum-3.1.5.tar.gz b/aenum-3.1.5.tar.gz new file mode 100644 index 0000000..bf46bb8 --- /dev/null +++ b/aenum-3.1.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ebad8590b6a0183c0d9893523b458edce987ae4533339c5ac185cfac32daf1a +size 126566 diff --git a/python-aenum.changes b/python-aenum.changes index f88c779..2c2a805 100644 --- a/python-aenum.changes +++ b/python-aenum.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jan 10 14:57:17 UTC 2022 - Dirk Müller + +- 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 diff --git a/python-aenum.spec b/python-aenum.spec index 28666ce..b96ffcf 100644 --- a/python-aenum.spec +++ b/python-aenum.spec @@ -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 diff --git a/skip_failing_testcases.patch b/skip_failing_testcases.patch index 0eff25d..566dcca 100644 --- a/skip_failing_testcases.patch +++ b/skip_failing_testcases.patch @@ -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): ], ) diff --git a/tempdir_missing.patch b/tempdir_missing.patch index 08971df..cfd6222 100644 --- a/tempdir_missing.patch +++ b/tempdir_missing.patch @@ -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) -