diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-26 00:09:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-26 00:09:36 +0100 |
commit | b1c81de4fadbd00897700a7321f03b390d952b2e (patch) | |
tree | e6cc812351d4f105c110cfc363ebb497e996f47a /dev-python/mypy | |
parent | 7c59acba5699c9c58090a7a738669669a7307023 (diff) |
gentoo resync : 26.08.2021
Diffstat (limited to 'dev-python/mypy')
-rw-r--r-- | dev-python/mypy/Manifest | 3 | ||||
-rw-r--r-- | dev-python/mypy/files/mypy-0.910-py3.10-tests.patch | 51 | ||||
-rw-r--r-- | dev-python/mypy/mypy-0.910.ebuild | 27 |
3 files changed, 70 insertions, 11 deletions
diff --git a/dev-python/mypy/Manifest b/dev-python/mypy/Manifest index d2649e0462ce..0c405a831c4a 100644 --- a/dev-python/mypy/Manifest +++ b/dev-python/mypy/Manifest @@ -1,3 +1,4 @@ +AUX mypy-0.910-py3.10-tests.patch 1821 BLAKE2B fda18540f14b0fcba8d57bb7e072135f7415ecc39750424ee03fca835ab65491fb8966326e7f51b260b7f1b98e9bc408eb04df4a74e6007a5c1c72b28ed8a950 SHA512 64a6b2361260b0ce9bb22e706b2531af4ac2894191c92501274368d92beb159e53b4da6174e7f91ef4b2f7752936d86250b5fe8347beea1bdf223b7abda98414 DIST mypy-0.910.tar.gz 2551057 BLAKE2B a3c6939c8f0e2ea19a3a3f91031330df2fb25a93cc3f9239535f15c17eedcca5716cc75c5412a1d345d8572d396c3d7128e38989fd694833cb6aec8366ac4afe SHA512 49060c13da8bf17385b6b1db6efa9ac5771f2bac92d26760c4087cf128de22846b8a062f38e83ecff524e7893f8c9cd0647a2ef89e10387138544436a2840459 -EBUILD mypy-0.910.ebuild 1637 BLAKE2B 5ccc41bf6e8a204d842539864da26cfbcf0908dc73638aa7352e774a73182a686379a45848b93f6f7c065ba0a3ef463bac02e04cea844b6d32c041675d2776b2 SHA512 cac8c4c53d0ce8a96739f1926c75d4bb4def5259bd0677841cbac1e75a39fcb143723d10b9ecc03a71bac541a0becc9f4f5348c31a36f7a4a77e903efadfb7c9 +EBUILD mypy-0.910.ebuild 1915 BLAKE2B 26d3d52f03366b10d173d689013675ce02f6f4b9f4eef3b1d4fdd50403254bd5fe5db8531599286af49f4d7dd6ec796c077a0385572da3a87909ff0feb55186d SHA512 fe74145b4ae732a102047993f80ee3cfe48477fe4d1b01a3fede3a7dd962806d7db08b00fae7c7430602a9eff605bacbada3a23a8fffd6f8c919d74e397b9249 MISC metadata.xml 514 BLAKE2B 12e8ffaeeac0b2501560c015aed0707a75162182b00e899221c9600b78a2969dd6e24a7cb5580aaec810885cf1787882628b2fe550121dabd3737e4cb61d09e6 SHA512 83496ca98f9207accab51a98e3e52c0e68a5b290c6b4f518544e53ecf38cee8153372212db198b97c8a1c07d922cfd00dfcfa41c3d49a9d69eb4bc146633f454 diff --git a/dev-python/mypy/files/mypy-0.910-py3.10-tests.patch b/dev-python/mypy/files/mypy-0.910-py3.10-tests.patch new file mode 100644 index 000000000000..16e85049cc1e --- /dev/null +++ b/dev-python/mypy/files/mypy-0.910-py3.10-tests.patch @@ -0,0 +1,51 @@ +diff --git a/mypyc/test-data/run-misc.test b/mypyc/test-data/run-misc.test +index 431efc228..0c1a26c1b 100644 +--- a/mypyc/test-data/run-misc.test ++++ b/mypyc/test-data/run-misc.test +@@ -13,8 +13,7 @@ async def g() -> int: + async def f() -> int: + return await g() + +-loop = asyncio.get_event_loop() +-result = loop.run_until_complete(f()) ++result = asyncio.run(f()) + assert result == 1 + + [typing fixtures/typing-full.pyi] +@@ -22,8 +21,8 @@ assert result == 1 + [file driver.py] + from native import f + import asyncio +-loop = asyncio.get_event_loop() +-result = loop.run_until_complete(f()) ++ ++result = asyncio.run(f()) + assert result == 1 + + [case testMaybeUninitVar] +diff --git a/test-data/stdlib-samples/3.2/random.py b/test-data/stdlib-samples/3.2/random.py +index 7eecdfe04..82bda03f7 100644 +--- a/test-data/stdlib-samples/3.2/random.py ++++ b/test-data/stdlib-samples/3.2/random.py +@@ -41,7 +41,7 @@ from types import MethodType as _MethodType, BuiltinMethodType as _BuiltinMethod + from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil + from math import sqrt as _sqrt, acos as _acos, cos as _cos, sin as _sin + from os import urandom as _urandom +-from collections import Set as _Set, Sequence as _Sequence ++from collections.abc import Set as _Set, Sequence as _Sequence + from hashlib import sha512 as _sha512 + + from typing import ( +diff --git a/test-data/unit/cmdline.test b/test-data/unit/cmdline.test +index 92ef7e069..87d04f3c4 100644 +--- a/test-data/unit/cmdline.test ++++ b/test-data/unit/cmdline.test +@@ -791,7 +791,7 @@ c.py:2: error: Argument 1 to "bar" has incompatible type "str"; expected "int" + [case testSrcPEP420Packages] + # cmd: mypy -p anamespace --namespace-packages + [file mypy.ini] +-\[mypy]] ++\[mypy] + mypy_path = src + [file src/setup.cfg] + [file src/anamespace/foo/__init__.py] diff --git a/dev-python/mypy/mypy-0.910.ebuild b/dev-python/mypy/mypy-0.910.ebuild index 3d67ec726460..c1cf48585100 100644 --- a/dev-python/mypy/mypy-0.910.ebuild +++ b/dev-python/mypy/mypy-0.910.ebuild @@ -3,15 +3,12 @@ EAPI=7 -PYTHON_COMPAT=( python3_{8..9} ) -inherit distutils-r1 +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 multiprocessing DESCRIPTION="Optional static typing for Python" HOMEPAGE="http://www.mypy-lang.org/" -TYPESHED_COMMIT="add4d92f050fb11d3901c6f0ee579a122d4a7a98" -SRC_URI=" - https://github.com/python/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz -" +SRC_URI="https://github.com/python/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" @@ -41,18 +38,28 @@ BDEPEND=" distutils_enable_sphinx docs/source dev-python/sphinx_rtd_theme distutils_enable_tests pytest +PATCHES=( + # https://github.com/python/mypy/pull/11017 + "${FILESDIR}/${P}-py3.10-tests.patch" +) + # this requires packaging a lot of type stubs export MYPY_USE_MYPYC=0 python_test() { - local deselect=( - # TODO + local EPYTEST_DESELECT=( + # Fails with pytest-xdist 2.3.0 + # https://github.com/python/mypy/issues/11019 mypy/test/teststubtest.py ) + [[ "${EPYTHON}" == "python3.10" ]] && EPYTEST_DESELECT+=( + # https://github.com/python/mypy/issues/11018 + mypyc/test/test_commandline.py::TestCommandLine::testErrorOutput + ) + # Some mypy/test/testcmdline.py::PythonCmdlineSuite tests # fail with high COLUMNS values local -x COLUMNS=80 - epytest ${deselect[@]/#/--deselect } \ - -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" + epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" } |