Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-lsp-server for 
openSUSE:Factory checked in at 2023-01-20 17:38:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-lsp-server (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-lsp-server.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-lsp-server"

Fri Jan 20 17:38:34 2023 rev:19 rq:1059822 version:1.7.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-lsp-server/python-python-lsp-server.changes
        2023-01-03 18:00:33.489180847 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-lsp-server.new.32243/python-python-lsp-server.changes
     2023-01-20 17:38:49.612569901 +0100
@@ -1,0 +2,11 @@
+Thu Jan 19 10:10:31 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 1.7.1
+  * Fixes an error with the Pydocstyle 6.2.0+
+  * Includes missing Pylint "information" category.
+  * Improves Jedi file completions for directories.
+- Drop python-lsp-server-pr327-sys-executable.patch
+- Add pylsp-pr340-pydocstyle-6.3.patch
+  gh#python-lsp/python-lsp-server#340
+
+-------------------------------------------------------------------

Old:
----
  python-lsp-server-1.7.0.tar.gz
  python-lsp-server-pr327-sys-executable.patch

New:
----
  pylsp-pr340-pydocstyle-6.3.patch
  python-lsp-server-1.7.1.tar.gz

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

Other differences:
------------------
++++++ python-python-lsp-server.spec ++++++
--- /var/tmp/diff_new_pack.WQzToK/_old  2023-01-20 17:38:50.204573175 +0100
+++ /var/tmp/diff_new_pack.WQzToK/_new  2023-01-20 17:38:50.208573197 +0100
@@ -17,14 +17,14 @@
 
 
 Name:           python-python-lsp-server
-Version:        1.7.0
+Version:        1.7.1
 Release:        0
 Summary:        Python Language Server for the Language Server Protocol
 License:        MIT
 URL:            https://github.com/python-lsp/python-lsp-server
 Source:         
https://files.pythonhosted.org/packages/source/p/python-lsp-server/python-lsp-server-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM python-lsp-server-pr327-sys-executable.patch 
gh#python-lsp/python-lsp-server#327
-Patch1:         python-lsp-server-pr327-sys-executable.patch
+# PATCH-FIX-UPSTREAM pylsp-pr340-pydocstyle-6.3.patch 
gh#python-lsp/python-lsp-server#340
+Patch1:         pylsp-pr340-pydocstyle-6.3.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools >= 61.2}
@@ -43,13 +43,13 @@
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module pandas}
 BuildRequires:  %{python_module pluggy}
-BuildRequires:  %{python_module pydocstyle >= 2.0.0}
-BuildRequires:  %{python_module pylint >= 2.5.0}
+BuildRequires:  %{python_module pydocstyle >= 6.3.0 with %python-pydocstyle < 
6.4.0}
+BuildRequires:  %{python_module pylint >= 2.5.0 with %python-pylint < 3}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module python-lsp-jsonrpc >= 1.0.0}
 BuildRequires:  %{python_module rope >= 1.2.0}
 BuildRequires:  %{python_module ujson >= 3.0.0}
-BuildRequires:  %{python_module whatthepatch}
+BuildRequires:  %{python_module whatthepatch >= 1.0.2 with 
%python-whatthepatch < 2}
 BuildRequires:  %{python_module yapf}
 # /SECTION
 BuildRequires:  fdupes
@@ -61,11 +61,14 @@
 Requires:       (python-jedi >= 0.17.2 with python-jedi < 0.19.0)
 Suggests:       python-autopep8 >= 1.6.0
 Conflicts:      python-autopep8 >= 1.7.0
-Suggests:       python-pydocstyle >= 2.0.0
+Suggests:       python-pydocstyle >= 6.3.0
+Conflicts:      python-pydocstyle >= 6.4.0
 Suggests:       python-pylint >= 2.5.0
+Conflicts:      python-pylint >= 3
 Suggests:       python-rope >= 1.2.0
 Suggests:       python-yapf
