Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package spyder for openSUSE:Factory checked in at 2021-10-29 22:34:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/spyder (Old) and /work/SRC/openSUSE:Factory/.spyder.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "spyder" Fri Oct 29 22:34:06 2021 rev:34 rq:927785 version:5.1.5 Changes: -------- --- /work/SRC/openSUSE:Factory/spyder/spyder.changes 2021-09-20 23:36:20.955410484 +0200 +++ /work/SRC/openSUSE:Factory/.spyder.new.1890/spyder.changes 2021-10-29 22:35:11.531703853 +0200 @@ -1,0 +2,7 @@ +Wed Oct 27 13:55:15 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Add patches required for newer distro packages + * spyder-pr16565-unpin-pylint.patch gh#spyder-ide/spyder#16565 + * spyder-jupyter_client7.patch + +------------------------------------------------------------------- New: ---- spyder-jupyter_client7.patch spyder-pr16565-unpin-pylint.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ spyder.spec ++++++ --- /var/tmp/diff_new_pack.yahl66/_old 2021-10-29 22:35:12.059704052 +0200 +++ /var/tmp/diff_new_pack.yahl66/_new 2021-10-29 22:35:12.063704054 +0200 @@ -27,6 +27,10 @@ URL: https://www.spyder-ide.org/ Source: https://github.com/spyder-ide/spyder/archive/v%{version}.tar.gz#/spyder-%{version}.tar.gz Source1: spyder-rpmlintrc +# PATCH-FIX-UPSTREAM spyder-pr16565-unpin-pylint.patch -- gh#spyder-ide/spyder#16565 +Patch0: spyder-pr16565-unpin-pylint.patch +# PATCH-FIX-OPENSUSE spyder-jupyter_client7.patch -- Don't override old jupyter_client private method _kill_kernel c...@bnavigator.de +Patch1: spyder-jupyter_client7.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-setuptools >= 49.6.0 ++++++ spyder-jupyter_client7.patch ++++++ Index: spyder-5.1.5/spyder/plugins/ipythonconsole/utils/manager.py =================================================================== --- spyder-5.1.5.orig/spyder/plugins/ipythonconsole/utils/manager.py +++ spyder-5.1.5/spyder/plugins/ipythonconsole/utils/manager.py @@ -8,15 +8,8 @@ """Kernel Manager subclass.""" -# Standard library imports -import os -import signal -import sys - # Third party imports from qtconsole.manager import QtKernelManager -import psutil - class SpyderKernelManager(QtKernelManager): """ @@ -26,87 +19,7 @@ class SpyderKernelManager(QtKernelManage However, on windows the batch script is terminated but not the kernel it started so this subclass overrides the `_kill_kernel` method to properly kill the started kernels by using psutil. - """ - - @staticmethod - def kill_proc_tree(pid, sig=signal.SIGTERM, include_parent=True, - timeout=None, on_terminate=None): - """ - Kill a process tree (including grandchildren) with sig and return a - (gone, still_alive) tuple. - - "on_terminate", if specified, is a callabck function which is called - as soon as a child terminates. - - This is an new method not present in QtKernelManager. - """ - assert pid != os.getpid() # Won't kill myself! - - # This is necessary to avoid showing an error when restarting the - # kernel after it failed to start in the first place. - # Fixes spyder-ide/spyder#11872 - try: - parent = psutil.Process(pid) - except psutil.NoSuchProcess: - return ([], []) - - children = parent.children(recursive=True) - - if include_parent: - children.append(parent) - for child_process in children: - # This is necessary to avoid an error when restarting the - # kernel that started a PyQt5 application in the background. - # Fixes spyder-ide/spyder#13999 - try: - child_process.send_signal(sig) - except psutil.AccessDenied: - return ([], []) - - gone, alive = psutil.wait_procs( - children, - timeout=timeout, - callback=on_terminate, - ) - - return (gone, alive) - - def _kill_kernel(self): - """ - Kill the running kernel. - - Override private method to be able to correctly close kernel that was - started via a batch/bash script for correct conda env activation. - """ - if self.has_kernel: - - # Signal the kernel to terminate (sends SIGKILL on Unix and calls - # TerminateProcess() on Win32). - try: - if hasattr(signal, 'SIGKILL'): - self.signal_kernel(signal.SIGKILL) - else: - # This is the additional line that was added to properly - # kill the kernel started by Spyder. - self.kill_proc_tree(self.kernel.pid) - - self.kernel.kill() - except OSError as e: - # In Windows, we will get an Access Denied error if the process - # has already terminated. Ignore it. - if sys.platform == 'win32': - if e.winerror != 5: - raise - # On Unix, we may get an ESRCH error if the process has already - # terminated. Ignore it. - else: - from errno import ESRCH - if e.errno != ESRCH: - raise - - # Block until the kernel terminates. - self.kernel.wait() - self.kernel = None - else: - raise RuntimeError("Cannot kill kernel. No kernel is running!") + Don't need this on openSUSE Linux. Allow jupyter_client 7 instead. + """ + pass ++++++ spyder-pr16565-unpin-pylint.patch ++++++ >From fd8360471bc6ab76ffd33799bc402e48342286b0 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba <ccordob...@gmail.com> Date: Sat, 9 Oct 2021 12:13:18 -0500 Subject: [PATCH 1/4] Remove top constraint on Pylint --- binder/environment.yml | 2 +- requirements/conda.txt | 2 +- setup.py | 2 +- spyder/dependencies.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) Index: spyder-5.1.5/binder/environment.yml =================================================================== --- spyder-5.1.5.orig/binder/environment.yml +++ spyder-5.1.5/binder/environment.yml @@ -25,7 +25,7 @@ dependencies: - pickleshare >=0.4 - psutil >=5.3 - pygments >=2.0 -- pylint >=2.5.0,<2.10.0 +- pylint >=2.5.0 - pyls-spyder >=0.4.0 - pyqt <5.13 - python-lsp-black >=1.0.0 Index: spyder-5.1.5/requirements/conda.txt =================================================================== --- spyder-5.1.5.orig/requirements/conda.txt +++ spyder-5.1.5/requirements/conda.txt @@ -21,7 +21,7 @@ pexpect >=4.4.0 pickleshare >=0.4 psutil >=5.3 pygments >=2.0 -pylint >=2.5.0,<2.10.0 +pylint >=2.5.0 pyls-spyder >=0.4.0 pyqt <5.13 python-lsp-black >=1.0.0 Index: spyder-5.1.5/setup.py =================================================================== --- spyder-5.1.5.orig/setup.py +++ spyder-5.1.5/setup.py @@ -221,7 +221,7 @@ install_requires = [ 'pickleshare>=0.4', 'psutil>=5.3', 'pygments>=2.0', - 'pylint>=2.5.0,<2.10.0', + 'pylint>=2.5.0', 'python-lsp-black>=1.0.0', 'pyls-spyder>=0.4.0', 'pyqt5<5.13', Index: spyder-5.1.5/spyder/dependencies.py =================================================================== --- spyder-5.1.5.orig/spyder/dependencies.py +++ spyder-5.1.5/spyder/dependencies.py @@ -51,7 +51,7 @@ PEXPECT_REQVER = '>=4.4.0' PICKLESHARE_REQVER = '>=0.4' PSUTIL_REQVER = '>=5.3' PYGMENTS_REQVER = '>=2.0' -PYLINT_REQVER = '>=2.5.0;<2.10.0' +PYLINT_REQVER = '>=2.5.0' PYLSP_REQVER = '>=1.2.2;<1.3.0' PYLSP_BLACK_REQVER = '>=1.0.0' PYLS_SPYDER_REQVER = '>=0.4.0' Index: spyder-5.1.5/external-deps/python-lsp-server/.gitrepo =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/.gitrepo +++ spyder-5.1.5/external-deps/python-lsp-server/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/python-lsp/python-lsp-server.git branch = develop - commit = b2bdeeac5c90924b2028f9a24317c94675073355 - parent = 2863683dd16b6aefec5412c2a213b8d9cf9a2f2d + commit = e8cf8e5b160f227550574cba480e276a98248d44 + parent = b168e3445bbfbcb03aa04967668a2087a238f8a5 method = merge cmdver = 0.4.3 Index: spyder-5.1.5/external-deps/python-lsp-server/.pylintrc =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/.pylintrc +++ spyder-5.1.5/external-deps/python-lsp-server/.pylintrc @@ -16,7 +16,8 @@ disable = too-few-public-methods, too-many-arguments, too-many-instance-attributes, - import-error + import-error, + consider-using-f-string, [REPORTS] Index: spyder-5.1.5/external-deps/python-lsp-server/pylsp/__main__.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/pylsp/__main__.py +++ spyder-5.1.5/external-deps/python-lsp-server/pylsp/__main__.py @@ -92,7 +92,7 @@ def _configure_logger(verbose=0, log_con root_logger = logging.root if log_config: - with open(log_config, 'r') as f: + with open(log_config, 'r', encoding='utf-8') as f: logging.config.dictConfig(json.load(f)) else: formatter = logging.Formatter(LOG_FORMAT) Index: spyder-5.1.5/external-deps/python-lsp-server/pylsp/_utils.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/pylsp/_utils.py +++ spyder-5.1.5/external-deps/python-lsp-server/pylsp/_utils.py @@ -144,8 +144,8 @@ def format_docstring(contents): Until we can find a fast enough way of discovering and parsing each format, we can do a little better by at least preserving indentation. """ - contents = contents.replace('\t', u'\u00A0' * 4) - contents = contents.replace(' ', u'\u00A0' * 2) + contents = contents.replace('\t', '\u00A0' * 4) + contents = contents.replace(' ', '\u00A0' * 2) return contents Index: spyder-5.1.5/external-deps/python-lsp-server/pylsp/plugins/flake8_lint.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/pylsp/plugins/flake8_lint.py +++ spyder-5.1.5/external-deps/python-lsp-server/pylsp/plugins/flake8_lint.py @@ -79,7 +79,7 @@ def run_flake8(flake8_executable, args, try: cmd = [flake8_executable] cmd.extend(args) - p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) # pylint: disable=consider-using-with + p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) except IOError: log.debug("Can't execute %s. Trying with 'python -m flake8'", flake8_executable) cmd = ['python', '-m', 'flake8'] Index: spyder-5.1.5/external-deps/python-lsp-server/pylsp/plugins/pylint_lint.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/pylsp/plugins/pylint_lint.py +++ spyder-5.1.5/external-deps/python-lsp-server/pylsp/plugins/pylint_lint.py @@ -236,7 +236,7 @@ def _run_pylint_stdio(pylint_executable, cmd = [pylint_executable] cmd.extend(flags) cmd.extend(['--from-stdin', document.path]) - p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) # pylint: disable=consider-using-with + 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'] Index: spyder-5.1.5/external-deps/python-lsp-server/pylsp/workspace.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/pylsp/workspace.py +++ spyder-5.1.5/external-deps/python-lsp-server/pylsp/workspace.py @@ -76,7 +76,7 @@ class Workspace: return self._root_uri def is_local(self): - return (self._root_uri_scheme == '' or self._root_uri_scheme == 'file') and os.path.exists(self._root_path) + return (self._root_uri_scheme in ['', 'file']) and os.path.exists(self._root_path) def get_document(self, doc_uri): """Return a managed document if-present, else create one pointing at disk. Index: spyder-5.1.5/external-deps/python-lsp-server/setup.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/setup.py +++ spyder-5.1.5/external-deps/python-lsp-server/setup.py @@ -47,25 +47,25 @@ setup( extras_require={ 'all': [ 'autopep8', - 'flake8>=3.8.0', + 'flake8>=3.8.0,<4.0.0', 'mccabe>=0.6.0,<0.7.0', 'pycodestyle>=2.7.0', 'pydocstyle>=2.0.0', 'pyflakes>=2.3.0,<2.4.0', - 'pylint>=2.5.0,<2.10.0', + 'pylint>=2.5.0', 'rope>=0.10.5', 'yapf', ], 'autopep8': ['autopep8'], - 'flake8': ['flake8>=3.8.0'], + 'flake8': ['flake8>=3.8.0,<4.0.0'], 'mccabe': ['mccabe>=0.6.0,<0.7.0'], 'pycodestyle': ['pycodestyle>=2.7.0'], 'pydocstyle': ['pydocstyle>=2.0.0'], 'pyflakes': ['pyflakes>=2.3.0,<2.4.0'], - 'pylint': ['pylint>=2.5.0,<2.10.0'], + 'pylint': ['pylint>=2.5.0'], 'rope': ['rope>0.10.5'], 'yapf': ['yapf'], - 'test': ['pylint>=2.5.0,<2.10.0', 'pytest', 'pytest-cov', 'coverage', + 'test': ['pylint>=2.5.0', 'pytest', 'pytest-cov', 'coverage', 'numpy', 'pandas', 'matplotlib', 'pyqt5', 'flaky'], }, entry_points={ Index: spyder-5.1.5/external-deps/python-lsp-server/test/fixtures.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/fixtures.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/fixtures.py @@ -82,7 +82,9 @@ def workspace_other_root_path(tmpdir): @pytest.fixture def config(workspace): # pylint: disable=redefined-outer-name """Return a config object.""" - return Config(workspace.root_uri, {}, 0, {}) + cfg = Config(workspace.root_uri, {}, 0, {}) + cfg._plugin_settings = {'plugins': {'pylint': {'enabled': False, 'args': [], 'executable': None}}} + return cfg @pytest.fixture @@ -99,7 +101,7 @@ def temp_workspace_factory(workspace): def fn(files): def create_file(name, content): fn = os.path.join(workspace.root_path, name) - with open(fn, 'w') as f: + with open(fn, 'w', encoding='utf-8') as f: f.write(content) workspace.put_document(uris.from_fs_path(fn), content) Index: spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_flake8_lint.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/plugins/test_flake8_lint.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_flake8_lint.py @@ -93,7 +93,7 @@ def get_flake8_cfg_settings(workspace, c This function creates a ``setup.cfg``; you'll have to delete it yourself. """ - with open(os.path.join(workspace.root_path, "setup.cfg"), "w+") as f: + with open(os.path.join(workspace.root_path, "setup.cfg"), "w+", encoding='utf-8') as f: f.write(config_str) workspace.update_config({"pylsp": {"configurationSources": ["flake8"]}}) Index: spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_pycodestyle_lint.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/plugins/test_pycodestyle_lint.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_pycodestyle_lint.py @@ -91,7 +91,7 @@ def test_pycodestyle_config(workspace): for conf_file, (content, working) in list(content.items()): # Now we'll add config file to ignore it - with open(os.path.join(workspace.root_path, conf_file), 'w+') as f: + with open(os.path.join(workspace.root_path, conf_file), 'w+', encoding='utf-8') as f: f.write(content) workspace._config.settings.cache_clear() Index: spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_pyflakes_lint.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/plugins/test_pyflakes_lint.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_pyflakes_lint.py @@ -21,7 +21,7 @@ DOC_SYNTAX_ERR = """def hello() DOC_UNDEFINED_NAME_ERR = "a = b" -DOC_ENCODING = u"""# encoding=utf-8 +DOC_ENCODING = """# encoding=utf-8 import sys """ Index: spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_pylint_lint.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/plugins/test_pylint_lint.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/plugins/test_pylint_lint.py @@ -37,7 +37,7 @@ def temp_document(doc_text, workspace): def write_temp_doc(document, contents): - with open(document.path, 'w') as temp_file: + with open(document.path, 'w', encoding='utf-8') as temp_file: temp_file.write(contents) Index: spyder-5.1.5/external-deps/python-lsp-server/test/test_document.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/test_document.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/test_document.py @@ -16,7 +16,7 @@ def test_document_lines(doc): def test_document_source_unicode(workspace): - document_mem = Document(DOC_URI, workspace, u'my source') + document_mem = Document(DOC_URI, workspace, 'my source') document_disk = Document(DOC_URI, workspace) assert isinstance(document_mem.source, type(document_disk.source)) @@ -44,27 +44,27 @@ def test_word_at_position(doc): def test_document_empty_edit(workspace): - doc = Document('file:///uri', workspace, u'') + doc = Document('file:///uri', workspace, '') doc.apply_change({ 'range': { 'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0} }, - 'text': u'f' + 'text': 'f' }) - assert doc.source == u'f' + assert doc.source == 'f' def test_document_line_edit(workspace): - doc = Document('file:///uri', workspace, u'itshelloworld') + doc = Document('file:///uri', workspace, 'itshelloworld') doc.apply_change({ - 'text': u'goodbye', + 'text': 'goodbye', 'range': { 'start': {'line': 0, 'character': 3}, 'end': {'line': 0, 'character': 8} } }) - assert doc.source == u'itsgoodbyeworld' + assert doc.source == 'itsgoodbyeworld' def test_document_multiline_edit(workspace): @@ -73,8 +73,8 @@ def test_document_multiline_edit(workspa " print a\n", " print b\n" ] - doc = Document('file:///uri', workspace, u''.join(old)) - doc.apply_change({'text': u'print a, b', 'range': { + doc = Document('file:///uri', workspace, ''.join(old)) + doc.apply_change({'text': 'print a, b', 'range': { 'start': {'line': 1, 'character': 4}, 'end': {'line': 2, 'character': 11} }}) @@ -89,8 +89,8 @@ def test_document_end_of_file_edit(works "print 'a'\n", "print 'b'\n" ] - doc = Document('file:///uri', workspace, u''.join(old)) - doc.apply_change({'text': u'o', 'range': { + doc = Document('file:///uri', workspace, ''.join(old)) + doc.apply_change({'text': 'o', 'range': { 'start': {'line': 2, 'character': 0}, 'end': {'line': 2, 'character': 0} }}) Index: spyder-5.1.5/external-deps/python-lsp-server/test/test_workspace.py =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/test/test_workspace.py +++ spyder-5.1.5/external-deps/python-lsp-server/test/test_workspace.py @@ -51,7 +51,7 @@ def test_non_root_project(pylsp, metafil os.mkdir(project_root) for metafile in metafiles: - with open(os.path.join(project_root, metafile), 'w+') as f: + with open(os.path.join(project_root, metafile), 'w+', encoding='utf-8') as f: f.write('# ' + metafile) test_uri = uris.from_fs_path(os.path.join(project_root, 'hello/test.py')) Index: spyder-5.1.5/.github/scripts/install.sh =================================================================== --- spyder-5.1.5.orig/.github/scripts/install.sh +++ spyder-5.1.5/.github/scripts/install.sh @@ -32,6 +32,9 @@ if [ "$USE_CONDA" = "true" ]; then conda remove spyder-kernels --force -q -y conda remove python-lsp-server --force -q -y conda remove qdarkstyle --force -q -y + + # Note: Remove this when PyLSP 1.3.0 is released + mamba install 'pylint >=2.10' -c conda-forge -q -y else # Update pip and setuptools pip install -U pip setuptools Index: spyder-5.1.5/external-deps/python-lsp-server/CHANGELOG.md =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/CHANGELOG.md +++ spyder-5.1.5/external-deps/python-lsp-server/CHANGELOG.md @@ -1,7 +1,27 @@ # History of changes -## Version 1.2.2 (2021-09-01) +## Version 1.2.4 (2021-10-11) + +### Pull Requests Merged + +* [PR 96](https://github.com/python-lsp/python-lsp-server/pull/96) - Pin flake8 to be less than version 4, by [@ccordoba12](https://github.com/ccordoba12) + +In this release 1 pull request was closed. + +---- + +## Version 1.2.3 (2021-10-04) +### Pull Requests Merged + +* [PR 93](https://github.com/python-lsp/python-lsp-server/pull/93) - Document how to write python-lsp-server plugin + add pylsp-rope to Readme, by [@lieryan](https://github.com/lieryan) +* [PR 88](https://github.com/python-lsp/python-lsp-server/pull/88) - Fix pylint test without pylsp installed, by [@jspricke](https://github.com/jspricke) + +In this release 2 pull requests were closed. + +---- + +## Version 1.2.2 (2021-09-01) ### Pull Requests Merged Index: spyder-5.1.5/external-deps/python-lsp-server/README.md =================================================================== --- spyder-5.1.5.orig/external-deps/python-lsp-server/README.md +++ spyder-5.1.5/external-deps/python-lsp-server/README.md @@ -48,8 +48,13 @@ Installing these plugins will add extra - [pyls-isort](https://github.com/paradoxxxzero/pyls-isort): code formatting using [isort](https://github.com/PyCQA/isort) (automatic import sorting). - [python-lsp-black](https://github.com/python-lsp/python-lsp-black): code formatting using [Black](https://github.com/psf/black). - [pyls-memestra](https://github.com/QuantStack/pyls-memestra): detecting the use of deprecated APIs. +- [pylsp-rope](https://github.com/python-rope/pylsp-rope): Extended refactoring capabilities using [Rope](https://github.com/python-rope/rope). -Please see the above repositories for examples on how to write plugins for the Python LSP Server. Please file an issue if you require assistance writing a plugin. +Please see the above repositories for examples on how to write plugins for the Python LSP Server. + +[cookiecutter-pylsp-plugin](https://github.com/python-lsp/cookiecutter-pylsp-plugin) is a [cookiecutter](https://cookiecutter.readthedocs.io/) template for setting up a basic plugin project for python-lsp-server. It documents all the essentials you need to know to kick start your own plugin project. + +Please file an issue if you require assistance writing a plugin. ## Configuration