Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-jedi for openSUSE:Factory 
checked in at 2021-04-15 16:56:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jedi (Old)
 and      /work/SRC/openSUSE:Factory/.python-jedi.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jedi"

Thu Apr 15 16:56:37 2021 rev:28 rq:878754 version:0.18.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jedi/python-jedi.changes  2020-09-01 
20:07:47.572604328 +0200
+++ /work/SRC/openSUSE:Factory/.python-jedi.new.12324/python-jedi.changes       
2021-04-15 16:56:43.326608297 +0200
@@ -1,0 +2,32 @@
+Sat Mar 13 13:33:44 UTC 2021 - Ben Greiner <[email protected]>
+
+- Add jedi-py39-pytest.patch to support Python 3.9
+
+-------------------------------------------------------------------
+Fri Dec 25 19:03:26 UTC 2020 - Matej Cepl <[email protected]>
+
+- update to 0.18.0 (get it together with the latest python-parso just to
+  be sure):
+  - Dropped Python 2 and Python 3.5
+  - Using ``pathlib.Path()`` as an output instead of ``str`` in most
+    places:
+    - ``Project.path``
+    - ``Script.path``
+    - ``Definition.module_path``
+    - ``Refactoring.get_renames``
+    - ``Refactoring.get_changed_files``
+  - Functions with ``@property`` now return ``property`` instead of
+    ``function`` in ``Name().type``
+  - Started using annotations
+  - Better support for the walrus operator
+  - Project attributes are now read accessible
+  - Removed all deprecations
+
+  This is likely going to be the last minor release before 1.0.
+
+-------------------------------------------------------------------
+Thu Sep  3 20:26:53 UTC 2020 - Matej Cepl <[email protected]>
+
+- Revert back to 0.17.2.
+
+-------------------------------------------------------------------

Old:
----
  jedi-0.17.2.tar.gz

New:
----
  jedi-0.18.0.tar.gz
  jedi-py39-pytest.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-jedi.spec ++++++
--- /var/tmp/diff_new_pack.efNKMO/_old  2021-04-15 16:56:43.846609121 +0200
+++ /var/tmp/diff_new_pack.efNKMO/_new  2021-04-15 16:56:43.850609127 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-jedi
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,8 +17,9 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-jedi
-Version:        0.17.2
+Version:        0.18.0
 Release:        0
 Summary:        An autocompletion tool for Python
 License:        MIT AND Python-2.0
@@ -26,14 +27,16 @@
 URL:            https://github.com/davidhalter/jedi
 Source0:        
https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz
 Source1:        %{name}-rpmlintrc
-BuildRequires:  %{python_module parso >= 0.7.0}
+# PATCH-FIX-UPSTREAM Support pytest completion for Python 3.9 -- 
gh#davidhalter/jedi#1699
+Patch0:         
https://github.com/davidhalter/jedi/commit/85ec94cf.patch#/jedi-py39-pytest.patch
+BuildRequires:  %{python_module parso >= 0.8.0}
 # need pytest 5 https://github.com/davidhalter/jedi/issues/1660
 BuildRequires:  %{python_module pytest < 6.0.0}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module typing}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-parso >= 0.7.0
+Requires:       python-parso >= 0.8.0
 BuildArch:      noarch
 %python_subpackages
 
@@ -51,7 +54,7 @@
 implementation as a VIM plugin which uses Jedi's autocompletion.
 
 %prep
-%setup -q -n jedi-%{version}
+%autosetup -p1 -n jedi-%{version}
 
 %build
 %python_build

++++++ jedi-0.17.2.tar.gz -> jedi-0.18.0.tar.gz ++++++
++++ 11447 lines of diff (skipped)

++++++ jedi-py39-pytest.patch ++++++
>From 85ec94cf6518e3446c5b19048c046a784fed4130 Mon Sep 17 00:00:00 2001
From: Dave Halter <[email protected]>
Date: Sat, 26 Dec 2020 03:32:17 +0100
Subject: [PATCH] Fix pytest issues, fixes #1699

---
 jedi/plugins/pytest.py | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/jedi/plugins/pytest.py b/jedi/plugins/pytest.py
index cec237338..d0dfba018 100644
--- a/jedi/plugins/pytest.py
+++ b/jedi/plugins/pytest.py
@@ -5,6 +5,7 @@
 from jedi.inference.imports import load_module_from_path
 from jedi.inference.filters import ParserTreeFilter
 from jedi.inference.base_value import NO_VALUES, ValueSet
+from jedi.inference.helpers import infer_call_of_leaf
 
 _PYTEST_FIXTURE_MODULES = [
     ('_pytest', 'monkeypatch'),
@@ -147,18 +148,35 @@ class FixtureFilter(ParserTreeFilter):
     def _filter(self, names):
         for name in super()._filter(names):
             funcdef = name.parent
+            # Class fixtures are not supported
             if funcdef.type == 'funcdef':
-                # Class fixtures are not supported
                 decorated = funcdef.parent
                 if decorated.type == 'decorated' and 
self._is_fixture(decorated):
                     yield name
 
     def _is_fixture(self, decorated):
-        for decorator in decorated.children:
+        decorators = decorated.children[0]
+        if decorators.type == 'decorators':
+            decorators = decorators.children
+        else:
+            decorators = [decorators]
+        for decorator in decorators:
             dotted_name = decorator.children[1]
             # A heuristic, this makes it faster.
             if 'fixture' in dotted_name.get_code():
-                for value in self.parent_context.infer_node(dotted_name):
+                if dotted_name.type == 'atom_expr':
+                    # Since Python3.9 a decorator does not have dotted names
+                    # anymore.
+                    last_trailer = dotted_name.children[-1]
+                    last_leaf = last_trailer.get_last_leaf()
+                    if last_leaf == ')':
+                        values = infer_call_of_leaf(
+                            self.parent_context, last_leaf, 
cut_own_trailer=True)
+                    else:
+                        values = self.parent_context.infer_node(dotted_name)
+                else:
+                    values = self.parent_context.infer_node(dotted_name)
+                for value in values:
                     if 
value.name.get_qualified_names(include_module_names=True) \
                             == ('_pytest', 'fixtures', 'fixture'):
                         return True

Reply via email to