-Suggests:       python-whatthepatch
+Suggests:       python-whatthepatch >= 1.0.2
+Conflicts:      python-whatthepatch >= 2
 # SECTION flake8 pins
 Suggests:       python-flake8 >= 5.0.0
 Conflicts:      python-flake8 >= 7

++++++ pylsp-pr340-pydocstyle-6.3.patch ++++++
diff --git a/pylsp/plugins/pydocstyle_lint.py b/pylsp/plugins/pydocstyle_lint.py
index 0aa72b7..2e34ccc 100644
--- a/pylsp/plugins/pydocstyle_lint.py
+++ b/pylsp/plugins/pydocstyle_lint.py
@@ -28,6 +28,7 @@ def pylsp_settings():
 
 @hookimpl
 def pylsp_lint(config, workspace, document):
+    # pylint: disable=too-many-locals
     with workspace.report_progress("lint: pydocstyle"):
         settings = config.plugin_settings('pydocstyle', 
document_path=document.path)
         log.debug("Got pydocstyle settings: %s", settings)
@@ -66,9 +67,19 @@ def pylsp_lint(config, workspace, document):
 
         # Will only yield a single filename, the document path
         diags = []
-        for filename, checked_codes, ignore_decorators, property_decorators in 
conf.get_files_to_check():
+        for (
+            filename,
+            checked_codes,
+            ignore_decorators,
+            property_decorators,
+            ignore_self_only_init,
+        ) in conf.get_files_to_check():
             errors = pydocstyle.checker.ConventionChecker().check_source(
-                document.source, filename, 
ignore_decorators=ignore_decorators, property_decorators=property_decorators
+                document.source,
+                filename,
+                ignore_decorators=ignore_decorators,
+                property_decorators=property_decorators,
+                ignore_self_only_init=ignore_self_only_init,
             )
 
             try:
