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-07-01 23:18:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-lsp-server (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-lsp-server.new.13546 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-lsp-server"

Sat Jul  1 23:18:31 2023 rev:23 rq:1096293 version:1.7.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-lsp-server/python-python-lsp-server.changes
        2023-05-10 16:18:14.898876685 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-lsp-server.new.13546/python-python-lsp-server.changes
     2023-07-01 23:18:37.162464639 +0200
@@ -1,0 +2,12 @@
+Sat Jul  1 13:38:40 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 1.7.4
+  * Fixes token initialization when reporting progress.
+  * Resolves home dir references in Jedi environment path.
+  * Fixes Pylint hanging on files with many errors.
+- Release 1.7.3
+  * Adds support for Yapf 0.33
+    (upstreamed python-lsp-server-pr377-unpin-yapf.patch)
+  * Fix an empty current working directory value for Pylint
+
+-------------------------------------------------------------------

Old:
----
  python-lsp-server-1.7.2.tar.gz
  python-lsp-server-pr377-unpin-yapf.patch

New:
----
  python-lsp-server-1.7.4.tar.gz

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

Other differences:
------------------
++++++ python-python-lsp-server.spec ++++++
--- /var/tmp/diff_new_pack.l2owbz/_old  2023-07-01 23:18:37.974469506 +0200
+++ /var/tmp/diff_new_pack.l2owbz/_new  2023-07-01 23:18:37.978469530 +0200
@@ -17,14 +17,12 @@
 
 
 Name:           python-python-lsp-server
-Version:        1.7.2
+Version:        1.7.4
 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-pr377-unpin-yapf.patch 
gh#python-lsp/python-lsp-server#377
-Patch0:         python-lsp-server-pr377-unpin-yapf.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools >= 61.2}

++++++ python-lsp-server-1.7.2.tar.gz -> python-lsp-server-1.7.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/CHANGELOG.md 
new/python-lsp-server-1.7.4/CHANGELOG.md
--- old/python-lsp-server-1.7.2/CHANGELOG.md    2023-04-03 03:18:18.000000000 
+0200
+++ new/python-lsp-server-1.7.4/CHANGELOG.md    2023-06-29 19:09:22.000000000 
+0200
@@ -1,5 +1,41 @@
 # History of changes
 
