Hello community,

here is the log from the commit of package python-python-language-server for 
openSUSE:Factory checked in at 2020-09-21 17:31:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-language-server (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-language-server.new.4249 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-language-server"

Mon Sep 21 17:31:19 2020 rev:12 rq:835432 version:0.35.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-language-server/python-python-language-server.changes
      2020-07-05 01:23:34.645973576 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-language-server.new.4249/python-python-language-server.changes
    2020-09-21 17:39:03.292702190 +0200
@@ -1,0 +2,8 @@
+Fri Sep 11 12:05:03 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- Update to Version 0.35.0
+  * Allow usage of Pylint via stdin.
+  * Require python-jsonrpc-server >= 0.4.0
+  * Update ujson dependency to work with its latest release.
+
+-------------------------------------------------------------------

Old:
----
  python-language-server-0.34.1.tar.gz

New:
----
  python-language-server-0.35.0.tar.gz

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

Other differences:
------------------
++++++ python-python-language-server.spec ++++++
--- /var/tmp/diff_new_pack.Hbfhwy/_old  2020-09-21 17:39:10.404707346 +0200
+++ /var/tmp/diff_new_pack.Hbfhwy/_new  2020-09-21 17:39:10.404707346 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-python-language-server
-Version:        0.34.1
+Version:        0.35.0
 Release:        0
 Summary:        Python Language Server for the Language Server Protocol
 License:        MIT
@@ -44,7 +44,7 @@
 BuildRequires:  python-rpm-macros
 Requires:       python-jedi >= 0.17
 Requires:       python-pluggy
-Requires:       python-python-jsonrpc-server >= 0.3.2
+Requires:       python-python-jsonrpc-server >= 0.4.0
 Requires:       python-setuptools
 Recommends:     python-autopep8
 Recommends:     python-flake8 >= 3.8.0
@@ -56,12 +56,13 @@
 Recommends:     python-rope >= 0.10.5
 BuildArch:      noarch
 # SECTION test requirements
+BuildRequires:  %{python_module flaky}
 BuildRequires:  %{python_module future >= 0.14.0}
 BuildRequires:  %{python_module jedi >= 0.17}
 BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pluggy}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module python-jsonrpc-server >= 0.3.2}
+BuildRequires:  %{python_module python-jsonrpc-server >= 0.4.0}
 %if %{with python2}
 BuildRequires:  python2-backports.functools_lru_cache
 BuildRequires:  python2-configparser
@@ -93,8 +94,6 @@
 %prep
 %setup -q -n python-language-server-%{version}
 %autopatch -p1
-# Unpin software that has newer versions on Tumbleweed
-sed -i "s/'ujson<=.*'/'ujson'/" setup.py
 
 %build
 %python_build

++++++ python-language-server-0.34.1.tar.gz -> 
python-language-server-0.35.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-language-server-0.34.1/PKG-INFO 
new/python-language-server-0.35.0/PKG-INFO
--- old/python-language-server-0.34.1/PKG-INFO  2020-07-02 18:36:00.000000000 
+0200
+++ new/python-language-server-0.35.0/PKG-INFO  2020-09-11 03:25:19.052842600 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-language-server
-Version: 0.34.1
+Version: 0.35.0
 Summary: Python Language Server for the Language Server Protocol
 Home-page: https://github.com/palantir/python-language-server
 Author: Palantir Technologies, Inc.
@@ -8,11 +8,14 @@
 Description: Python Language Server
         ======================
         
-        .. image:: 
https://circleci.com/gh/palantir/python-language-server.svg?style=shield
-            :target: https://circleci.com/gh/palantir/python-language-server
+        .. image:: 
https://github.com/palantir/python-language-server/workflows/Linux%20tests/badge.svg
+            :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Linux+tests%22
         
-        .. image:: 
https://ci.appveyor.com/api/projects/status/mdacv6fnif7wonl0?svg=true
-            :target: 
https://ci.appveyor.com/project/gatesn/python-language-server
+        .. image:: 
https://github.com/palantir/python-language-server/workflows/Mac%20tests/badge.svg
+            :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Mac+tests%22
+        
+        .. image:: 
https://github.com/palantir/python-language-server/workflows/Windows%20tests/badge.svg
+            :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Windows+tests%22
         
         .. image:: 
