summaryrefslogtreecommitdiff
path: root/dev-python/astroid
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
commit9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch)
treeb690ddc0ca30f1472887edbb0b8313629bfcbbb2 /dev-python/astroid
parentb17a3ef12038de50228bade1f05502c74e135321 (diff)
gentoo resync : 16.09.2020
Diffstat (limited to 'dev-python/astroid')
-rw-r--r--dev-python/astroid/Manifest2
-rw-r--r--dev-python/astroid/astroid-2.4.2-r1.ebuild68
-rw-r--r--dev-python/astroid/files/astroid-2.4.2-py39.patch42
3 files changed, 112 insertions, 0 deletions
diff --git a/dev-python/astroid/Manifest b/dev-python/astroid/Manifest
index 827f25768703..40a5c15cac45 100644
--- a/dev-python/astroid/Manifest
+++ b/dev-python/astroid/Manifest
@@ -1,4 +1,6 @@
AUX astroid-2.4.2-no-pytest-runner.patch 643 BLAKE2B 830b0d604e988701faf6c75f148ff65775bbd349ab11669ff9e50809541d45af5a575f5d8874e4260f2e300ffac2446a1f9469da21ab288f325693eebc67f5b7 SHA512 3b2819eda0bdf0847aa7153439dd2cd766aa588921f8c7acf6da85a966ba7047e19a508a208141f7be11fc3348a7757d23a1c0835e977a9fe545cbafec09eb3d
+AUX astroid-2.4.2-py39.patch 1723 BLAKE2B e05c71961478c4a9ea76d5edcff3d1f775fb225a98a4b6849068fd387a4061e25078c14d374f5c60260d1678f34cc9ed6db96b20567bb04a4dc089e0a611a328 SHA512 3afefb42e9bda1666820de490c6d4a8ad7c873fce2965f5a8a159bb00617fe71deda231c3f810d238af1b1f386cd4b5c9eba78f6012ff05a7b6f10e50573b5d8
DIST astroid-2.4.2.tar.gz 310972 BLAKE2B 23ebe5ef418ce19b64eb1c0f8d711c3f0d86ae32cff112d9a99db48d20a34c73cfa97c96229fd0f0f1169720d24e2cfd0b5a327c29ea0fc0f54a57ede45fcebe SHA512 f5d759c07a13e06d3d071faacff2dc775924566aaef8bdb6e526c4ebf723b6b561f5824b711b33e33a2a69df0a2ff4cbf0f4302c9a0d55610e031e81c4a4be91
+EBUILD astroid-2.4.2-r1.ebuild 1877 BLAKE2B de0cd03e4086363e8d0a7b698a86cd221cc1e49553b55d120f80833edf1529a79c80b9c2a74cbc5a32a5a9357372147899a460fe4de07da871b05ff6449c17e8 SHA512 4e488d880797dd9a38ce5c7854dbf6826d1fc90727f523947476fe1060db1a99a2f1575bc39da251ae2a1d29338a9f03500033e34b9864e4dfd42a47b297f95b
EBUILD astroid-2.4.2.ebuild 1352 BLAKE2B d3a1804b4d05fd0813bbbb4afa5009f1ac908fc52469f92e50ab8fa9beca334a5268abe11e16377fb73fc9f462a102c1edb2a9abeb38357acd0c9a3c8cb826b8 SHA512 335f6ae90e9d40295f9d0e6b5e6e2b1bc42453a857e22029ab5a4afa3e1f8ff79db38f72e185a68df034198732bf21f84ba76a00e02021c2ef7f722b07bc6e43
MISC metadata.xml 1147 BLAKE2B 6fd688ecaf19f5de658caecd0e4a5b5b451ece67b0e55afc8fc65cae8f99f0a2cb09c5e70b2cf3b68a4748ee10a417dfcd93569cc35e866aec7404d6ec9ecac4 SHA512 5eab195b147e8e1551871f537d61d0a4460ff8be0420c7e1661f6774f7fe8ace43f665f64d61677bdf890788d8a53206ac54350a8c6b73f87ba9a6edd44d56da
diff --git a/dev-python/astroid/astroid-2.4.2-r1.ebuild b/dev-python/astroid/astroid-2.4.2-r1.ebuild
new file mode 100644
index 000000000000..60e1cbbb76db
--- /dev/null
+++ b/dev-python/astroid/astroid-2.4.2-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit distutils-r1
+
+DESCRIPTION="Abstract Syntax Tree for logilab packages"
+HOMEPAGE="https://github.com/PyCQA/astroid https://pypi.org/project/astroid/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# Version specified in __pkginfo__.py.
+RDEPEND="
+ dev-python/lazy-object-proxy[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ >=dev-python/wrapt-1.11.2[${PYTHON_USEDEP}]
+ >=dev-python/typed-ast-1.4.0[${PYTHON_USEDEP}]"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/astroid-2.4.2-no-pytest-runner.patch
+ "${FILESDIR}"/astroid-2.4.2-py39.patch
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -r -e 's:"(wrapt|six|lazy_object_proxy)(~|=)=.+":"\1":' \
+ -i astroid/__pkginfo__.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local deselect=(
+ # no clue why it's broken
+ --deselect
+ tests/unittest_modutils.py::GetModulePartTest::test_knownValues_get_builtin_module_part
+ )
+ [[ ${EPYTHON} == python3.9 ]] && deselect+=(
+ --deselect
+ tests/unittest_brain.py::TypingBrain::test_namedtuple_few_args
+ --deselect
+ tests/unittest_brain.py::TypingBrain::test_namedtuple_few_fields
+ --deselect
+ tests/unittest_brain.py::TypingBrain::test_namedtuple_inference_nonliteral
+ --deselect
+ tests/unittest_inference.py::test_dataclasses_subscript_inference_recursion_error
+ )
+
+ pytest -vv "${deselect[@]}" || die "Tests failed with ${EPYTHON}"
+}
diff --git a/dev-python/astroid/files/astroid-2.4.2-py39.patch b/dev-python/astroid/files/astroid-2.4.2-py39.patch
new file mode 100644
index 000000000000..0f838b7214a4
--- /dev/null
+++ b/dev-python/astroid/files/astroid-2.4.2-py39.patch
@@ -0,0 +1,42 @@
+From 3ffe25f8e3cdb30f0dcfb68f4373370828894727 Mon Sep 17 00:00:00 2001
+From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
+Date: Tue, 4 Aug 2020 10:11:44 +0000
+Subject: [PATCH] Skip test for | in dictionaries due to PEP-584 in Python 3.9+
+
+---
+ tests/unittest_inference.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tests/unittest_inference.py b/tests/unittest_inference.py
+index 76c7e879..b7bc732d 100644
+--- a/tests/unittest_inference.py
++++ b/tests/unittest_inference.py
+@@ -2455,7 +2455,6 @@ def test_binary_op_type_errors(self):
+ 1 ** (lambda x: x) #@
+ {} * {} #@
+ {} - {} #@
+- {} | {} #@
+ {} >> {} #@
+ [] + () #@
+ () + [] #@
+@@ -2500,7 +2499,6 @@ def __radd__(self, other):
+ msg.format(op="**", lhs="int", rhs="function"),
+ msg.format(op="*", lhs="dict", rhs="dict"),
+ msg.format(op="-", lhs="dict", rhs="dict"),
+- msg.format(op="|", lhs="dict", rhs="dict"),
+ msg.format(op=">>", lhs="dict", rhs="dict"),
+ msg.format(op="+", lhs="list", rhs="tuple"),
+ msg.format(op="+", lhs="tuple", rhs="list"),
+@@ -2515,6 +2513,12 @@ def __radd__(self, other):
+ msg.format(op="+=", lhs="int", rhs="A"),
+ msg.format(op="+=", lhs="int", rhs="list"),
+ ]
++
++ # PEP-584 supports | for dictionary union
++ if sys.version_info < (3, 9):
++ ast_nodes.append(extract_node("{} | {} #@"))
++ expected.append(msg.format(op="|", lhs="dict", rhs="dict"))
++
+ for node, expected_value in zip(ast_nodes, expected):
+ errors = node.type_errors()
+ self.assertEqual(len(errors), 1)