Accepting request 1103417 from devel:languages:python

- Update requirements
- specfile:
  * remove patch supported_pythons_310_311.patch, included upstream
  * remove patch support-python-311-typing.patch, included upstreamx
- update to version 0.19.0:
  * Python 3.11 support
  * Massive improvements in performance for Interpreter (e.g. IPython)
    users. This especially affects pandas users with large datasets.
  * Add jedi.settings.allow_unsafe_interpreter_executions to make it
    easier for IPython users to avoid unsafe executions.

OBS-URL: https://build.opensuse.org/request/show/1103417
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jedi?expand=0&rev=39
This commit is contained in:
Dominique Leuenberger 2023-08-11 13:55:28 +00:00 committed by Git OBS Bridge
commit 67afdfd70f
6 changed files with 25 additions and 57 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612
size 1225011

BIN
jedi-0.19.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Thu Aug 10 22:27:43 UTC 2023 - Benjamin Greiner <code@bnavigator.de>
- Update requirements
-------------------------------------------------------------------
Thu Aug 10 21:59:38 UTC 2023 - Arun Persaud <arun@gmx.de>
- specfile:
* remove patch supported_pythons_310_311.patch, included upstream
* remove patch support-python-311-typing.patch, included upstreamx
- update to version 0.19.0:
* Python 3.11 support
* Massive improvements in performance for Interpreter (e.g. IPython)
users. This especially affects pandas users with large datasets.
* Add jedi.settings.allow_unsafe_interpreter_executions to make it
easier for IPython users to avoid unsafe executions.
-------------------------------------------------------------------
Wed May 10 12:13:38 UTC 2023 - Ben Greiner <code@bnavigator.de>

View File

@ -19,7 +19,7 @@
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-jedi
Version: 0.18.2
Version: 0.19.0
Release: 0
Summary: An autocompletion tool for Python
License: MIT AND Python-2.0
@ -27,13 +27,8 @@ Group: Development/Languages/Python
URL: https://github.com/davidhalter/jedi
Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz
Source1: %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM gh#davidhalter/jedi#1903
Patch0: support-python-311-typing.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
# The author of jedi and parso takes pinning very seriously, adhere to it!
BuildRequires: %{python_module parso >= 0.8.0 with %python-parso < 0.9}
BuildRequires: %{python_module parso >= 0.8.3 with %python-parso < 0.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 5}
BuildRequires: %{python_module setuptools}
@ -42,7 +37,7 @@ BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# See pinning note above
Requires: (python-parso >= 0.8.0 with python-parso < 0.9)
Requires: (python-parso >= 0.8.3 with python-parso < 0.9)
BuildArch: noarch
%python_subpackages

View File

@ -1,31 +0,0 @@
From 00e23ddcee220110086621ff5922fb9cffddf60a Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Tue, 10 Jan 2023 14:52:24 +1100
Subject: [PATCH] Support Python 3.11 typing changes
Python 3.11 has changed typing so that unions now return forward
refrences instead of erroring, and typing.Any is now an _AnyMeta class.
Correct the parameters for both of those.
Fixes #1858
---
test/test_api/test_interpreter.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/test/test_api/test_interpreter.py
+++ b/test/test_api/test_interpreter.py
@@ -656,10 +656,12 @@ def bar():
({'return': 'typing.Union[str, int]'}, ['int', 'str'], ''),
({'return': 'typing.Union["str", int]'},
['int', 'str'] if sys.version_info >= (3, 9) else ['int'], ''),
- ({'return': 'typing.Union["str", 1]'}, [], ''),
+ ({'return': 'typing.Union["str", 1]'},
+ ['str'] if sys.version_info >= (3, 11) else [], ''),
({'return': 'typing.Optional[str]'}, ['NoneType', 'str'], ''),
({'return': 'typing.Optional[str, int]'}, [], ''), # Takes only one arg
- ({'return': 'typing.Any'}, [], ''),
+ ({'return': 'typing.Any'},
+ ['_AnyMeta'] if sys.version_info >= (3, 11) else [], ''),
({'return': 'typing.Tuple[int, str]'},
['Tuple' if sys.version_info[:2] == (3, 6) else 'tuple'], ''),

View File

@ -1,15 +0,0 @@
---
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)