Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-language-server for 
openSUSE:Factory checked in at 2021-04-01 14:17:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-language-server (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-language-server.new.2401 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-language-server"

Thu Apr  1 14:17:50 2021 rev:17 rq:882367 version:0.36.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-language-server/python-python-language-server.changes
      2021-01-05 18:16:24.119518432 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-language-server.new.2401/python-python-language-server.changes
    2021-04-01 14:19:13.788149345 +0200
@@ -1,0 +2,8 @@
+Tue Mar 30 18:15:10 UTC 2021 - Ben Greiner <[email protected]>
+
+- Add test_numpy_hover_fix.patch and test_snippet_fix.patch in
+  order to avoid test failures with NumPy 1.20
+  gh#python-ls/python-ls#7
+- Don't test with NumPy and depending packages for python36 flavor
+ 
+-------------------------------------------------------------------

New:
----
  test_numpy_hover_fix.patch
  test_snippet_fix.patch

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

Other differences:
------------------
++++++ python-python-language-server.spec ++++++
--- /var/tmp/diff_new_pack.jYWGeZ/_old  2021-04-01 14:19:14.584150407 +0200
+++ /var/tmp/diff_new_pack.jYWGeZ/_new  2021-04-01 14:19:14.588150412 +0200
@@ -27,21 +27,16 @@
 Source:         
https://files.pythonhosted.org/packages/source/p/python-language-server/python-language-server-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM pyls-jedi-newer.patch 
gh#palantir/python-language-server#901 -- remove jedi upper version boundary
 Patch0:         pyls-jedi-newer.patch
-BuildRequires:  %{python_module PyQt5}
-BuildRequires:  %{python_module autopep8}
-BuildRequires:  %{python_module flake8 >= 3.8.0}
-BuildRequires:  %{python_module matplotlib}
-BuildRequires:  %{python_module mccabe >= 0.6.0}
-BuildRequires:  %{python_module numpy}
-BuildRequires:  %{python_module pandas}
-BuildRequires:  %{python_module pycodestyle >= 2.6.0}
-BuildRequires:  %{python_module pydocstyle >= 2.0.0}
-BuildRequires:  %{python_module pyflakes >= 2.2.0}
-BuildRequires:  %{python_module pylint}
-BuildRequires:  %{python_module rope >= 0.10.5}
+# PATCH-FIX-UPSTREAM test_snippet_fix.patch -- gh#python-ls/python-ls#7
+Patch1:         test_snippet_fix.patch
+# PATCH-FIX-UPSTREAM test_numpy_hover_fix.patch -- gh#python-ls/python-ls#7
+Patch2:         test_numpy_hover_fix.patch
+BuildRequires:  %{python_module jedi >= 0.17.2}
+BuildRequires:  %{python_module pluggy}
+BuildRequires:  %{python_module python-jsonrpc-server >= 0.4.0}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module ujson}
 BuildRequires:  %{python_module versioneer}
-BuildRequires:  %{python_module yapf}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-jedi >= 0.17.2
@@ -59,12 +54,22 @@
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module flaky}
+BuildRequires:  %{python_module PyQt5}
+BuildRequires:  %{python_module autopep8}
+BuildRequires:  %{python_module flake8 >= 3.8.0}
 BuildRequires:  %{python_module future >= 0.14.0}
-BuildRequires:  %{python_module jedi >= 0.17.2}
+BuildRequires:  %{python_module mccabe >= 0.6.0}
 BuildRequires:  %{python_module mock}
-BuildRequires:  %{python_module pluggy}
+BuildRequires:  %{python_module pycodestyle >= 2.6.0}
+BuildRequires:  %{python_module pydocstyle >= 2.0.0}
+BuildRequires:  %{python_module pyflakes >= 2.2.0}
+BuildRequires:  %{python_module pylint}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module python-jsonrpc-server >= 0.4.0}
+BuildRequires:  %{python_module rope >= 0.10.5}
+BuildRequires:  %{python_module yapf}
+BuildRequires:  %{python_module matplotlib  if (%python-base without 
python36-base)}
+BuildRequires:  %{python_module numpy if (%python-base without python36-base)}
+BuildRequires:  %{python_module pandas  if (%python-base without 
python36-base)}
 %if %{with python2}
 BuildRequires:  python2-backports.functools_lru_cache
 BuildRequires:  python2-configparser
@@ -76,10 +81,10 @@
 Requires:       python2-future >= 0.14.0
 Requires:       python2-ujson <= 2.3.0
 %else
-Requires:       python3-ujson >= 3.0.0
+Requires:       python-ujson >= 3.0.0
 %endif
 Requires(post):   update-alternatives
-Requires(postun):  update-alternatives
+Requires(postun):update-alternatives
 %python_subpackages
 
 %description
@@ -128,7 +133,9 @@
   # Test failure on Leap 15.1 due to different pylint version
   donttest+=" or test_syntax_error_pylint_py"
 %endif
-%pytest -rs ${donttest:+-k "not (${donttest:4})"}
+# don't test numpy on python36: NEP 29
+python36_donttest=" or test_numpy or test_pandas or test_matplotlib"
+%pytest -ra -k "not (dummy_k_expr_start ${donttest} ${$python_donttest})"
 
 %files %{python_files}
 %doc README.rst

++++++ test_numpy_hover_fix.patch ++++++
Index: python-language-server-0.36.2/test/plugins/test_hover.py
===================================================================
--- python-language-server-0.36.2.orig/test/plugins/test_hover.py
+++ python-language-server-0.36.2/test/plugins/test_hover.py
@@ -46,9 +46,13 @@ def test_numpy_hover(workspace):
     contents = 'NumPy\n=====\n\nProvides\n'
     assert contents in pyls_hover(doc, numpy_hov_position_3)['contents'][0]
 
-    contents = 'Trigonometric sine, element-wise.\n\n'
-    assert contents in pyls_hover(
-        doc, numpy_sin_hov_position)['contents'][0]
+    # https://github.com/davidhalter/jedi/issues/1746
+    import numpy as np
+
+    if np.lib.NumpyVersion(np.__version__) < '1.20.0':
+        contents = 'Trigonometric sine, element-wise.\n\n'
+        assert contents in pyls_hover(
+            doc, numpy_sin_hov_position)['contents'][0]
 
 
 def test_hover(workspace):
++++++ test_snippet_fix.patch ++++++
Index: python-language-server-0.36.2/test/plugins/test_completion.py
===================================================================
--- python-language-server-0.36.2.orig/test/plugins/test_completion.py
+++ python-language-server-0.36.2/test/plugins/test_completion.py
@@ -216,14 +216,14 @@ def test_completion_with_class_objects(c
 
 
 def test_snippet_parsing(config, workspace):
-    doc = 'import numpy as np\nnp.logical_and'
-    completion_position = {'line': 1, 'character': 14}
+    doc = 'divmod'
+    completion_position = {'line': 0, 'character': 6}
     doc = Document(DOC_URI, workspace, doc)
     config.capabilities['textDocument'] = {
         'completion': {'completionItem': {'snippetSupport': True}}}
     config.update({'plugins': {'jedi_completion': {'include_params': True}}})
     completions = pyls_jedi_completions(config, doc, completion_position)
-    out = 'logical_and(${1:x1}, ${2:x2})$0'
+    out = 'divmod(${1:a}, ${2:b})$0'
     assert completions[0]['insertText'] == out
 
 

Reply via email to