https://img.shields.io/github/license/palantir/python-language-server.svg
              :target: 
https://github.com/palantir/python-language-server/blob/master/LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-language-server-0.34.1/README.rst 
new/python-language-server-0.35.0/README.rst
--- old/python-language-server-0.34.1/README.rst        2020-07-02 
18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/README.rst        2020-09-11 
03:25:10.000000000 +0200
@@ -1,11 +1,14 @@
 Python Language Server
 ======================
 
-.. image:: 
https://circleci.com/gh/palantir/python-language-server.svg?style=shield
-    :target: https://circleci.com/gh/palantir/python-language-server
+.. image:: 
https://github.com/palantir/python-language-server/workflows/Linux%20tests/badge.svg
+    :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Linux+tests%22
 
-.. image:: 
https://ci.appveyor.com/api/projects/status/mdacv6fnif7wonl0?svg=true
-    :target: https://ci.appveyor.com/project/gatesn/python-language-server
+.. image:: 
https://github.com/palantir/python-language-server/workflows/Mac%20tests/badge.svg
+    :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Mac+tests%22
+
+.. image:: 
https://github.com/palantir/python-language-server/workflows/Windows%20tests/badge.svg
+    :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Windows+tests%22
 
 .. image:: 
https://img.shields.io/github/license/palantir/python-language-server.svg
      :target: 