+## Version 1.7.4 (2023/06/29)
+
+### Issues Closed
+
+* [Issue 393](https://github.com/python-lsp/python-lsp-server/issues/393) - 
Environment path doesn't expand user directory
+
+In this release 1 issue was closed.
+
+### Pull Requests Merged
+
+* [PR 394](https://github.com/python-lsp/python-lsp-server/pull/394) - Resolve 
homedir references in Jedi environment path, by 
[@odiroot](https://github.com/odiroot)
+* [PR 381](https://github.com/python-lsp/python-lsp-server/pull/381) - Report 
progress even when initialization fails, by [@syphar](https://github.com/syphar)
+* [PR 380](https://github.com/python-lsp/python-lsp-server/pull/380) - Fix 
pylint hang on file with many errors, by 
[@hetmankp](https://github.com/hetmankp)
+
+In this release 3 pull requests were closed.
+
+----
+
+## Version 1.7.3 (2023/05/15)
+
+### Issues Closed
+
+* [Issue 369](https://github.com/python-lsp/python-lsp-server/issues/369) - 
Failed to load hook pylsp_lint: [Errno 2] No such file or directory: '' ([PR 
371](https://github.com/python-lsp/python-lsp-server/pull/371) by 
[@Ultimator14](https://github.com/Ultimator14))
+
+In this release 1 issue was closed.
+
+### Pull Requests Merged
+
+* [PR 377](https://github.com/python-lsp/python-lsp-server/pull/377) - Update 
yapf requirement to 0.33+, by [@bnavigator](https://github.com/bnavigator)
+* [PR 371](https://github.com/python-lsp/python-lsp-server/pull/371) - Fix 
empty cwd value for pylint, by [@Ultimator14](https://github.com/Ultimator14) 
([369](https://github.com/python-lsp/python-lsp-server/issues/369))
+* [PR 364](https://github.com/python-lsp/python-lsp-server/pull/364) - Add 
Arch Linux installation command to Readme, by 
[@GNVageesh](https://github.com/GNVageesh)
+
+In this release 3 pull requests were closed.
+
+----
+
 ## Version 1.7.2 (2023/04/02)
 
 ### Issues Closed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/PKG-INFO 
new/python-lsp-server-1.7.4/PKG-INFO
--- old/python-lsp-server-1.7.2/PKG-INFO        2023-04-03 03:21:16.750254000 
+0200
+++ new/python-lsp-server-1.7.4/PKG-INFO        2023-06-29 19:12:25.935712300 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-lsp-server
-Version: 1.7.2
+Version: 1.7.4
 Summary: Python Language Server for the Language Server Protocol
 Author: Python Language Server Contributors
 License: MIT
@@ -88,6 +88,12 @@
 sudo dnf install python-lsp-server
 ```
 
+or Arch Linux
+
+```
+sudo pacman -S python-lsp-server
+````
+
 Only on Alpine Linux the package is named differently. You can install it 
there by typing this command in your terminal:
 
 ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/README.md 
new/python-lsp-server-1.7.4/README.md
--- old/python-lsp-server-1.7.2/README.md       2022-12-18 04:24:12.000000000 
+0100
+++ new/python-lsp-server-1.7.4/README.md       2023-05-15 13:24:53.000000000 
+0200
@@ -65,6 +65,12 @@
 sudo dnf install python-lsp-server
 ```
 
+or Arch Linux
+
+```
+sudo pacman -S python-lsp-server
+````
+
 Only on Alpine Linux the package is named differently. You can install it 
there by typing this command in your terminal:
 
 ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/pylsp/_version.py 
new/python-lsp-server-1.7.4/pylsp/_version.py
--- old/python-lsp-server-1.7.2/pylsp/_version.py       2023-04-03 
03:21:16.000000000 +0200
+++ new/python-lsp-server-1.7.4/pylsp/_version.py       2023-06-29 
19:12:25.000000000 +0200
@@ -1 +1 @@
-__version__ = "1.7.2"
+__version__ = "1.7.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.2/pylsp/plugins/_rope_task_handle.py 
new/python-lsp-server-1.7.4/pylsp/plugins/_rope_task_handle.py
--- old/python-lsp-server-1.7.2/pylsp/plugins/_rope_task_handle.py      
2022-12-11 18:32:03.000000000 +0100
+++ new/python-lsp-server-1.7.4/pylsp/plugins/_rope_task_handle.py      
2023-06-29 18:58:38.000000000 +0200
@@ -76,7 +76,9 @@
         self.observers = []
 
     def create_jobset(self, name="JobSet", count: Optional[int] = None):
-        report_iter = self.workspace.report_progress(name, None, None)
+        report_iter = self.workspace.report_progress(
+            name, None, None, skip_token_initialization=True
+        )
         result = PylspJobSet(count, report_iter)
         self.job_sets.append(result)
         self._inform_observers()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/pylsp/plugins/pylint_lint.py 
new/python-lsp-server-1.7.4/pylsp/plugins/pylint_lint.py
--- old/python-lsp-server-1.7.2/pylsp/plugins/pylint_lint.py    2023-03-18 
19:10:05.000000000 +0100
+++ new/python-lsp-server-1.7.4/pylsp/plugins/pylint_lint.py    2023-06-29 
18:58:38.000000000 +0200
@@ -48,7 +48,7 @@
     last_diags = collections.defaultdict(list)
 
     @classmethod
-    def lint(cls, document, is_saved, flags=''):
+    def lint(cls, document, is_saved, flags=''):  # pylint: 
disable=too-many-locals,too-many-branches
         """Plugin interface to pylsp linter.
 
         Args:
@@ -95,11 +95,13 @@
         ] + (shlex.split(str(flags)) if flags else [])
         log.debug("Calling pylint with '%s'", ' '.join(cmd))
 
+        cwd = document._workspace.root_path
+        if not cwd:
+            cwd = os.path.dirname(__file__)
+
         with Popen(cmd, stdout=PIPE, stderr=PIPE,
-                   cwd=document._workspace.root_path, universal_newlines=True) 
as process:
-            process.wait()
-            json_out = process.stdout.read()
-            err = process.stderr.read()
+                   cwd=cwd, universal_newlines=True) as process:
+            json_out, err = process.communicate()
 
         if err != '':
             log.error("Error calling pylint: '%s'", err)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/pylsp/workspace.py 
new/python-lsp-server-1.7.4/pylsp/workspace.py
--- old/python-lsp-server-1.7.2/pylsp/workspace.py      2023-04-03 
03:06:12.000000000 +0200
+++ new/python-lsp-server-1.7.4/pylsp/workspace.py      2023-06-29 
18:58:38.000000000 +0200
@@ -135,7 +135,20 @@
         title: str,
         message: Optional[str] = None,
         percentage: Optional[int] = None,
+        skip_token_initialization: bool = False,
     ) -> Generator[Callable[[str, Optional[int]], None], None, None]:
+        """
+        Report progress to the editor / client.
+
+        ``skip_token_initialization` is necessary due to some current
+        limitations of our LSP implementation. When `report_progress`
+        is used from a synchronous LSP handler, the token initialization
+        will time out because we can't receive the response.
+
+        Many editors will still correctly show the progress messages though, 
which
+        is why we are giving progress users the option to skip the 
initialization
+        of the progress token.
+        """
         if self._config:
             client_supports_progress_reporting = (
                 self._config.capabilities.get("window", 
{}).get("workDoneProgress", False)
@@ -144,30 +157,21 @@
             client_supports_progress_reporting = False
 
         if client_supports_progress_reporting:
-            try:
-                token = self._progress_begin(title, message, percentage)
-            except Exception:  # pylint: disable=broad-exception-caught
-                log.warning(
-                    "There was an error while trying to initialize progress 
reporting."
-                    "Likely progress reporting was used in a synchronous LSP 
handler, "
-                    "which is not supported by progress reporting yet.",
-                    exc_info=True
-                )
+            token = self._progress_begin(title, message, percentage, 
skip_token_initialization)
 
-            else:
-                def progress_message(message: str, percentage: Optional[int] = 
None) -> None:
-                    self._progress_report(token, message, percentage)
-
-                try:
-                    yield progress_message
-                finally:
-                    self._progress_end(token)
+            def progress_message(message: str, percentage: Optional[int] = 
None) -> None:
+                self._progress_report(token, message, percentage)
 
-                return
+            try:
+                yield progress_message
+            finally:
+                self._progress_end(token)
+
+            return
 
         # FALLBACK:
-        # If the client doesn't support progress reporting, or if we failed to
-        # initialize it, we have a dummy method for the caller to use.
+        # If the client doesn't support progress reporting, we have a dummy 
method
+        # for the caller to use.
         def dummy_progress_message(message: str, percentage: Optional[int] = 
None) -> None:
             # pylint: disable=unused-argument
             pass
@@ -179,10 +183,23 @@
         title: str,
         message: Optional[str] = None,
         percentage: Optional[int] = None,
+        skip_token_initialization: bool = False,
     ) -> str:
         token = str(uuid.uuid4())
 
-        self._endpoint.request(self.M_INITIALIZE_PROGRESS, {'token': 
token}).result(timeout=1.0)
+        if not skip_token_initialization:
+            try:
+                self._endpoint.request(self.M_INITIALIZE_PROGRESS, {'token': 
token}).result(timeout=1.0)
+            except Exception:  # pylint: disable=broad-exception-caught
+                log.warning(
+                    "There was an error while trying to initialize progress 
reporting."
+                    "Likely progress reporting was used in a synchronous LSP 
handler, "
+                    "which is not supported by progress reporting yet. "
+                    "To prevent waiting for the timeout you can set "
+                    "`skip_token_initialization=True`. "
+                    "Not every editor will show progress then, but many will.",
+                    exc_info=True
+                )
 
         value = {
             "kind": "begin",
@@ -389,6 +406,11 @@
             jedi.settings.auto_import_modules = 
jedi_settings.get('auto_import_modules',
                                                                   
DEFAULT_AUTO_IMPORT_MODULES)
             environment_path = jedi_settings.get('environment')
+            # Jedi itself cannot deal with homedir-relative paths.
+            # On systems, where it is expected, expand the home directory.
+            if environment_path and os.name != 'nt':
+                environment_path = os.path.expanduser(environment_path)
+
             extra_paths = jedi_settings.get('extra_paths') or []
             env_vars = jedi_settings.get('env_vars')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/pyproject.toml 
new/python-lsp-server-1.7.4/pyproject.toml
--- old/python-lsp-server-1.7.2/pyproject.toml  2023-03-18 19:10:05.000000000 
+0100
+++ new/python-lsp-server-1.7.4/pyproject.toml  2023-05-15 13:24:53.000000000 
+0200
@@ -35,8 +35,7 @@
     "pyflakes>=2.5.0,<3.1.0",
     "pylint>=2.5.0,<3",
     "rope>1.2.0",
-    "yapf<=0.32.0",
-    "toml",
+    "yapf>=0.33.0",
     "whatthepatch>=1.0.2,<2.0.0"
 ]
 autopep8 = ["autopep8>=1.6.0,<2.1.0"]
@@ -47,7 +46,7 @@
 pyflakes = ["pyflakes>=2.5.0,<3.1.0"]
 pylint = ["pylint>=2.5.0,<3"]
 rope = ["rope>1.2.0"]
-yapf = ["yapf<=0.32.0", "whatthepatch>=1.0.2,<2.0.0", "toml"]
+yapf = ["yapf>=0.33.0", "whatthepatch>=1.0.2,<2.0.0"]
 websockets = ["websockets>=10.3"]
 test = [
     "pylint>=2.5.0,<3",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.2/python_lsp_server.egg-info/PKG-INFO 
new/python-lsp-server-1.7.4/python_lsp_server.egg-info/PKG-INFO
--- old/python-lsp-server-1.7.2/python_lsp_server.egg-info/PKG-INFO     
2023-04-03 03:21:16.000000000 +0200
+++ new/python-lsp-server-1.7.4/python_lsp_server.egg-info/PKG-INFO     
2023-06-29 19:12:25.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-lsp-server
-Version: 1.7.2
+Version: 1.7.4
 Summary: Python Language Server for the Language Server Protocol
 Author: Python Language Server Contributors
 License: MIT
@@ -88,6 +88,12 @@
 sudo dnf install python-lsp-server
 ```
 
+or Arch Linux
+
+```
+sudo pacman -S python-lsp-server
+````
+
 Only on Alpine Linux the package is named differently. You can install it 
there by typing this command in your terminal:
 
 ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-lsp-server-1.7.2/python_lsp_server.egg-info/requires.txt 
new/python-lsp-server-1.7.4/python_lsp_server.egg-info/requires.txt
--- old/python-lsp-server-1.7.2/python_lsp_server.egg-info/requires.txt 
2023-04-03 03:21:16.000000000 +0200
+++ new/python-lsp-server-1.7.4/python_lsp_server.egg-info/requires.txt 
2023-06-29 19:12:25.000000000 +0200
@@ -14,8 +14,7 @@
 pyflakes<3.1.0,>=2.5.0
 pylint<3,>=2.5.0
 rope>1.2.0
-yapf<=0.32.0
-toml
+yapf>=0.33.0
 whatthepatch<2.0.0,>=1.0.2
 
 [autopep8]
@@ -57,6 +56,5 @@
 websockets>=10.3
 
 [yapf]
-yapf<=0.32.0
+yapf>=0.33.0
 whatthepatch<2.0.0,>=1.0.2
-toml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-lsp-server-1.7.2/test/test_workspace.py 
new/python-lsp-server-1.7.4/test/test_workspace.py
--- old/python-lsp-server-1.7.2/test/test_workspace.py  2023-04-03 
03:06:12.000000000 +0200
+++ new/python-lsp-server-1.7.4/test/test_workspace.py  2023-06-29 
18:58:38.000000000 +0200
@@ -327,19 +327,24 @@
 
 
 @pytest.mark.parametrize("exc", [Exception("something"), TimeoutError()])
-def test_progress_initialization_fails(workspace, consumer, endpoint, exc):
+def test_progress_initialization_fails_but_is_skipped(workspace, consumer, 
endpoint, exc):
     def failing_token_initialization(self, *_args, **_kwargs):
         raise exc
     endpoint._dispatcher.m_window__work_done_progress__create = 
failing_token_initialization
 
     workspace._config.capabilities['window'] = {"workDoneProgress": True}
 
-    with workspace.report_progress("some_title"):
+    with workspace.report_progress("some_title", 
skip_token_initialization=True):
         pass
 
     # we only see the failing token initialization call, no other calls
-    init_call, = consumer.call_args_list
-    assert init_call[0][0]['method'] == 'window/workDoneProgress/create'
+    progress_calls = consumer.call_args_list
+    assert all(call[0][0]["method"] == "$/progress" for call in progress_calls)
+    assert len({call[0][0]["params"]["token"] for call in progress_calls}) == 1
+    assert [call[0][0]["params"]["value"] for call in progress_calls] == [
+        {"kind": "begin", "title": "some_title"},
+        {"kind": "end"},
+    ]
 
 
 def test_progress_with_percent(workspace, consumer):

Reply via email to