From f11d7b283a3ec7427a39492b8c684b454d9676ec28153e181a227ccd4cfd9736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Fri, 6 Mar 2020 11:56:34 +0000 Subject: [PATCH] - add typing.patch - fix test_sys_getwindowsversion with new parso OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jedi?expand=0&rev=56 --- python-jedi.changes | 5 +++++ python-jedi.spec | 2 ++ typing.patch | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 typing.patch diff --git a/python-jedi.changes b/python-jedi.changes index 22367c3..c13fa02 100644 --- a/python-jedi.changes +++ b/python-jedi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 6 11:55:48 UTC 2020 - Ondřej Súkup + +- add typing.patch - fix test_sys_getwindowsversion with new parso + ------------------------------------------------------------------- Tue Feb 4 09:38:03 UTC 2020 - Ondřej Súkup diff --git a/python-jedi.spec b/python-jedi.spec index 5af069f..0d33e57 100644 --- a/python-jedi.spec +++ b/python-jedi.spec @@ -27,6 +27,7 @@ URL: https://github.com/davidhalter/jedi Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz Patch0: unbundle.patch Patch1: delete.patch +Patch2: typing.patch BuildRequires: %{python_module parso >= 0.5.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -56,6 +57,7 @@ implementation as a VIM plugin which uses Jedi's autocompletion. %setup -q -n jedi-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 rm -Rf jedi/third_party %build diff --git a/typing.patch b/typing.patch new file mode 100644 index 0000000..ec4f745 --- /dev/null +++ b/typing.patch @@ -0,0 +1,17 @@ +Index: jedi-0.16.0/test/test_inference/test_gradual/test_typeshed.py +=================================================================== +--- jedi-0.16.0.orig/test/test_inference/test_gradual/test_typeshed.py ++++ jedi-0.16.0/test/test_inference/test_gradual/test_typeshed.py +@@ -116,10 +116,10 @@ def test_sys_getwindowsversion(Script, e + # This should only exist on Windows, but type inference should happen + # everywhere. + definitions = Script('import sys; sys.getwindowsversion().major').infer() ++ def_, = definitions + if environment.version_info.major == 2: +- assert not definitions ++ assert def_.name == 'Any' + else: +- def_, = definitions + assert def_.name == 'int' + +