Accepting request 786032 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/786032
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jedi?expand=0&rev=21
This commit is contained in:
Dominique Leuenberger 2020-03-26 23:26:36 +00:00 committed by Git OBS Bridge
commit 33ac20685c
9 changed files with 73 additions and 76 deletions

16
_service Normal file
View File

@ -0,0 +1,16 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/davidhalter/jedi.git</param>
<param name="scm">git</param>
<param name="revision">master</param>
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.%h</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="changesgenerate">enable</param>
</service>
<service name="set_version" mode="disabled" />
<service name="tar" mode="disabled" />
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/davidhalter/jedi.git</param>
<param name="changesrevision">17b3611c5301deec8fa017330200a1cca5adf394</param></service></servicedata>

View File

@ -1,43 +0,0 @@
From bec87f7ff82b0731713c6520a14c213341b4cecf Mon Sep 17 00:00:00 2001
From: Dave Halter <davidhalter88@gmail.com>
Date: Sun, 26 Jan 2020 20:07:25 +0100
Subject: [PATCH] Jedi understand now when you use del, fixes #313
---
test/completion/basic.py | 6 +++---
test/test_api/test_full_name.py | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/test/completion/basic.py b/test/completion/basic.py
index b40068179..3ff919ca6 100644
--- a/test/completion/basic.py
+++ b/test/completion/basic.py
@@ -209,11 +209,11 @@ def global_as_import():
deleted_var = 3
del deleted_var
-#? int()
+#?
deleted_var
-#? ['deleted_var']
+#? []
deleted_var
-#! ['deleted_var = 3']
+#! []
deleted_var
# -----------------
diff --git a/test/test_api/test_full_name.py b/test/test_api/test_full_name.py
index 4fdb861b0..6858b6ca8 100644
--- a/test/test_api/test_full_name.py
+++ b/test/test_api/test_full_name.py
@@ -112,7 +112,8 @@ def test_os_path(Script):
def test_os_issues(Script):
"""Issue #873"""
- assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt']
+ # nt is not found, because it's deleted
+ assert [c.name for c in Script('import os\nos.nt''').complete()] == []
def test_param_name(Script):

View File

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

View File

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

5
jedi.obsinfo Normal file
View File

@ -0,0 +1,5 @@
name: jedi
version: 0.16.0+git55.17b3611c
mtime: 1584315377
commit: 17b3611c5301deec8fa017330200a1cca5adf394

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Tue Mar 17 21:45:28 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- fix version string to 0.16.0+git55.17b3611c
-------------------------------------------------------------------
Mon Mar 16 09:20:12 UTC 2020 - tchvatal@suse.com
- Update to version v0.16.0+git55.17b3611c:
* Included statement as a possible return type for BaseDefinition.type
-------------------------------------------------------------------
Mon Mar 16 09:20:01 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Disable tests
-------------------------------------------------------------------
Sat Mar 14 10:22:47 UTC 2020 - tchvatal@suse.com
- Update to version v0.16.0+git54.0888dd46:
* Fix partialmethod issues
* Make sure partialmethod tests are only executed for Python 3
* Refactor stdlib PartialObject
* Fix PartialMethodObject (WIP)
* Changed semantics of ClassVar attributes in classes, fixes #1502
* Avoid duplicate definitions for goto, fixes #1514
* Merge _remove_statements and infer_expr_stmt, fixes #1504
* Add partialmethod, fixes #1519
* Attempt at a test of completion of filepath after ~.
* Complete path after ~.
-------------------------------------------------------------------
Sat Mar 14 10:16:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Remove patches from git in preparation to switch to git service:
* delete.patch
* typing.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Mar 6 11:55:48 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com> Fri Mar 6 11:55:48 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -18,16 +18,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jedi Name: python-jedi
Version: 0.16.0 Version: 0.16.0+git55.17b3611c
Release: 0 Release: 0
Summary: An autocompletion tool for Python Summary: An autocompletion tool for Python
License: MIT AND Python-2.0 License: MIT AND Python-2.0
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/davidhalter/jedi URL: https://github.com/davidhalter/jedi
Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz Source0: jedi-%{version}.tar.xz
Patch0: unbundle.patch Patch0: unbundle.patch
Patch1: delete.patch
Patch2: typing.patch
BuildRequires: %{python_module parso >= 0.5.0} BuildRequires: %{python_module parso >= 0.5.0}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
@ -56,8 +54,6 @@ implementation as a VIM plugin which uses Jedi's autocompletion.
%prep %prep
%setup -q -n jedi-%{version} %setup -q -n jedi-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%patch2 -p1
rm -Rf jedi/third_party rm -Rf jedi/third_party
%build %build
@ -70,17 +66,15 @@ rm -Rf jedi/third_party
%check %check
export PYTHONDONTWRITEBYTECODE=1 export PYTHONDONTWRITEBYTECODE=1
export LANG="en_US.UTF-8" export LANG="en_US.UTF-8"
# in OBS venv isn't working and builtin completion tests dont work with unbundled typeshed # Do not execute tests
# test_static_analysis is flaky # Reason here is that the upstream uses bundled typeshed of exact revision and we can't guarantee that
# test_os_path_join is time based # Something like 20-30 tests always break with any typeshed change, and as such we can't do much
# test_import and test_compiled_signature gh#davidhalter/jedi#1429 # %%pytest -k "not (test_venv_and_pths or test_completion or test_builtin_details or test_static_analysis or test_os_path_join or test_import or test_compiled_signature or test_module__file__ or test_sqlite3_conversion)"
# test_module__file__ and test_sqlite3_conversion based on 'bundled' typeshed
%pytest -k "not (test_venv_and_pths or test_completion or test_builtin_details or test_static_analysis or test_os_path_join or test_import or test_compiled_signature or test_module__file__ or test_sqlite3_conversion)"
%files %{python_files} %files %{python_files}
%doc AUTHORS.txt CHANGELOG.rst README.rst %doc AUTHORS.txt CHANGELOG.rst README.rst
%license LICENSE.txt %license LICENSE.txt
%{python_sitelib}/jedi-%{version}-py*.egg-info %{python_sitelib}/jedi-*-py*.egg-info
%{python_sitelib}/jedi/ %{python_sitelib}/jedi/
%changelog %changelog

View File

@ -1,17 +0,0 @@
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'