summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2020-03-26 12:15:48 -0700
committerPatrick McLean <chutzpah@gentoo.org>2020-03-26 15:39:02 -0700
commita42474607e48bd60748d9d0d354ce235417311bc (patch)
treeca3dfb0225e0f3dde8d1c9155757ec47eaddde6a
parentdev-python/repoze-lru-0.7-r1: revbump, add py38, pypy3, eclass update (diff)
downloadgentoo-a42474607e48bd60748d9d0d354ce235417311bc.tar.gz
gentoo-a42474607e48bd60748d9d0d354ce235417311bc.tar.bz2
gentoo-a42474607e48bd60748d9d0d354ce235417311bc.zip
dev-python/objgraph-3.4.1: version bump, add pypy3
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.95, Repoman-2.3.21 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r--dev-python/objgraph/Manifest1
-rw-r--r--dev-python/objgraph/files/objgraph-3.4.1-tests.patch57
-rw-r--r--dev-python/objgraph/objgraph-3.4.1.ebuild33
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-python/objgraph/Manifest b/dev-python/objgraph/Manifest
index 3ab2c97ffcf..8c56f729f8f 100644
--- a/dev-python/objgraph/Manifest
+++ b/dev-python/objgraph/Manifest
@@ -1,2 +1,3 @@
DIST objgraph-3.1.0.tar.gz 629772 BLAKE2B afa34613d8b05399dec1429465d81b026000ac22c0d345289ce7b2c9c7cc0a0bb6db0054bc7f92ab8d0c69e2d40cf860dc46350951251c106e7718daa8efa0fc SHA512 4b997ff1942556fdeece39080ad00d915136d314add94e61e4b3102e332ce3fd029f7082fbbadeffae63f157f05f8af4871dc5b7ee26926d790fb043ad8f2130
DIST objgraph-3.4.0.tar.gz 634554 BLAKE2B d1e58370a50a9c9d8647c7633a780069581eec61cccef56e83b015f26a7ffbba6b872673d72dc138339b3c97a3f08c02067e203ddb1d1048ae6f3611e0837fca SHA512 f1e2b9f22dfdce56988bd40aaa865572c42688e73800bb7c188b903c67ef3726c03ba058ed30d40792133a2e2fe74d5ecda91be3de8cf7b80188ac0b9f6ac393
+DIST objgraph-3.4.1.tar.gz 634602 BLAKE2B 17424fa5b6b079e9b0dabdfb5facc88fef67bb3742252fd986b19cb0b674c40f335e0372cb08a86e89d42cce0d504830c24471e0d34483925b33d44f45859445 SHA512 174e097cd9f9b5bd2e83a389d2ce3bd05a1754c1535923cc75f59a3281a292b50014501f093ccf1b2350fdbb34757af950636819227e39cdad2f64cb7de5ebb8
diff --git a/dev-python/objgraph/files/objgraph-3.4.1-tests.patch b/dev-python/objgraph/files/objgraph-3.4.1-tests.patch
new file mode 100644
index 00000000000..d79b78fb88b
--- /dev/null
+++ b/dev-python/objgraph/files/objgraph-3.4.1-tests.patch
@@ -0,0 +1,57 @@
+diff --git a/tests.py b/tests.py
+index fc2ee7f..d494470 100755
+--- a/tests.py
++++ b/tests.py
+@@ -11,6 +11,7 @@ import tempfile
+ import textwrap
+ import types
+ import unittest
++import platform
+
+ # setuptools imports `imp`, which triggers a DeprecationWarning starting with
+ # Python 3.4 in the middle of my pristine test suite. But if I do the import
+@@ -363,7 +364,7 @@ def doctest_get_new_ids_prints():
+ ========================================================
+ Type Old_ids Current_ids New_ids Count_Deltas
+ ========================================================
+- list ... ... ... +2
++ wt ... ... ... +2
+ ========================================================
+
+ """
+@@ -387,7 +388,10 @@ class ByTypeTest(GarbageCollectedMixin, unittest.TestCase):
+ # 2. the `res` list
+ # referrers we don't want:
+ # the ``objects`` list in the now-dead stack frame of objgraph.by_type
+- self.assertLessEqual(len(gc.get_referrers(res[0])), 2)
++ if 'pypy' in platform.python_implementation().lower():
++ self.assertLessEqual(len(gc.get_referrers(res[0])), 3)
++ else:
++ self.assertLessEqual(len(gc.get_referrers(res[0])), 2)
+
+
+ class AtAddrsTest(unittest.TestCase):
+@@ -439,7 +443,10 @@ class StringRepresentationTest(GarbageCollectedMixin,
+ obj = MyClass()
+ with mock.patch.object(obj, 'my_method',
+ types.MethodType(mock_method, obj)):
+- self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
++ if 'pypy' in platform.python_implementation().lower():
++ self.assertRegex(objgraph._short_repr(obj.my_method), '<bound method')
++ else:
++ self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
+
+ def test_short_repr_mocked_name(self):
+ self.assertRegex(objgraph._short_repr(mock.Mock(__name__=mock.Mock())),
+@@ -462,7 +469,10 @@ class StringRepresentationTest(GarbageCollectedMixin,
+ obj = MyClass()
+ with mock.patch.object(obj, 'my_method',
+ types.MethodType(mock_method, obj)):
+- self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
++ if 'pypy' in platform.python_implementation().lower():
++ self.assertRegex(objgraph._short_repr(obj.my_method), '<bound method')
++ else:
++ self.assertRegex(objgraph._short_repr(obj.my_method), '<Mock')
+
+ @skipIf(sys.version_info[0] > 2, "Python 3 has no unbound methods")
+ def test_short_repr_unbound_method(self):
diff --git a/dev-python/objgraph/objgraph-3.4.1.ebuild b/dev-python/objgraph/objgraph-3.4.1.ebuild
new file mode 100644
index 00000000000..db0ce4a646f
--- /dev/null
+++ b/dev-python/objgraph/objgraph-3.4.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Draws Python object reference graphs with graphviz"
+HOMEPAGE="https://mg.pov.lt/objgraph/"
+SRC_URI="mirror://pypi/o/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="media-gfx/graphviz"
+DEPEND="dev-python/setuptools
+ test? ( media-gfx/xdot )"
+
+PATCHES=(
+ "${FILESDIR}/objgraph-3.4.1-tests.patch"
+)
+
+distutils_enable_tests unittest
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/* )
+ distutils-r1_python_install_all
+}