From 46eedbedafdb0040c37884982d4c775ce277fb7b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Oct 2021 10:22:14 +0100 Subject: gentoo resync : 20.10.2021 --- dev-python/immutables/Manifest | 4 -- .../files/immutables-0.15-32bit-hash.patch | 76 ---------------------- dev-python/immutables/immutables-0.15-r1.ebuild | 22 ------- dev-python/immutables/immutables-0.15.ebuild | 17 ----- 4 files changed, 119 deletions(-) delete mode 100644 dev-python/immutables/files/immutables-0.15-32bit-hash.patch delete mode 100644 dev-python/immutables/immutables-0.15-r1.ebuild delete mode 100644 dev-python/immutables/immutables-0.15.ebuild (limited to 'dev-python/immutables') diff --git a/dev-python/immutables/Manifest b/dev-python/immutables/Manifest index b19e1abaae6f..4c740feb997a 100644 --- a/dev-python/immutables/Manifest +++ b/dev-python/immutables/Manifest @@ -1,7 +1,3 @@ -AUX immutables-0.15-32bit-hash.patch 2439 BLAKE2B 353f5452dbff85a3b08786174a69068b0a9081ddbc8f88ba03b8c73ba5ab753c2e463cb9ab3af3d61604c23f3b58fe9226efda8119cd1420d3b27871ceb8f1e7 SHA512 add8e68ce6be057889a075c2ba1e58e522ade9e49513118e5e2acfd688b2f1ca20634aee546c0ed5e92181d5c777af4cf312368510c65f8267a465bc90a063b2 -DIST immutables-0.15.tar.gz 81297 BLAKE2B cb58142c3b833d529046f09a468b3e3964e3d36e4eaf0825f88b920e6795cd042e2fc837ea6d72000bbc9cbc2fd1de911e08b4f6d189e692748b49e848dfb3fb SHA512 cd0ee20f6d6218eaf13499e40971b6750009ff01a1aefcb7dd45c77ae841296b9d9184013e6e7fe5bdef93587f85cdb8ff459af29424a0077538666260572b8e DIST immutables-0.16.tar.gz 84916 BLAKE2B e699aaa1135fa9f7db9589276dc0801a67c5f98bd3c5b247913d8263f9baf02a8772d7715cc3eb2c9392694d48d3808d50f45e9fe8e66c4d507586d0e3fdc319 SHA512 5b883cfe43f8a042b617e719dccd3cbdded3b1d1df160ba26b6bb2f0816a7171698bdd2ba3d450e76f135b236e777052a22c09b8bd1a9183227f1ccc90617cf8 -EBUILD immutables-0.15-r1.ebuild 627 BLAKE2B 6c92546290668c7e174b01d59c9c5519b0661cb80a925e534988a83c2447fc819e0c8bd7fc94e0ec9b1c144d7326b95c50a487bc6bd826fdea3c4b4c84518da9 SHA512 e2b4e3df9e5546c9591ee15ab2eaa21d75d88b9b2e9c17e8f3896c225a5843139d92baa55e44f60bc99c761a22aae680a843601c4e987cb2fa4cf6b0895ada3b -EBUILD immutables-0.15.ebuild 487 BLAKE2B 6eb8f45620525e4dd42aea5ae122f9c60e4a1ed5c7585967a7866a71d79fde296565b6e6aa7654f7ca6cc1121cc9ad0ae21a96899c80fa7d3ca2b0c9bef29902 SHA512 1b5e71a31832081a6d6537c8e3084ad29e3492cb2b9042000d6ca488a93a4357bd62c1bf7d4b3023786508604d3750c09cfe54148c0663869e5f607297748a22 EBUILD immutables-0.16.ebuild 799 BLAKE2B 1fba989be6ce9b41b288ced7287bd46ce84877ba6b2831cc466b9ef927e6838af7bbd7c61cd598b639b26fde016bad2e38ca880dad00214d56939ce9002c6657 SHA512 3a23a6cb325515388f4bc41a0118590c64343fa5544a7d95dd5b3befb1a209a75b12210e2375f39f236fca62e8afad4f945d70dd3e9e87efc69d132a6320f591 MISC metadata.xml 353 BLAKE2B 5ba3a63b6d65aa989535ec78a5e097fb15e6bcb392e846471fb01efd4a4b546a3ba861cc3829d13e71f1f5c31b582a99e1f5e4adf6b60c2b6fb17bdfb9265c99 SHA512 ede81f3aec8f6ee374c8d39d60f4193cfb701f2561858f2ddfadbe68d531849cec13fb8c13cc671e14d8ab1f18b08759d030c562cc496f959517c6ce67ac9781 diff --git a/dev-python/immutables/files/immutables-0.15-32bit-hash.patch b/dev-python/immutables/files/immutables-0.15-32bit-hash.patch deleted file mode 100644 index 234dfa028c08..000000000000 --- a/dev-python/immutables/files/immutables-0.15-32bit-hash.patch +++ /dev/null @@ -1,76 +0,0 @@ -From fa355239e70411179c70b16ed4ff7113d8008dad Mon Sep 17 00:00:00 2001 -From: Elvis Pranskevichus -Date: Wed, 4 Aug 2021 19:25:44 -0700 -Subject: [PATCH] Fix test_none_collisions on 32-bit systems (#69) - -There are two issues at play here: - -1. Python version of `map_hash` unnecessarily performs hash truncation - even if the hash is already 32-bit wide, which potentially converts - it from signed int to unsigned long. - -2. The `test_none_collisions` test generates a collision node with - hash greater than 2^32. - -Both of these are problematic on 32-bit systems, where `sizeof(Py_hash_t)` -is 4, and so anything that doesn't fit into `Py_hash_t` gets bit-mangled, -breaking the `hash(x) != x` invariance that the test relies upon. - -Fixes: #53 -Fixes: #50 ---- - .github/workflows/tests.yml | 10 +++++++++- - immutables/map.py | 5 ++++- - tests/test_none_keys.py | 14 +++++++++----- - 3 files changed, 22 insertions(+), 7 deletions(-) - -diff --git a/immutables/map.py b/immutables/map.py -index 2c1ffa91..0ad28588 100644 ---- a/immutables/map.py -+++ b/immutables/map.py -@@ -19,7 +19,10 @@ - - def map_hash(o): - x = hash(o) -- return (x & 0xffffffff) ^ ((x >> 32) & 0xffffffff) -+ if sys.hash_info.width > 32: -+ return (x & 0xffffffff) ^ ((x >> 32) & 0xffffffff) -+ else: -+ return x - - - def map_mask(hash, shift): -diff --git a/tests/test_none_keys.py b/tests/test_none_keys.py -index 8c0bb379..26d4220b 100644 ---- a/tests/test_none_keys.py -+++ b/tests/test_none_keys.py -@@ -1,3 +1,4 @@ -+import ctypes - import unittest - - from immutables.map import map_hash, map_mask, Map as PyMap -@@ -6,16 +7,19 @@ - - none_hash = map_hash(None) - assert(none_hash != 1) --assert((none_hash >> 32) == 0) -+assert(none_hash.bit_length() <= 32) - --not_collision = 0xffffffff & (~none_hash) -+none_hash_u = ctypes.c_size_t(none_hash).value -+not_collision = 0xffffffff & (~none_hash_u) - - mask = 0x7ffffffff --none_collisions = [none_hash & (mask >> shift) -+none_collisions = [none_hash_u & (mask >> shift) - for shift in reversed(range(0, 32, 5))] - assert(len(none_collisions) == 7) --none_collisions = [h | (not_collision & (mask << shift)) -- for shift, h in zip(range(5, 37, 5), none_collisions)] -+none_collisions = [ -+ ctypes.c_ssize_t(h | (not_collision & (mask << shift))).value -+ for shift, h in zip(range(5, 37, 5), none_collisions) -+] - - - class NoneCollision(HashKey): diff --git a/dev-python/immutables/immutables-0.15-r1.ebuild b/dev-python/immutables/immutables-0.15-r1.ebuild deleted file mode 100644 index 25e5896535f7..000000000000 --- a/dev-python/immutables/immutables-0.15-r1.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2019-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) -inherit distutils-r1 - -DESCRIPTION="A high-performance immutable mapping type for Python" -HOMEPAGE="https://github.com/MagicStack/immutables" -SRC_URI="https://github.com/MagicStack/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc x86" - -PATCHES=( - # https://github.com/MagicStack/immutables/commit/fa355239e70411179c70b16ed4ff7113d8008dad - "${FILESDIR}"/${P}-32bit-hash.patch -) - -distutils_enable_tests pytest diff --git a/dev-python/immutables/immutables-0.15.ebuild b/dev-python/immutables/immutables-0.15.ebuild deleted file mode 100644 index 2b0a05431a20..000000000000 --- a/dev-python/immutables/immutables-0.15.ebuild +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2019-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) -inherit distutils-r1 - -DESCRIPTION="A high-performance immutable mapping type for Python" -HOMEPAGE="https://github.com/MagicStack/immutables" -SRC_URI="https://github.com/MagicStack/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" - -distutils_enable_tests pytest -- cgit v1.2.3