diff --git a/pyproject.toml b/pyproject.toml
index 8d38434..841638a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,7 +31,7 @@ all = [
     "flake8>=5.0.0,<7",
     "mccabe>=0.7.0,<0.8.0",
     "pycodestyle>=2.9.0,<2.11.0",
-    "pydocstyle>=6.2.0,<6.3.0",
+    "pydocstyle>=6.3.0,<6.4.0",
     "pyflakes>=2.5.0,<3.1.0",
     "pylint>=2.5.0,<3",
     "rope>1.2.0",
@@ -42,7 +42,7 @@ autopep8 = ["autopep8>=1.6.0,<1.7.0"]
 flake8 = ["flake8>=5.0.0,<7"]
 mccabe = ["mccabe>=0.7.0,<0.8.0"]
 pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"]
-pydocstyle = ["pydocstyle>=6.2.0,<6.3.0"]
+pydocstyle = ["pydocstyle>=6.3.0,<6.4.0"]
 pyflakes = ["pyflakes>=2.5.0,<3.1.0"]
 pylint = ["pylint>=2.5.0,<3"]
 rope = ["rope>1.2.0"]

++++++ python-lsp-server-1.7.0.tar.gz -> python-lsp-server-1.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.0/CHANGELOG.md 
new/python-lsp-server-1.7.1/CHANGELOG.md
--- old/python-lsp-server-1.7.0/CHANGELOG.md    2022-12-29 20:47:20.000000000 
+0100
+++ new/python-lsp-server-1.7.1/CHANGELOG.md    2023-01-18 00:22:26.000000000 
+0100
@@ -1,5 +1,26 @@
 # History of changes
 
+## Version 1.7.1 (2023/01/17)
+
+### Issues Closed
+
+* [Issue 332](https://github.com/python-lsp/python-lsp-server/issues/332) - 
Failed to load hook pylsp_lint: too many values to unpack (expected 3) ([PR 
329](https://github.com/python-lsp/python-lsp-server/pull/329) by 
[@ccordoba12](https://github.com/ccordoba12))
+
+In this release 1 issue was closed.
+
+### Pull Requests Merged
+
+* [PR 338](https://github.com/python-lsp/python-lsp-server/pull/338) - Use 
shlex.split() to split pylint flags, by 
[@hfrentzel](https://github.com/hfrentzel)
+* [PR 337](https://github.com/python-lsp/python-lsp-server/pull/337) - Improve 
Jedi file completions for directories, by 
[@ccordoba12](https://github.com/ccordoba12)
+* [PR 334](https://github.com/python-lsp/python-lsp-server/pull/334) - Include 
missing Pylint "information" category, by 
[@juliangilbey](https://github.com/juliangilbey)
+* [PR 333](https://github.com/python-lsp/python-lsp-server/pull/333) - Add top 
constraint to Pylint and fix constraint for `whatthepatch`, by 
[@ccordoba12](https://github.com/ccordoba12)
+* [PR 329](https://github.com/python-lsp/python-lsp-server/pull/329) - Fix 
pydocstyle linting with its 6.2.0 version, by 
[@ccordoba12](https://github.com/ccordoba12) 
([332](https://github.com/python-lsp/python-lsp-server/issues/332))
+* [PR 327](https://github.com/python-lsp/python-lsp-server/pull/327) - Use 
`sys.executable` instead of `python` in Pylint plugin, by 
[@bnavigator](https://github.com/bnavigator)
+
+In this release 6 pull requests were closed.
+
+----
+
 ## Version 1.7.0 (2022/12/29)
 
 ### New features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.0/PKG-INFO 
new/python-lsp-server-1.7.1/PKG-INFO
--- old/python-lsp-server-1.7.0/PKG-INFO        2022-12-29 20:51:44.640734400 
+0100
+++ new/python-lsp-server-1.7.1/PKG-INFO        2023-01-18 00:25:16.623891800 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-lsp-server
-Version: 1.7.0
+Version: 1.7.1
 Summary: Python Language Server for the Language Server Protocol
 Author: Python Language Server Contributors
 License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.0/pylsp/_version.py 
new/python-lsp-server-1.7.1/pylsp/_version.py
--- old/python-lsp-server-1.7.0/pylsp/_version.py       2022-12-29 
20:51:44.000000000 +0100
+++ new/python-lsp-server-1.7.1/pylsp/_version.py       2023-01-18 
00:25:16.000000000 +0100
@@ -1 +1 @@
-__version__ = "1.7.0"
+__version__ = "1.7.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.0/pylsp/plugins/jedi_completion.py 
new/python-lsp-server-1.7.1/pylsp/plugins/jedi_completion.py
--- old/python-lsp-server-1.7.0/pylsp/plugins/jedi_completion.py        
2022-12-11 18:32:03.000000000 +0100
+++ new/python-lsp-server-1.7.1/pylsp/plugins/jedi_completion.py        
2023-01-18 00:05:07.000000000 +0100
@@ -2,7 +2,7 @@
 # Copyright 2021- Python Language Server Contributors.
 
 import logging
-import os.path as osp
+import os
 
 import parso
 
@@ -219,10 +219,20 @@
     if resolve:
         completion = _resolve_completion(completion, d, markup_kind)
 
+    # Adjustments for file completions
     if d.type == 'path':
-        path = osp.normpath(d.name)
+        path = os.path.normpath(d.name)
         path = path.replace('\\', '\\\\')
         path = path.replace('/', '\\/')
+
+        # If the completion ends with os.sep, it means it's a directory. So we 
add an escaped os.sep
+        # at the end to ease additional file completions.
+        if d.name.endswith(os.sep):
+            if os.name == 'nt':
+                path = path + '\\\\'
+            else:
+                path = path + '\\/'
+
         completion['insertText'] = path
 
     if include_params and not is_exception_class(d.name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.0/pylsp/plugins/pydocstyle_lint.py 
new/python-lsp-server-1.7.1/pylsp/plugins/pydocstyle_lint.py
--- old/python-lsp-server-1.7.0/pylsp/plugins/pydocstyle_lint.py        
2022-12-11 18:32:03.000000000 +0100
+++ new/python-lsp-server-1.7.1/pylsp/plugins/pydocstyle_lint.py        
2023-01-05 01:05:39.000000000 +0100
@@ -66,9 +66,9 @@
 
         # Will only yield a single filename, the document path
         diags = []
-        for filename, checked_codes, ignore_decorators in 
conf.get_files_to_check():
+        for filename, checked_codes, ignore_decorators, property_decorators in 
conf.get_files_to_check():
             errors = pydocstyle.checker.ConventionChecker().check_source(
-                document.source, filename, ignore_decorators=ignore_decorators
+                document.source, filename, 
ignore_decorators=ignore_decorators, property_decorators=property_decorators
             )
 
             try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.0/pylsp/plugins/pylint_lint.py 
new/python-lsp-server-1.7.1/pylsp/plugins/pylint_lint.py
--- old/python-lsp-server-1.7.0/pylsp/plugins/pylint_lint.py    2022-12-29 
16:51:51.000000000 +0100
+++ new/python-lsp-server-1.7.1/pylsp/plugins/pylint_lint.py    2023-01-18 
00:05:07.000000000 +0100
@@ -9,6 +9,7 @@
 import re
 from subprocess import Popen, PIPE
 import os
+import shlex
 
 from pylsp import hookimpl, lsp
 
@@ -85,13 +86,13 @@
             return cls.last_diags[document.path]
 
         cmd = [
-            'python',
+            sys.executable,
             '-c',
             'import sys; from pylint.lint import Run; Run(sys.argv[1:])',
             '-f',
             'json',
             document.path
-        ] + (str(flags).split(' ') if flags else [])
+        ] + (shlex.split(str(flags)) if flags else [])
         log.debug("Calling pylint with '%s'", ' '.join(cmd))
 
         with Popen(cmd, stdout=PIPE, stderr=PIPE,
@@ -126,6 +127,7 @@
         # The type can be any of:
         #
         #  * convention
+        #  * information
         #  * error
         #  * fatal
         #  * refactor
@@ -151,6 +153,8 @@
 
             if diag['type'] == 'convention':
                 severity = lsp.DiagnosticSeverity.Information
+            elif diag['type'] == 'information':
+                severity = lsp.DiagnosticSeverity.Information
             elif diag['type'] == 'error':
                 severity = lsp.DiagnosticSeverity.Error
             elif diag['type'] == 'fatal':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.0/pyproject.toml 
new/python-lsp-server-1.7.1/pyproject.toml
--- old/python-lsp-server-1.7.0/pyproject.toml  2022-12-26 17:56:58.000000000 
+0100
+++ new/python-lsp-server-1.7.1/pyproject.toml  2023-01-07 00:50:19.000000000 
+0100
@@ -31,25 +31,25 @@
     "flake8>=5.0.0,<7",
     "mccabe>=0.7.0,<0.8.0",
     "pycodestyle>=2.9.0,<2.11.0",
-    "pydocstyle>=2.0.0",
+    "pydocstyle>=6.2.0,<6.3.0",
     "pyflakes>=2.5.0,<3.1.0",
-    "pylint>=2.5.0",
+    "pylint>=2.5.0,<3",
     "rope>1.2.0",
     "yapf",
-    "whatthepatch"
+    "whatthepatch>=1.0.2,<2.0.0"
 ]
 autopep8 = ["autopep8>=1.6.0,<1.7.0"]
 flake8 = ["flake8>=5.0.0,<7"]
 mccabe = ["mccabe>=0.7.0,<0.8.0"]
 pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"]
-pydocstyle = ["pydocstyle>=2.0.0"]
+pydocstyle = ["pydocstyle>=6.2.0,<6.3.0"]
 pyflakes = ["pyflakes>=2.5.0,<3.1.0"]
-pylint = ["pylint>=2.5.0"]
+pylint = ["pylint>=2.5.0,<3"]
 rope = ["rope>1.2.0"]
 yapf = ["yapf", "whatthepatch>=1.0.2,<2.0.0"]
 websockets = ["websockets>=10.3"]
 test = [
-    "pylint>=2.5.0",
+    "pylint>=2.5.0,<3",
     "pytest",
     "pytest-cov",
     "coverage",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.0/python_lsp_server.egg-info/PKG-INFO 
new/python-lsp-server-1.7.1/python_lsp_server.egg-info/PKG-INFO
--- old/python-lsp-server-1.7.0/python_lsp_server.egg-info/PKG-INFO     
2022-12-29 20:51:44.000000000 +0100
+++ new/python-lsp-server-1.7.1/python_lsp_server.egg-info/PKG-INFO     
2023-01-18 00:25:16.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-lsp-server
-Version: 1.7.0
+Version: 1.7.1
 Summary: Python Language Server for the Language Server Protocol
 Author: Python Language Server Contributors
 License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.0/python_lsp_server.egg-info/requires.txt 
new/python-lsp-server-1.7.1/python_lsp_server.egg-info/requires.txt
--- old/python-lsp-server-1.7.0/python_lsp_server.egg-info/requires.txt 
2022-12-29 20:51:44.000000000 +0100
+++ new/python-lsp-server-1.7.1/python_lsp_server.egg-info/requires.txt 
2023-01-18 00:25:16.000000000 +0100
@@ -10,12 +10,12 @@
 flake8<7,>=5.0.0
 mccabe<0.8.0,>=0.7.0
 pycodestyle<2.11.0,>=2.9.0
-pydocstyle>=2.0.0
+pydocstyle<6.3.0,>=6.2.0
 pyflakes<3.1.0,>=2.5.0
-pylint>=2.5.0
+pylint<3,>=2.5.0
 rope>1.2.0
 yapf
-whatthepatch
+whatthepatch<2.0.0,>=1.0.2
 
 [autopep8]
 autopep8<1.7.0,>=1.6.0
@@ -30,19 +30,19 @@
 pycodestyle<2.11.0,>=2.9.0
 
 [pydocstyle]
-pydocstyle>=2.0.0
+pydocstyle<6.3.0,>=6.2.0
 
 [pyflakes]
 pyflakes<3.1.0,>=2.5.0
 
 [pylint]
-pylint>=2.5.0
+pylint<3,>=2.5.0
 
 [rope]
 rope>1.2.0
 
 [test]
-pylint>=2.5.0
+pylint<3,>=2.5.0
 pytest
 pytest-cov
 coverage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.0/test/plugins/test_completion.py 
new/python-lsp-server-1.7.1/test/plugins/test_completion.py
--- old/python-lsp-server-1.7.0/test/plugins/test_completion.py 2022-12-11 
18:32:03.000000000 +0100
+++ new/python-lsp-server-1.7.1/test/plugins/test_completion.py 2023-01-18 
00:05:07.000000000 +0100
@@ -528,3 +528,26 @@
     com_position = {'line': 1, 'character': 10}
     completions = pylsp_jedi_completions(doc._config, doc, com_position)
     assert completions[0]['label'] == 'foo()'
+
+
+def test_file_completions(workspace, tmpdir):
+    # Create directory and a file to get completions for them.
+    # Note: `tmpdir`` is the root dir of the `workspace` fixture. That's why 
we use
+    # it here.
+    tmpdir.mkdir('bar')
+    file = tmpdir.join('foo.txt')
+    file.write('baz')
+
+    # Content of doc to test completion
+    doc_content = '"'
+    doc = Document(DOC_URI, workspace, doc_content)
+
+    # Request for completions
+    com_position = {'line': 0, 'character': 1}
+    completions = pylsp_jedi_completions(doc._config, doc, com_position)
+
+    # Check completions
+    assert len(completions) == 2
+    assert [c['kind'] == lsp.CompletionItemKind.File for c in completions]
+    assert completions[0]['insertText'] == ('bar' + '\\\\') if os.name == 'nt' 
else ('bar' + '\\/')
+    assert completions[1]['insertText'] == 'foo.txt"'

Reply via email to