https://github.com/palantir/python-language-server/blob/master/LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-language-server-0.34.1/pyls/_version.py 
new/python-language-server-0.35.0/pyls/_version.py
--- old/python-language-server-0.34.1/pyls/_version.py  2020-07-02 
18:36:00.000000000 +0200
+++ new/python-language-server-0.35.0/pyls/_version.py  2020-09-11 
03:25:19.056842800 +0200
@@ -8,11 +8,11 @@
 
 version_json = '''
 {
- "date": "2020-07-02T11:29:43-0500",
+ "date": "2020-09-10T20:08:36-0500",
  "dirty": false,
  "error": null,
- "full-revisionid": "78dee3d03fd6027804588fd204df06b2ac57d7d3",
- "version": "0.34.1"
+ "full-revisionid": "eb479ff2b214a13fd1c2fb1dcf2993a45c3bb830",
+ "version": "0.35.0"
 }
 '''  # END VERSION_JSON
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/pyls/plugins/definition.py 
new/python-language-server-0.35.0/pyls/plugins/definition.py
--- old/python-language-server-0.34.1/pyls/plugins/definition.py        
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/pyls/plugins/definition.py        
2020-09-11 03:25:10.000000000 +0200
@@ -16,7 +16,7 @@
 
     return [
         {
-            'uri': uris.uri_with(document.uri, path=d.module_path),
+            'uri': uris.uri_with(document.uri, path=str(d.module_path)),
             'range': {
                 'start': {'line': d.line - 1, 'character': d.column},
                 'end': {'line': d.line - 1, 'character': d.column + 
len(d.name)},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/pyls/plugins/highlight.py 
new/python-language-server-0.35.0/pyls/plugins/highlight.py
--- old/python-language-server-0.34.1/pyls/plugins/highlight.py 2020-07-02 
18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/pyls/plugins/highlight.py 2020-09-11 
03:25:10.000000000 +0200
@@ -14,7 +14,7 @@
         return definition.line is not None and definition.column is not None
 
     def local_to_document(definition):
-        return not definition.module_path or definition.module_path == 
document.path
+        return not definition.module_path or str(definition.module_path) == 
document.path
 
     return [{
         'range': {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/pyls/plugins/jedi_rename.py 
new/python-language-server-0.35.0/pyls/plugins/jedi_rename.py
--- old/python-language-server-0.34.1/pyls/plugins/jedi_rename.py       
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/pyls/plugins/jedi_rename.py       
2020-09-11 03:25:10.000000000 +0200
@@ -19,7 +19,7 @@
     log.debug('Finished rename: %s', refactoring.get_diff())
     changes = []
     for file_path, changed_file in refactoring.get_changed_files().items():
-        uri = uris.from_fs_path(file_path)
+        uri = uris.from_fs_path(str(file_path))
         doc = workspace.get_maybe_document(uri)
         changes.append({
             'textDocument': {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/pyls/plugins/pylint_lint.py 
new/python-language-server-0.35.0/pyls/plugins/pylint_lint.py
--- old/python-language-server-0.34.1/pyls/plugins/pylint_lint.py       
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/pyls/plugins/pylint_lint.py       
2020-09-11 03:25:10.000000000 +0200
@@ -3,6 +3,8 @@
 import collections
 import logging
 import sys
+import re
+from subprocess import Popen, PIPE
 
 from pylint.epylint import py_run
 from pyls import hookimpl, lsp
@@ -154,12 +156,149 @@
 def pyls_settings():
     # Default pylint to disabled because it requires a config
     # file to be useful.
-    return {'plugins': {'pylint': {'enabled': False, 'args': []}}}
+    return {'plugins': {'pylint': {
+        'enabled': False,
+        'args': [],
+        # disabled by default as it can slow down the workflow
+        'executable': None,
+    }}}
 
 
 @hookimpl
 def pyls_lint(config, document, is_saved):
+    """Run pylint linter."""
     settings = config.plugin_settings('pylint')
     log.debug("Got pylint settings: %s", settings)
+    # pylint >= 2.5.0 is required for working through stdin and only
+    # available with python3
+    if settings.get('executable') and sys.version_info[0] >= 3:
+        flags = build_args_stdio(settings)
+        pylint_executable = settings.get('executable', 'pylint')
+        return pylint_lint_stdin(pylint_executable, document, flags)
     flags = _build_pylint_flags(settings)
     return PylintLinter.lint(document, is_saved, flags=flags)
+
+
+def build_args_stdio(settings):
+    """Build arguments for calling pylint.
+
+    :param settings: client settings
+    :type settings: dict
+
+    :return: arguments to path to pylint
+    :rtype: list
+    """
+    pylint_args = settings.get('args')
+    if pylint_args is None:
+        return []
+    return pylint_args
+
+
+def pylint_lint_stdin(pylint_executable, document, flags):
+    """Run pylint linter from stdin.
+
+    This runs pylint in a subprocess with popen.
+    This allows passing the file from stdin and as a result
+    run pylint on unsaved files. Can slowdown the workflow.
+
+    :param pylint_executable: path to pylint executable
+    :type pylint_executable: string
+    :param document: document to run pylint on
+    :type document: pyls.workspace.Document
+    :param flags: arguments to path to pylint
+    :type flags: list
+
+    :return: linting diagnostics
+    :rtype: list
+    """
+    pylint_result = _run_pylint_stdio(pylint_executable, document, flags)
+    return _parse_pylint_stdio_result(document, pylint_result)
+
+
+def _run_pylint_stdio(pylint_executable, document, flags):
+    """Run pylint in popen.
+
+    :param pylint_executable: path to pylint executable
+    :type pylint_executable: string
+    :param document: document to run pylint on
+    :type document: pyls.workspace.Document
+    :param flags: arguments to path to pylint
+    :type flags: list
+
+    :return: result of calling pylint
+    :rtype: string
+    """
+    log.debug("Calling %s with args: '%s'", pylint_executable, flags)
+    try:
+        cmd = [pylint_executable]
+        cmd.extend(flags)
+        cmd.extend(['--from-stdin', document.path])
+        p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
+    except IOError:
+        log.debug("Can't execute %s. Trying with 'python -m pylint'", 
pylint_executable)
+        cmd = ['python', '-m', 'pylint']
+        cmd.extend(flags)
+        cmd.extend(['--from-stdin', document.path])
+        p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
+    (stdout, stderr) = p.communicate(document.source.encode())
+    if stderr:
+        log.error("Error while running pylint '%s'", stderr.decode())
+    return stdout.decode()
+
+
+def _parse_pylint_stdio_result(document, stdout):
+    """Parse pylint results.
+
+    :param document: document to run pylint on
+    :type document: pyls.workspace.Document
+    :param stdout: pylint results to parse
+    :type stdout: string
+
+    :return: linting diagnostics
+    :rtype: list
+    """
+    diagnostics = []
+    lines = stdout.splitlines()
+    for raw_line in lines:
+        parsed_line = re.match(r'(.*):(\d*):(\d*): (\w*): (.*)', raw_line)
+        if not parsed_line:
+            log.debug("Pylint output parser can't parse line '%s'", raw_line)
+            continue
+
+        parsed_line = parsed_line.groups()
+        if len(parsed_line) != 5:
+            log.debug("Pylint output parser can't parse line '%s'", raw_line)
+            continue
+
+        _, line, character, code, msg = parsed_line
+        line = int(line) - 1
+        character = int(character)
+        severity_map = {
+            'C': lsp.DiagnosticSeverity.Information,
+            'E': lsp.DiagnosticSeverity.Error,
+            'F': lsp.DiagnosticSeverity.Error,
+            'R': lsp.DiagnosticSeverity.Hint,
+            'W': lsp.DiagnosticSeverity.Warning,
+        }
+        severity = severity_map[code[0]]
+        diagnostics.append(
+            {
+                'source': 'pylint',
+                'code': code,
+                'range': {
+                    'start': {
+                        'line': line,
+                        'character': character
+                    },
+                    'end': {
+                        'line': line,
+                        # no way to determine the column
+                        'character': len(document.lines[line]) - 1
+                    }
+                },
+                'message': msg,
+                'severity': severity,
+            }
+        )
+
+    return diagnostics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/pyls/plugins/references.py 
new/python-language-server-0.35.0/pyls/plugins/references.py
--- old/python-language-server-0.34.1/pyls/plugins/references.py        
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/pyls/plugins/references.py        
2020-09-11 03:25:10.000000000 +0200
@@ -16,7 +16,7 @@
 
     # Filter out builtin modules
     return [{
-        'uri': uris.uri_with(document.uri, path=d.module_path) if 
d.module_path else document.uri,
+        'uri': uris.uri_with(document.uri, path=str(d.module_path)) if 
d.module_path else document.uri,
         'range': {
             'start': {'line': d.line - 1, 'character': d.column},
             'end': {'line': d.line - 1, 'character': d.column + len(d.name)}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/python_language_server.egg-info/PKG-INFO 
new/python-language-server-0.35.0/python_language_server.egg-info/PKG-INFO
--- old/python-language-server-0.34.1/python_language_server.egg-info/PKG-INFO  
2020-07-02 18:36:00.000000000 +0200
+++ new/python-language-server-0.35.0/python_language_server.egg-info/PKG-INFO  
2020-09-11 03:25:18.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: python-language-server
-Version: 0.34.1
+Version: 0.35.0
 Summary: Python Language Server for the Language Server Protocol
 Home-page: https://github.com/palantir/python-language-server
 Author: Palantir Technologies, Inc.
@@ -8,11 +8,14 @@
 Description: Python Language Server
         ======================
         
-        .. image:: 
https://circleci.com/gh/palantir/python-language-server.svg?style=shield
-            :target: https://circleci.com/gh/palantir/python-language-server
+        .. image:: 
https://github.com/palantir/python-language-server/workflows/Linux%20tests/badge.svg
+            :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Linux+tests%22
         
-        .. image:: 
https://ci.appveyor.com/api/projects/status/mdacv6fnif7wonl0?svg=true
-            :target: 
https://ci.appveyor.com/project/gatesn/python-language-server
+        .. image:: 
https://github.com/palantir/python-language-server/workflows/Mac%20tests/badge.svg
+            :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Mac+tests%22
+        
+        .. image:: 
https://github.com/palantir/python-language-server/workflows/Windows%20tests/badge.svg
+            :target: 
https://github.com/palantir/python-language-server/actions?query=workflow%3A%22Windows+tests%22
         
         .. image:: 
https://img.shields.io/github/license/palantir/python-language-server.svg
              :target: 
https://github.com/palantir/python-language-server/blob/master/LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/python_language_server.egg-info/requires.txt 
new/python-language-server-0.35.0/python_language_server.egg-info/requires.txt
--- 
old/python-language-server-0.34.1/python_language_server.egg-info/requires.txt  
    2020-07-02 18:36:00.000000000 +0200
+++ 
new/python-language-server-0.35.0/python_language_server.egg-info/requires.txt  
    2020-09-11 03:25:18.000000000 +0200
@@ -1,9 +1,7 @@
 jedi<0.18.0,>=0.17.0
-python-jsonrpc-server>=0.3.2
+python-jsonrpc-server>=0.4.0
 pluggy
-
-[:platform_system != "Windows"]
-ujson<=1.35
+ujson>=3.0.0
 
 [:python_version < "3"]
 future>=0.14.0
@@ -21,7 +19,7 @@
 pycodestyle<2.7.0,>=2.6.0
 pydocstyle>=2.0.0
 pyflakes<2.3.0,>=2.2.0
-pylint
+pylint>=2.5.0
 rope>=0.10.5
 yapf
 
@@ -44,14 +42,14 @@
 pyflakes<2.3.0,>=2.2.0
 
 [pylint]
-pylint
+pylint>=2.5.0
 
 [rope]
 rope>0.10.5
 
 [test]
 versioneer
-pylint
+pylint>=2.5.0
 pytest
 mock
 pytest-cov
@@ -59,6 +57,7 @@
 numpy
 pandas
 matplotlib
+flaky
 
 [test:python_version >= "3"]
 pyqt5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-language-server-0.34.1/setup.py 
new/python-language-server-0.35.0/setup.py
--- old/python-language-server-0.34.1/setup.py  2020-07-02 18:35:59.000000000 
+0200
+++ new/python-language-server-0.35.0/setup.py  2020-09-11 03:25:10.000000000 
+0200
@@ -1,9 +1,24 @@
 #!/usr/bin/env python
+import sys
 from setuptools import find_packages, setup
 import versioneer
+import sys
 
 README = open('README.rst', 'r').read()
 
+install_requires = [
+        'configparser; python_version<"3.0"',
+        'future>=0.14.0; python_version<"3"',
+        'backports.functools_lru_cache; python_version<"3.2"',
+        'jedi>=0.17.0,<0.18.0',
+        'python-jsonrpc-server>=0.4.0',
+        'pluggy']
+
+if sys.version_info[0] == 2:
+    install_requires.append('ujson<=2.0.3; platform_system!="Windows"')
+else:
+    install_requires.append('ujson>=3.0.0')
+
 
 setup(
     name='python-language-server',
@@ -31,15 +46,7 @@
     # your project is installed. For an analysis of "install_requires" vs pip's
     # requirements files see:
     # https://packaging.python.org/en/latest/requirements.html
-    install_requires=[
-        'configparser; python_version<"3.0"',
-        'future>=0.14.0; python_version<"3"',
-        'backports.functools_lru_cache; python_version<"3.2"',
-        'jedi>=0.17.0,<0.18.0',
-        'python-jsonrpc-server>=0.3.2',
-        'pluggy',
-        'ujson<=1.35; platform_system!="Windows"'
-    ],
+    install_requires=install_requires,
 
     # List additional groups of dependencies here (e.g. development
     # dependencies). You can install these using the following syntax,
@@ -53,7 +60,9 @@
             'pycodestyle>=2.6.0,<2.7.0',
             'pydocstyle>=2.0.0',
             'pyflakes>=2.2.0,<2.3.0',
-            'pylint',
+            # pylint >= 2.5.0 is required for working through stdin and only
+            # available with python3
+            'pylint>=2.5.0' if sys.version_info.major >= 3 else 'pylint',
             'rope>=0.10.5',
             'yapf',
         ],
@@ -63,12 +72,14 @@
         'pycodestyle': ['pycodestyle>=2.6.0,<2.7.0'],
         'pydocstyle': ['pydocstyle>=2.0.0'],
         'pyflakes': ['pyflakes>=2.2.0,<2.3.0'],
-        'pylint': ['pylint'],
+        'pylint': [
+            'pylint>=2.5.0' if sys.version_info.major >= 3 else 'pylint'],
         'rope': ['rope>0.10.5'],
         'yapf': ['yapf'],
-        'test': ['versioneer', 'pylint', 'pytest', 'mock', 'pytest-cov',
-                 'coverage', 'numpy', 'pandas', 'matplotlib',
-                 'pyqt5;python_version>="3"'],
+        'test': ['versioneer',
+                 'pylint>=2.5.0' if sys.version_info.major >= 3 else 'pylint',
+                 'pytest', 'mock', 'pytest-cov', 'coverage', 'numpy', 'pandas',
+                 'matplotlib', 'pyqt5;python_version>="3"', 'flaky'],
     },
 
     # To provide executable scripts, use entry points in preference to the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/test/plugins/test_pylint_lint.py 
new/python-language-server-0.35.0/test/plugins/test_pylint_lint.py
--- old/python-language-server-0.34.1/test/plugins/test_pylint_lint.py  
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/test/plugins/test_pylint_lint.py  
2020-09-11 03:25:10.000000000 +0200
@@ -3,7 +3,7 @@
 import os
 import tempfile
 
-from test import py2_only, py3_only
+from test import py2_only, py3_only, IS_PY3
 from pyls import lsp, uris
 from pyls.workspace import Document
 from pyls.plugins import pylint_lint
@@ -49,6 +49,20 @@
         assert unused_import['range']['start'] == {'line': 0, 'character': 0}
         assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning
 
+        if IS_PY3:
+            # test running pylint in stdin
+            config.plugin_settings('pylint')['executable'] = 'pylint'
+            diags = pylint_lint.pyls_lint(config, doc, True)
+
+            msg = 'Unused import sys (unused-import)'
+            unused_import = [d for d in diags if d['message'] == msg][0]
+
+            assert unused_import['range']['start'] == {
+                'line': 0,
+                'character': 0,
+            }
+            assert unused_import['severity'] == lsp.DiagnosticSeverity.Warning
+
 
 @py3_only
 def test_syntax_error_pylint_py3(config, workspace):
@@ -59,6 +73,15 @@
         # Pylint doesn't give column numbers for invalid syntax.
         assert diag['range']['start'] == {'line': 0, 'character': 12}
         assert diag['severity'] == lsp.DiagnosticSeverity.Error
+
+        # test running pylint in stdin
+        config.plugin_settings('pylint')['executable'] = 'pylint'
+        diag = pylint_lint.pyls_lint(config, doc, True)[0]
+
+        assert diag['message'].startswith('invalid syntax')
+        # Pylint doesn't give column numbers for invalid syntax.
+        assert diag['range']['start'] == {'line': 0, 'character': 12}
+        assert diag['severity'] == lsp.DiagnosticSeverity.Error
 
 
 @py2_only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/test/plugins/test_references.py 
new/python-language-server-0.35.0/test/plugins/test_references.py
--- old/python-language-server-0.34.1/test/plugins/test_references.py   
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/test/plugins/test_references.py   
2020-09-11 03:25:10.000000000 +0200
@@ -68,7 +68,7 @@
 def test_references_builtin(tmp_workspace):  # pylint: 
disable=redefined-outer-name
     # Over 'UnicodeError':
     position = {'line': 4, 'character': 7}
-    doc2_uri = uris.from_fs_path(os.path.join(tmp_workspace.root_path, 
DOC2_NAME))
+    doc2_uri = uris.from_fs_path(os.path.join(str(tmp_workspace.root_path), 
DOC2_NAME))
     doc2 = Document(doc2_uri, tmp_workspace)
 
     refs = pyls_references(doc2, position)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-language-server-0.34.1/test/test_language_server.py 
new/python-language-server-0.35.0/test/test_language_server.py
--- old/python-language-server-0.34.1/test/test_language_server.py      
2020-07-02 18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/test/test_language_server.py      
2020-09-11 03:25:10.000000000 +0200
@@ -2,15 +2,17 @@
 import os
 import time
 import multiprocessing
+import sys
 from threading import Thread
 
-from test import unix_only
 from pyls_jsonrpc.exceptions import JsonRpcMethodNotFound
 import pytest
 
 from pyls.python_ls import start_io_lang_server, PythonLanguageServer
 
 CALL_TIMEOUT = 10
+PY2 = sys.version_info[0] == 2
+PY3 = sys.version_info[0] == 3
 
 
 def start_client(client):
@@ -25,7 +27,13 @@
         # Server to client pipe
         scr, scw = os.pipe()
 
-        ParallelKind = multiprocessing.Process if os.name != 'nt' else Thread
+        if os.name == 'nt':
+            ParallelKind = Thread
+        else:
+            if sys.version_info[:2] >= (3, 8):
+                ParallelKind = multiprocessing.get_context("fork").Process  # 
pylint: disable=no-member
+            else:
+                ParallelKind = multiprocessing.Process
 
         self.process = ParallelKind(target=start_io_lang_server, args=(
             os.fdopen(csr, 'rb'), os.fdopen(scw, 'wb'), check_parent_process, 
PythonLanguageServer
@@ -73,7 +81,8 @@
     assert 'capabilities' in response
 
 
-@unix_only
[email protected](os.name == 'nt' or (sys.platform.startswith('linux') and 
PY3),
+                    reason='Skipped on win and fails on linux >=3.6')
 def test_exit_with_parent_process_died(client_exited_server):  # pylint: 
disable=redefined-outer-name
     # language server should have already exited before responding
     lsp_server, mock_process = client_exited_server.client, 
client_exited_server.process
@@ -89,6 +98,8 @@
     assert not client_exited_server.client_thread.is_alive()
 
 
[email protected](sys.platform.startswith('linux') and PY3,
+                    reason='Fails on linux and py3')
 def test_not_exit_without_check_parent_process_flag(client_server):  # pylint: 
disable=redefined-outer-name
     response = client_server._endpoint.request('initialize', {
         'processId': 1234,
@@ -98,6 +109,7 @@
     assert 'capabilities' in response
 
 
[email protected](bool(os.environ.get('CI')), reason='This test is hanging 
on CI')
 def test_missing_message(client_server):  # pylint: 
disable=redefined-outer-name
     with pytest.raises(JsonRpcMethodNotFound):
         
client_server._endpoint.request('unknown_method').result(timeout=CALL_TIMEOUT)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-language-server-0.34.1/test/test_utils.py 
new/python-language-server-0.35.0/test/test_utils.py
--- old/python-language-server-0.34.1/test/test_utils.py        2020-07-02 
18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/test/test_utils.py        2020-09-11 
03:25:10.000000000 +0200
@@ -2,10 +2,12 @@
 import time
 
 import mock
+from flaky import flaky
 
 from pyls import _utils
 
 
+@flaky
 def test_debounce():
     interval = 0.1
     obj = mock.Mock()
@@ -29,6 +31,7 @@
     assert len(obj.mock_calls) == 2
 
 
+@flaky
 def test_debounce_keyed_by():
     interval = 0.1
     obj = mock.Mock()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-language-server-0.34.1/test/test_workspace.py 
new/python-language-server-0.35.0/test/test_workspace.py
--- old/python-language-server-0.34.1/test/test_workspace.py    2020-07-02 
18:35:59.000000000 +0200
+++ new/python-language-server-0.35.0/test/test_workspace.py    2020-09-11 
03:25:10.000000000 +0200
@@ -199,6 +199,7 @@
     assert pyls.workspace._root_uri == path_as_uri(str(workspace1_dir))
 
 
[email protected](os.name == 'nt', reason="Fails on Windows")
 def test_workspace_loads_pycodestyle_config(pyls, tmpdir):
     workspace1_dir = tmpdir.mkdir('Test123')
     pyls.root_uri = str(workspace1_dir)


Reply via email to