diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-python/cbor | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-python/cbor')
-rw-r--r-- | dev-python/cbor/Manifest | 7 | ||||
-rw-r--r-- | dev-python/cbor/cbor-1.0.0-r1.ebuild | 40 | ||||
-rw-r--r-- | dev-python/cbor/cbor-1.0.0.ebuild | 22 | ||||
-rw-r--r-- | dev-python/cbor/files/cbor-1.0.0.Fix-broken-test_sortkeys.patch | 43 | ||||
-rw-r--r-- | dev-python/cbor/files/cbor-1.0.0.Replace-deprecated-logger.warn.patch | 98 | ||||
-rw-r--r-- | dev-python/cbor/files/cbor-1.0.0.zero-length-bytes.patch | 10 | ||||
-rw-r--r-- | dev-python/cbor/metadata.xml | 2 |
7 files changed, 197 insertions, 25 deletions
diff --git a/dev-python/cbor/Manifest b/dev-python/cbor/Manifest index fc8a52a862c6..02cc8acd9315 100644 --- a/dev-python/cbor/Manifest +++ b/dev-python/cbor/Manifest @@ -1,3 +1,6 @@ +AUX cbor-1.0.0.Fix-broken-test_sortkeys.patch 1621 BLAKE2B 37336807f72b9bef9be366d875efee4fc3b79ce233e8bd8268c39421e123f41f09601c7a41ad3e2f3b04904dc0927ace8e7ef6321d25f7de320cea9ab0af9485 SHA512 d2eb200eafec051ad9eeaba63210732a226d45e06e98c0d90f605e0171ae185f592772a6fa2bd1572d1cfca0ebeade2415a2d516a80c161ebeb0cc3376067770 +AUX cbor-1.0.0.Replace-deprecated-logger.warn.patch 4012 BLAKE2B 443f5a7bf3b30b8b3b313321c01cf48ffb09326f38f524c45dc2cf33de497097d8276f7f4add58b981fac6a6322c8ae5e0919ba854912af3babe4906bb4a4be9 SHA512 02b8bae3c269808884d9c6f23e3ff429f6e11b6ed3d41da0f2e2c3f69569af434aacd9e6c9115c65869b499c32d7cddc20de5a721d89ea7e7ed9c669348ed276 +AUX cbor-1.0.0.zero-length-bytes.patch 361 BLAKE2B 5422309b2a1f40e6553107380548396cceaf142f09eaa776d415690e71bbd5c7d6899a2c38e43ee479a539995e4c1a3816467d19a9ecfdf084915a6047f20e4e SHA512 cc1d11a5e8169271d3a35a41f850e62de8ebab0d3e2e23e480c3aef08c2a77a4670173523564c8c3abb3f021565acc088ecc3a0e4957c0ccf4a7e0a41c7aeddf DIST cbor-1.0.0.gh.tar.gz 25541 BLAKE2B dc5491235fee79ad15a8b92aafef2a690a407dfb98792e88b2e87fa7c354277b997ac314dc38279168f50c52f922de4bfe330b860126d4c5b836c019b05a1aee SHA512 88471b1c9c9a4128a4098194e17a4322ea2a01624ae1ffa9c33e433da31a089c45f4b64472d36620797488a451c16771c213b2b9a9ab711232c6658da4cd310f -EBUILD cbor-1.0.0.ebuild 623 BLAKE2B c4461506737dc8bca34998962c58ef8902ef0f6178ab881ee43eace4efca306cc0ede4232733087194d8ec86b054d5fb37686384697c3f17bad6d8d556ff86a3 SHA512 eb757d70f4a00e7da34aaa76564b816fc35625416e31cd1d311c4d47fb40c8fd7e7a5b0fe403767a902b8a22c4b0bef7244ad80e6de35e2e4ab44fdd1fe1e47d -MISC metadata.xml 1001 BLAKE2B cc7da4ab732b2479a1ecd5ddd12ab8797ea7068a0623f54a89d9370bb85102f4d5d9007f6ed2228c16fd22a40e2705cf86b8ff4a799b2a0c32b44b6bd9e3dddf SHA512 bf458f02aa9b50016d4ab24c92c8722a50ffa86543d911dfe2fce7df726b3be480bf84b6193462666e7c03d5d37836f879d330520bab7f733ab44cb6f6efb666 +EBUILD cbor-1.0.0-r1.ebuild 1444 BLAKE2B dc3e777968a65352072ac789d1e5b067fb7b6be532c58ae461dbc587959b002403498ca40fcad5ef0a6310cc9b44eb3b55775ad508aac05653e31088a42f5ec5 SHA512 58312bf09df9f6c5984970a9971f882b610dab8e40abb51bca36d8b09ab84522b3e105586688e22b415eee2901ca5c0e1d06c1d0240e22cf3cb6a010126e837d +MISC metadata.xml 999 BLAKE2B 46bdaf98ffe5045cb76897112d80887e3b96f6f87b864cc4af8217b918351e37e87a06d36f2a8028a69f75198904228b275243bf6947947218ddcac67e4d5626 SHA512 c79ba66b6fdbfc112de321697eaacaa6c2f5ca40cdbeca4c5d606e3b0c76371bb64d0e62270a3c1315ff058f5f66b5515a214f8e1e4214b1213790262f24efb1 diff --git a/dev-python/cbor/cbor-1.0.0-r1.ebuild b/dev-python/cbor/cbor-1.0.0-r1.ebuild new file mode 100644 index 000000000000..28ec5ba34fcd --- /dev/null +++ b/dev-python/cbor/cbor-1.0.0-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 + +EGIT_COMMIT="b3af679e7cf3e12d50acb83c3c591fc5db9a658d" +DESCRIPTION="RFC 7049 - Concise Binary Object Representation" +HOMEPAGE="https://github.com/brianolson/cbor_py + https://pypi.org/project/cbor/" +SRC_URI=" + https://github.com/brianolson/cbor_py/archive/${EGIT_COMMIT}.tar.gz + -> ${P}.gh.tar.gz" +S=${WORKDIR}/cbor_py-${EGIT_COMMIT} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 arm arm64 x86 ~amd64-linux ~x86-linux" + +# upstream PR: https://github.com/brianolson/cbor_py/pull/19 +# upstream PR: https://github.com/brianolson/cbor_py/pull/11 +PATCHES=( + "${FILESDIR}/cbor-1.0.0.zero-length-bytes.patch" + "${FILESDIR}/cbor-1.0.0.Fix-broken-test_sortkeys.patch" + "${FILESDIR}/cbor-1.0.0.Replace-deprecated-logger.warn.patch" +) + +python_test() { + distutils_install_for_testing + PYTHONPATH="${BUILD_DIR}/lib" \ + "${PYTHON:-python}" cbor/tests/test_cbor.py || die "Testsuite failed under ${EPYTHON}" + PYTHONPATH="${BUILD_DIR}/lib" \ + "${PYTHON:-python}" cbor/tests/test_objects.py || die "Testsuite failed under ${EPYTHON}" + PYTHONPATH="${BUILD_DIR}/lib" \ + "${PYTHON:-python}" cbor/tests/test_usage.py || die "Testsuite failed under ${EPYTHON}" + PYTHONPATH="${BUILD_DIR}/lib" \ + "${PYTHON:-python}" cbor/tests/test_vectors.py || die "Testsuite failed under ${EPYTHON}" +} diff --git a/dev-python/cbor/cbor-1.0.0.ebuild b/dev-python/cbor/cbor-1.0.0.ebuild deleted file mode 100644 index 11a29f2d6cf2..000000000000 --- a/dev-python/cbor/cbor-1.0.0.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) - -inherit distutils-r1 - -EGIT_COMMIT="b3af679e7cf3e12d50acb83c3c591fc5db9a658d" -DESCRIPTION="RFC 7049 - Concise Binary Object Representation" -HOMEPAGE="https://github.com/brianolson/cbor_py - https://pypi.org/project/cbor/" -SRC_URI=" - https://github.com/brianolson/cbor_py/archive/${EGIT_COMMIT}.tar.gz - -> ${P}.gh.tar.gz" -S=${WORKDIR}/cbor_py-${EGIT_COMMIT} - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 arm ~arm64 x86 ~amd64-linux ~x86-linux" - -distutils_enable_tests unittest diff --git a/dev-python/cbor/files/cbor-1.0.0.Fix-broken-test_sortkeys.patch b/dev-python/cbor/files/cbor-1.0.0.Fix-broken-test_sortkeys.patch new file mode 100644 index 000000000000..e7867d12cc29 --- /dev/null +++ b/dev-python/cbor/files/cbor-1.0.0.Fix-broken-test_sortkeys.patch @@ -0,0 +1,43 @@ +From 348041c3ff7104ca5b30e518beb2d2b86bf7bd73 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec <dolsen@gentoo.org> +Date: Sun, 19 Jul 2020 16:31:42 -0700 +Subject: [PATCH] Fix issue #6 broken test_sortkeys() + +Newer python dictionaries are keeping the order the keys were added in. +As a result since both lists were pre-sorted and identicle so the later +test failed to find any differences causing the failure. +This change introduces 3 entries that are out of sorted order for both +the obytes and xbytes lists. This ensures a valid test of sorting. +--- + cbor/tests/test_cbor.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/cbor/tests/test_cbor.py b/cbor/tests/test_cbor.py +index 78b3ddb..6ce068b 100644 +--- a/cbor/tests/test_cbor.py ++++ b/cbor/tests/test_cbor.py +@@ -281,6 +281,10 @@ class XTestCBOR(object): + xbytes = [] + for n in _range(2, 27): + ob = {u'{:02x}'.format(x):x for x in _range(n)} ++ # ensure some "ob" have unsorted key:value entries ++ if n in [4, 6, 9]: ++ ob.pop('01') ++ ob["01"] = 1 + obytes.append(self.dumps(ob, sort_keys=True)) + xbytes.append(self.dumps(ob, sort_keys=False)) + allOGood = True +--- a/setup.py 2016-02-09 15:10:34.000000000 -0800 ++++ b/setup.py 2020-07-19 13:46:18.586936516 -0700 +@@ -75,7 +75,7 @@ + author='Brian Olson', + author_email='bolson@bolson.org', + url='https://bitbucket.org/bodhisnarkva/cbor', +- packages=['cbor'], ++ packages=['cbor', 'cbor/tests'], + package_dir={'cbor':'cbor'}, + ext_modules=[ + Extension( +-- +libgit2 1.0.1 + diff --git a/dev-python/cbor/files/cbor-1.0.0.Replace-deprecated-logger.warn.patch b/dev-python/cbor/files/cbor-1.0.0.Replace-deprecated-logger.warn.patch new file mode 100644 index 000000000000..66b712b0e40d --- /dev/null +++ b/dev-python/cbor/files/cbor-1.0.0.Replace-deprecated-logger.warn.patch @@ -0,0 +1,98 @@ +From eea2e6c35c0962ca559a96f37ab4eada126da5de Mon Sep 17 00:00:00 2001 +From: Brian Dolbec <dolsen@gentoo.org> +Date: Sun, 19 Jul 2020 17:56:19 -0700 +Subject: [PATCH] Replace deprecated logger.warn() with logger.warning() + +--- + cbor/tests/test_cbor.py | 4 ++-- + cbor/tests/test_usage.py | 10 +++++----- + cbor/tests/test_vectors.py | 2 +- + 4 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/cbor/tests/test_cbor.py b/cbor/tests/test_cbor.py +index 78b3ddb..14ddf69 100644 +--- a/cbor/tests/test_cbor.py ++++ b/cbor/tests/test_cbor.py +@@ -27,7 +27,7 @@ try: + from cbor._cbor import load as cload + except ImportError: + # still test what we can without C fast mode +- logger.warn('testing without C accelerated CBOR', exc_info=True) ++ logger.warning('testing without C accelerated CBOR', exc_info=True) + cdumps, cloads, cdump, cload = None, None, None, None + + +@@ -62,7 +62,7 @@ class TestRoot(object): + def testable(cls): + ok = (cls._ld[0] is not None) and (cls._ld[1] is not None) and (cls._ld[3] is not None) and (cls._ld[4] is not None) + if not ok: +- logger.warn('non-testable case %s skipped', cls.__name__) ++ logger.warning('non-testable case %s skipped', cls.__name__) + return ok + + # Can't set class level function pointers, because then they expect a +diff --git a/cbor/tests/test_usage.py b/cbor/tests/test_usage.py +index d72f2e8..9d7e6a1 100644 +--- a/cbor/tests/test_usage.py ++++ b/cbor/tests/test_usage.py +@@ -22,7 +22,7 @@ try: + from cbor._cbor import load as cload + except ImportError: + # still test what we can without C fast mode +- logger.warn('testing without C accelerated CBOR', exc_info=True) ++ logger.warning('testing without C accelerated CBOR', exc_info=True) + cdumps, cloads, cdump, cload = None, None, None, None + + +@@ -48,7 +48,7 @@ class TestUsage(unittest.TestCase): + repeatedly serialize, check that usage doesn't go up + ''' + if cdumps is None: +- logger.warn('no C dumps(), skipping test_dumps_usage') ++ logger.warning('no C dumps(), skipping test_dumps_usage') + return + start_usage = resource.getrusage(resource.RUSAGE_SELF) + usage_history = [start_usage] +@@ -76,7 +76,7 @@ class TestUsage(unittest.TestCase): + repeatedly serialize, check that usage doesn't go up + ''' + if (cdumps is None) or (cloads is None): +- logger.warn('no C fast CBOR, skipping test_loads_usage') ++ logger.warning('no C fast CBOR, skipping test_loads_usage') + return + ## Just a string passes! + #ob = 'sntaoheusnatoheusnaotehuasnoetuhaosentuhaoesnth' +@@ -113,7 +113,7 @@ class TestUsage(unittest.TestCase): + it, checking usage all along the way. + ''' + if cdump is None: +- logger.warn('no C dump(), skipping test_tempfile') ++ logger.warning('no C dump(), skipping test_tempfile') + return + with tempfile.NamedTemporaryFile() as ntf: + # first, write a bunch to temp file +@@ -168,7 +168,7 @@ class TestUsage(unittest.TestCase): + def test_stringio_usage(self): + '''serialize data to StringIO, read it back''' + if cdump is None: +- logger.warn('no C dump(), skipping test_tempfile') ++ logger.warning('no C dump(), skipping test_tempfile') + return + + # warmup the rusage, allocate everything! +diff --git a/cbor/tests/test_vectors.py b/cbor/tests/test_vectors.py +index f4d8ca9..afed311 100644 +--- a/cbor/tests/test_vectors.py ++++ b/cbor/tests/test_vectors.py +@@ -27,7 +27,7 @@ try: + from cbor._cbor import loads as cloads + except ImportError: + # still test what we can without C fast mode +- logger.warn('testing without C accelerated CBOR', exc_info=True) ++ logger.warning('testing without C accelerated CBOR', exc_info=True) + #cdumps, cloads = None, None + cloads = None + from cbor import Tag +-- +libgit2 1.0.1 + diff --git a/dev-python/cbor/files/cbor-1.0.0.zero-length-bytes.patch b/dev-python/cbor/files/cbor-1.0.0.zero-length-bytes.patch new file mode 100644 index 000000000000..f508b86a0668 --- /dev/null +++ b/dev-python/cbor/files/cbor-1.0.0.zero-length-bytes.patch @@ -0,0 +1,10 @@ +--- a/cbor/cbor.py 2020-07-19 13:24:39.497775767 -0700 ++++ b/cbor/cbor.py 2020-07-19 13:24:39.497775767 -0700 +@@ -260,6 +260,8 @@ + """ + if data is None: + raise ValueError("got None for buffer to decode in loads") ++ elif data == b'': ++ raise ValueError("got zero length string loads") + fp = StringIO(data) + return _loads(fp)[0] diff --git a/dev-python/cbor/metadata.xml b/dev-python/cbor/metadata.xml index b680056119d4..bf5751841912 100644 --- a/dev-python/cbor/metadata.xml +++ b/dev-python/cbor/metadata.xml @@ -11,7 +11,7 @@ <name>Brian Olson</name> </maintainer> <remote-id type="pypi">cbor</remote-id> - <remote-id type="bitbucket">bodhisnarkva/cbor</remote-id> + <remote-id type="github">brianolson/cbor_py</remote-id> </upstream> <longdescription>An implementation of RFC 7049 - Concise Binary Object Representation (CBOR). CBOR is comparable to JSON, has a superset of |