Accepting request 1064746 from home:dirkmueller:acdc
- Add supported_pythons_310_311.patch which includes '3.11' among _SUPPORTED_PYTHONS (gh#davidhalter/jedi#1914). - Add fix_test_compiled_signature_annotation_string.patch to make test passing with Python 3.10+ (gh#davidhalter/jedi#1732). OBS-URL: https://build.opensuse.org/request/show/1064746 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jedi?expand=0&rev=99
This commit is contained in:
parent
cb9f70d5e6
commit
652d84257c
34
fix_test_compiled_signature_annotation_string.patch
Normal file
34
fix_test_compiled_signature_annotation_string.patch
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
test/test_inference/test_mixed.py | 8 ++++++--
|
||||
test/test_utils.py | 2 +-
|
||||
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/test/test_inference/test_mixed.py
|
||||
+++ b/test/test_inference/test_mixed.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+import sys
|
||||
from typing import Generic, TypeVar, List
|
||||
|
||||
import pytest
|
||||
@@ -110,5 +111,8 @@ def test_compiled_signature_annotation_s
|
||||
func.__name__ = 'not_func'
|
||||
|
||||
s, = jedi.Interpreter('func()', [locals()]).get_signatures(1, 5)
|
||||
- assert s.params[0].description == 'param x: Type'
|
||||
- assert s.params[1].description == 'param y: Union[Type, int]'
|
||||
+ assert s.params[0].description == 'param x: Type' \
|
||||
+ if sys.version_info < (3, 10, 0) else "param x: 'typing.Type'"
|
||||
+ assert s.params[1].description == 'param y: Union[Type, int]' \
|
||||
+ if sys.version_info < (3, 10, 0) else "param y: 'typing.Union[typing.Type, int]"
|
||||
+
|
||||
--- a/test/test_utils.py
|
||||
+++ b/test/test_utils.py
|
||||
@@ -81,7 +81,7 @@ class TestSetupReadline(unittest.TestCas
|
||||
if all(not x.startswith('from os import ' + s)
|
||||
for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_', 'ST_',
|
||||
'CLD_', 'POSIX_SPAWN_', 'P_', 'RWF_',
|
||||
- 'SCHED_'])
|
||||
+ 'SCHED_', 'SPLICE_', 'EFD_', 'eventfd'])
|
||||
}
|
||||
# There are quite a few differences, because both Windows and Linux
|
||||
# (posix and nt) librariesare included.
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 12 23:52:07 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add supported_pythons_310_311.patch which includes '3.11' among
|
||||
_SUPPORTED_PYTHONS (gh#davidhalter/jedi#1914).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 11 00:28:05 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add fix_test_compiled_signature_annotation_string.patch to make
|
||||
test passing with Python 3.10+ (gh#davidhalter/jedi#1732).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 10 04:01:51 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@ -28,7 +28,13 @@ Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{ver
|
||||
Source1: %{name}-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM gh#davidhalter/jedi#1903
|
||||
Patch0: support-python-311-typing.patch
|
||||
BuildRequires: %{python_module parso >= 0.8.0 with %python-parso < 0.9}
|
||||
# PATCH-FIX-UPSTREAM fix_test_compiled_signature_annotation_string.patch gh#davidhalter/jedi#1732 mcepl@suse.com
|
||||
# Make tests working with Python 3.10+ as well
|
||||
Patch1: fix_test_compiled_signature_annotation_string.patch
|
||||
# PATCH-FIX-UPSTREAM supported_pythons_310_311.patch gh#davidhalter/jedi#1914 mcepl@suse.com
|
||||
# Add '3.11' among _SUPPORTED_PYTHONS
|
||||
Patch2: supported_pythons_310_311.patch
|
||||
BuildRequires: %{python_module parso >= 0.8.0}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest >= 5}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@ -84,7 +90,7 @@ skiptests+=" or test_get_default_environment_when_embedded"
|
||||
%files %{python_files}
|
||||
%doc AUTHORS.txt CHANGELOG.rst README.rst
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/jedi-%{version}.dist-info
|
||||
%{python_sitelib}/jedi/
|
||||
%{python_sitelib}/jedi-%{version}*-info
|
||||
%{python_sitelib}/jedi
|
||||
|
||||
%changelog
|
||||
|
@ -12,8 +12,6 @@ Fixes #1858
|
||||
test/test_api/test_interpreter.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/test_api/test_interpreter.py b/test/test_api/test_interpreter.py
|
||||
index 848bca746..8e69cafc9 100644
|
||||
--- a/test/test_api/test_interpreter.py
|
||||
+++ b/test/test_api/test_interpreter.py
|
||||
@@ -656,10 +656,12 @@ def bar():
|
||||
|
15
supported_pythons_310_311.patch
Normal file
15
supported_pythons_310_311.patch
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
jedi/api/environment.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/jedi/api/environment.py
|
||||
+++ b/jedi/api/environment.py
|
||||
@@ -17,7 +17,7 @@ import parso
|
||||
|
||||
_VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
|
||||
-_SUPPORTED_PYTHONS = ['3.10', '3.9', '3.8', '3.7', '3.6']
|
||||
+_SUPPORTED_PYTHONS = ['3.11', '3.10', '3.9', '3.8', '3.7', '3.6']
|
||||
_SAFE_PATHS = ['/usr/bin', '/usr/local/bin']
|
||||
_CONDA_VAR = 'CONDA_PREFIX'
|
||||
_CURRENT_VERSION = '%s.%s' % (sys.version_info.major, sys.version_info.minor)
|
Loading…
x
Reference in New Issue
Block a user