From 86ad7a2842429ccaaa2faa09b9cf6c696ccce32e Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 3 Nov 2022 13:21:39 -0500 Subject: [PATCH 1/7] Update core dependencies --- .github/scripts/install.sh | 6 ------ RELEASE.md | 2 +- binder/environment.yml | 6 +++--- installers/macOS/req-extras.txt | 1 - setup.py | 12 ++++++------ spyder/dependencies.py | 6 +++--- spyder/plugins/ipythonconsole/__init__.py | 4 ++-- 7 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/scripts/install.sh b/.github/scripts/install.sh index e7cd7301d0f..020c5083323 100755 --- a/.github/scripts/install.sh +++ b/.github/scripts/install.sh @@ -38,9 +38,6 @@ if [ "$USE_CONDA" = "true" ]; then else mamba install 'numpy<1.23' fi - - # Install docstring-to-markdown until we release PyLSP 1.6.0 - mamba install docstring-to-markdown else # Update pip and setuptools python -m pip install -U pip setuptools wheel build @@ -65,9 +62,6 @@ else pip uninstall pyqt5 pyqt5-qt5 pyqt5-sip pyqtwebengine pyqtwebengine-qt5 -q -y pip install pyqt5==5.12.* pyqtwebengine==5.12.* fi - - # Install docstring-to-markdown until we release PyLSP 1.6.0 - pip install docstring-to-markdown fi # Install subrepos from source diff --git a/RELEASE.md b/RELEASE.md index 5870ab5dd61..dc9108d1251 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -111,7 +111,7 @@ To release a new version of Spyder you need to follow these steps: - `spyder/dependencies.py` - `requirements/{main,windows,macos,linux}.yml` - `binder/environment.yml` - - `spyder/plugins/ipythonconsole/widgets/__init__.py` (look up for the constants `SPYDER_KERNELS_MIN_VERSION` and `SPYDER_KERNELS_MAX_VERSION`) + - `spyder/plugins/ipythonconsole/__init__.py` (look up for the constants `SPYDER_KERNELS_MIN_VERSION` and `SPYDER_KERNELS_MAX_VERSION`) **Note**: Usually, the version of `spyder-kernels` for validation in the IPython Console only needs to be updated for minor or major releases of that package. For bugfix releases the value should remain the same to not hassle users using custom interpreters into updating `spyder-kernels` in their environments. However, this depends on the type of bugs resolved and if it's worthy to reinforce the need of an update even for those versions. diff --git a/binder/environment.yml b/binder/environment.yml index 46e3bcf41d3..eed025eea5f 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -31,18 +31,18 @@ dependencies: - pyqt <5.16 - pyqtwebengine <5.16 - python-lsp-black >=1.2.0 -- python-lsp-server >=1.5.0,<1.6.0 +- python-lsp-server >=1.6.0,<1.7.0 - pyxdg >=0.26 - pyzmq >=22.1.0 - qdarkstyle >=3.0.2,<3.1.0 - qstylizer >=0.2.2 - qtawesome >=1.2.1 -- qtconsole >=5.3.2,<5.4.0 +- qtconsole >=5.4.0,<5.5.0 - qtpy >=2.1.0 - rtree >=0.9.7 - setuptools >=49.6.0 - sphinx >=0.6.6 -- spyder-kernels >=2.3.3,<2.4.0 +- spyder-kernels >=2.4.0,<2.5.0 - textdistance >=4.2.0 - three-merge >=0.1.1 - watchdog >=0.10.3 diff --git a/installers/macOS/req-extras.txt b/installers/macOS/req-extras.txt index f3142db23d2..b197acc34eb 100644 --- a/installers/macOS/req-extras.txt +++ b/installers/macOS/req-extras.txt @@ -1,6 +1,5 @@ # Spyder extra packages autopep8 -docstring-to-markdown flake8 Paramiko pycodestyle diff --git a/setup.py b/setup.py index 1693a5a2e99..1aa7f96235f 100644 --- a/setup.py +++ b/setup.py @@ -229,18 +229,18 @@ def run(self): 'pyls-spyder>=0.4.0', 'pyqt5<5.16', 'pyqtwebengine<5.16', - 'python-lsp-server[all]>=1.5.0,<1.6.0', + 'python-lsp-server[all]>=1.6.0,<1.7.0', 'pyxdg>=0.26;platform_system=="Linux"', 'pyzmq>=22.1.0', 'qdarkstyle>=3.0.2,<3.1.0', 'qstylizer>=0.2.2', 'qtawesome>=1.2.1', - 'qtconsole>=5.3.2,<5.4.0', + 'qtconsole>=5.4.0,<5.5.0', 'qtpy>=2.1.0', 'rtree>=0.9.7', 'setuptools>=49.6.0', 'sphinx>=0.6.6', - 'spyder-kernels>=2.3.3,<2.4.0', + 'spyder-kernels>=2.4.0,<2.5.0', 'textdistance>=4.2.0', 'three-merge>=0.1.1', 'watchdog>=0.10.3' @@ -251,9 +251,9 @@ def run(self): reqs_to_loosen = {'python-lsp-server[all]', 'qtconsole', 'spyder-kernels'} install_requires = [req for req in install_requires if req.split(">")[0] not in reqs_to_loosen] - install_requires.append('python-lsp-server[all]>=1.5.0,<1.7.0') - install_requires.append('qtconsole>=5.3.2,<5.5.0') - install_requires.append('spyder-kernels>=2.3.3,<2.5.0') + install_requires.append('python-lsp-server[all]>=1.6.0,<1.8.0') + install_requires.append('qtconsole>=5.4.0,<5.6.0') + install_requires.append('spyder-kernels>=2.4.0,<2.6.0') extras_require = { 'test:platform_system == "Windows"': ['pywin32'], diff --git a/spyder/dependencies.py b/spyder/dependencies.py index 4e96ba2c69c..244a1611e57 100644 --- a/spyder/dependencies.py +++ b/spyder/dependencies.py @@ -53,7 +53,7 @@ PYGMENTS_REQVER = '>=2.0' PYLINT_REQVER = '>=2.5.0;<3.0' PYLINT_VENV_REQVER = '>=2.1.1' -PYLSP_REQVER = '>=1.5.0;<1.6.0' +PYLSP_REQVER = '>=1.6.0;<1.7.0' PYLSP_BLACK_REQVER = '>=1.2.0' PYLS_SPYDER_REQVER = '>=0.4.0' PYXDG_REQVER = '>=0.26' @@ -61,12 +61,12 @@ QDARKSTYLE_REQVER = '>=3.0.2;<3.1.0' QSTYLIZER_REQVER = '>=0.2.2' QTAWESOME_REQVER = '>=1.2.1' -QTCONSOLE_REQVER = '>=5.3.2;<5.4.0' +QTCONSOLE_REQVER = '>=5.4.0;<5.5.0' QTPY_REQVER = '>=2.1.0' RTREE_REQVER = '>=0.9.7' SETUPTOOLS_REQVER = '>=49.6.0' SPHINX_REQVER = '>=0.6.6' -SPYDER_KERNELS_REQVER = '>=2.3.3;<2.4.0' +SPYDER_KERNELS_REQVER = '>=2.4.0;<2.5.0' TEXTDISTANCE_REQVER = '>=4.2.0' THREE_MERGE_REQVER = '>=0.1.1' # None for pynsist install for now diff --git a/spyder/plugins/ipythonconsole/__init__.py b/spyder/plugins/ipythonconsole/__init__.py index 59b439e3780..7c718ef5b09 100644 --- a/spyder/plugins/ipythonconsole/__init__.py +++ b/spyder/plugins/ipythonconsole/__init__.py @@ -12,8 +12,8 @@ """ # Required version of Spyder-kernels -SPYDER_KERNELS_MIN_VERSION = '2.3.0' -SPYDER_KERNELS_MAX_VERSION = '2.4.0' +SPYDER_KERNELS_MIN_VERSION = '2.4.0' +SPYDER_KERNELS_MAX_VERSION = '2.5.0' SPYDER_KERNELS_VERSION = ( f'>={SPYDER_KERNELS_MIN_VERSION};<{SPYDER_KERNELS_MAX_VERSION}') SPYDER_KERNELS_CONDA = ( From b2fcc54946113cec4ba89e89975ea37b4314708c Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 3 Nov 2022 13:22:00 -0500 Subject: [PATCH 2/7] git subrepo pull (merge) external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "2d1d9aea5" upstream: origin: "https://github.com/spyder-ide/spyder-kernels.git" branch: "2.x" commit: "747299912" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" --- external-deps/spyder-kernels/.gitrepo | 2 +- external-deps/spyder-kernels/CHANGELOG.md | 24 ++++++++++++++++ .../spyder-kernels/spyder_kernels/_version.py | 2 +- .../spyder_kernels/utils/iofuncs.py | 28 +++++++++++++++++-- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/external-deps/spyder-kernels/.gitrepo b/external-deps/spyder-kernels/.gitrepo index cc4ef433b7b..e767a465a4d 100644 --- a/external-deps/spyder-kernels/.gitrepo +++ b/external-deps/spyder-kernels/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/spyder-ide/spyder-kernels.git branch = 2.x - commit = 6fa55207f7ecbdce9197b2abb7fe2e2796946244 + commit = 747299912fd851abfefc9d4d6187b9c4783d7295 parent = 29d54b83044827c1257bd04bbe064460c9c1c994 method = merge cmdver = 0.4.3 diff --git a/external-deps/spyder-kernels/CHANGELOG.md b/external-deps/spyder-kernels/CHANGELOG.md index dac30fb8534..43047bcc04c 100644 --- a/external-deps/spyder-kernels/CHANGELOG.md +++ b/external-deps/spyder-kernels/CHANGELOG.md @@ -1,5 +1,29 @@ # History of changes +## Version 2.4.0 (2022-11-02) + +### New features + +* Add support for Python 3.11 +* Flush standard streams after execution. + +### Pull Requests Merged + +* [PR 428](https://github.com/spyder-ide/spyder-kernels/pull/428) - PR: Patch for CVE-2007-4559 Tar directory traversal, by [@ccordoba12](https://github.com/ccordoba12) +* [PR 426](https://github.com/spyder-ide/spyder-kernels/pull/426) - PR: Update ipykernel constraint to >=6.16.1, by [@dalthviz](https://github.com/dalthviz) +* [PR 423](https://github.com/spyder-ide/spyder-kernels/pull/423) - PR: Fix lineno range, by [@impact27](https://github.com/impact27) ([19862](https://github.com/spyder-ide/spyder/issues/19862)) +* [PR 422](https://github.com/spyder-ide/spyder-kernels/pull/422) - PR: Make comm lock reentrant, by [@impact27](https://github.com/impact27) +* [PR 420](https://github.com/spyder-ide/spyder-kernels/pull/420) - PR: Only access sys.stdout and sys.stderr once, by [@impact27](https://github.com/impact27) +* [PR 416](https://github.com/spyder-ide/spyder-kernels/pull/416) - PR: Fix some errors when computing the namespace view, by [@ccordoba12](https://github.com/ccordoba12) +* [PR 415](https://github.com/spyder-ide/spyder-kernels/pull/415) - PR: Fix tk eventloop handling when debugging on Windows, by [@dalthviz](https://github.com/dalthviz) +* [PR 413](https://github.com/spyder-ide/spyder-kernels/pull/413) - PR: Flush standard streams after execution, by [@impact27](https://github.com/impact27) + +In this release 8 pull requests were closed. + + +---- + + ## Version 2.3.3 (2022-08-28) ### Issues Closed diff --git a/external-deps/spyder-kernels/spyder_kernels/_version.py b/external-deps/spyder-kernels/spyder_kernels/_version.py index 0724dfccfa3..5f35e96fc44 100644 --- a/external-deps/spyder-kernels/spyder_kernels/_version.py +++ b/external-deps/spyder-kernels/spyder_kernels/_version.py @@ -8,5 +8,5 @@ """Version File.""" -VERSION_INFO = (2, 4, 0, 'dev0') +VERSION_INFO = (2, 5, 0, 'dev0') __version__ = '.'.join(map(str, VERSION_INFO)) diff --git a/external-deps/spyder-kernels/spyder_kernels/utils/iofuncs.py b/external-deps/spyder-kernels/spyder_kernels/utils/iofuncs.py index 7565a17b2e3..8689cbf6976 100644 --- a/external-deps/spyder-kernels/spyder_kernels/utils/iofuncs.py +++ b/external-deps/spyder-kernels/spyder_kernels/utils/iofuncs.py @@ -23,7 +23,6 @@ import tempfile import shutil import types -import warnings import json import inspect import dis @@ -370,6 +369,27 @@ def save_dictionary(data, filename): return error_message +def is_within_directory(directory, target): + """Check if a file is within a directory.""" + abs_directory = os.path.abspath(directory) + abs_target = os.path.abspath(target) + prefix = os.path.commonprefix([abs_directory, abs_target]) + return prefix == abs_directory + + +def safe_extract(tar, path=".", members=None, numeric_owner=False): + """Safely extract a tar file.""" + for member in tar.getmembers(): + member_path = os.path.join(path, member.name) + if not is_within_directory(path, member_path): + raise Exception( + "Attempted path traversal in tar file {}".format( + repr(tar.name) + ) + ) + tar.extractall(path, members, numeric_owner=numeric_owner) + + def load_dictionary(filename): """Load dictionary from .spydata file""" filename = osp.abspath(filename) @@ -380,7 +400,11 @@ def load_dictionary(filename): error_message = None try: with tarfile.open(filename, "r") as tar: - tar.extractall() + if PY2: + tar.extractall() + else: + safe_extract(tar) + pickle_filename = glob.glob('*.pickle')[0] # 'New' format (Spyder >=2.2 for Python 2 and Python 3) with open(pickle_filename, 'rb') as fdesc: From d6bfd2a8dbd79b87d29e767b59098df930f2db0a Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 3 Nov 2022 13:22:36 -0500 Subject: [PATCH 3/7] git subrepo pull external-deps/qtconsole subrepo: subdir: "external-deps/qtconsole" merged: "90ffe335c" upstream: origin: "https://github.com/jupyter/qtconsole.git" branch: "master" commit: "90ffe335c" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" --- external-deps/qtconsole/.gitrepo | 4 +-- .../qtconsole/docs/source/changelog.rst | 25 ++++++++++++++++++ external-deps/qtconsole/qtconsole/_version.py | 2 +- .../qtconsole/qtconsole/console_widget.py | 26 ++++++++++++------- .../qtconsole/qtconsole/frontend_widget.py | 3 ++- .../qtconsole/tests/test_00_console_widget.py | 2 +- 6 files changed, 47 insertions(+), 15 deletions(-) diff --git a/external-deps/qtconsole/.gitrepo b/external-deps/qtconsole/.gitrepo index f18ce2d0051..39748baad58 100644 --- a/external-deps/qtconsole/.gitrepo +++ b/external-deps/qtconsole/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/jupyter/qtconsole.git branch = master - commit = cce3b656e22b5b84d907888919ef594018f213cb - parent = ae019138bfde5726d96d74b5c0d79c94a492bb5a + commit = 90ffe335cf9c82f7814c9a945553584d6665a62c + parent = 8299d8c9776501d5f435bd172d57a480e0bc906f method = merge cmdver = 0.4.3 diff --git a/external-deps/qtconsole/docs/source/changelog.rst b/external-deps/qtconsole/docs/source/changelog.rst index dd81fb5ab89..f5e5fc4af7d 100644 --- a/external-deps/qtconsole/docs/source/changelog.rst +++ b/external-deps/qtconsole/docs/source/changelog.rst @@ -3,6 +3,31 @@ Changes in Jupyter Qt console ============================= +.. _5.4: + +5.4 +~~~ + +5.4.0 +----- + +`5.4.0 on GitHub `__ + +Additions ++++++++++ + +* Add ConsoleWidget.gui_completion_height option to configure the maximum + number of rows or height in pixels of completions when the + ConsoleWidget.gui_completion option has values 'ncurses' or 'droplist', + respectively. + +Changes ++++++++ + +* Fix some errors with PySide6 6.4.0. +* Fix mixed input and print statements on macOS. +* Drop usage of disutils. + .. _5.3: 5.3 diff --git a/external-deps/qtconsole/qtconsole/_version.py b/external-deps/qtconsole/qtconsole/_version.py index 1dbdda705db..8841d944880 100644 --- a/external-deps/qtconsole/qtconsole/_version.py +++ b/external-deps/qtconsole/qtconsole/_version.py @@ -1,2 +1,2 @@ -version_info = (5, 4, 0, 'dev0') +version_info = (5, 5, 0, 'dev0') __version__ = '.'.join(map(str, version_info)) diff --git a/external-deps/qtconsole/qtconsole/console_widget.py b/external-deps/qtconsole/qtconsole/console_widget.py index 61be6f7df47..447be581e2b 100644 --- a/external-deps/qtconsole/qtconsole/console_widget.py +++ b/external-deps/qtconsole/qtconsole/console_widget.py @@ -2142,18 +2142,22 @@ def _insert_plain_text(self, cursor, text, flush=False): remove = False fill = False if act.area == 'screen': - cursor.select(cursor.Document) + cursor.select(QtGui.QTextCursor.Document) remove = True if act.area == 'line': if act.erase_to == 'all': - cursor.select(cursor.LineUnderCursor) + cursor.select(QtGui.QTextCursor.LineUnderCursor) remove = True elif act.erase_to == 'start': - cursor.movePosition(cursor.StartOfLine, cursor.KeepAnchor) + cursor.movePosition( + QtGui.QTextCursor.StartOfLine, + QtGui.QTextCursor.KeepAnchor) remove = True fill = True elif act.erase_to == 'end': - cursor.movePosition(cursor.EndOfLine, cursor.KeepAnchor) + cursor.movePosition( + QtGui.QTextCursor.EndOfLine, + QtGui.QTextCursor.KeepAnchor) remove = True if remove: nspace=cursor.selectionEnd()-cursor.selectionStart() if fill else 0 @@ -2169,12 +2173,13 @@ def _insert_plain_text(self, cursor, text, flush=False): cursor.deletePreviousChar() if os.name == 'nt': - cursor.select(cursor.Document) + cursor.select(QtGui.QTextCursor.Document) cursor.removeSelectedText() elif act.action == 'carriage-return': cursor.movePosition( - cursor.StartOfLine, cursor.MoveAnchor) + QtGui.QTextCursor.StartOfLine, + QtGui.QTextCursor.MoveAnchor) elif act.action == 'beep': QtWidgets.QApplication.instance().beep() @@ -2182,10 +2187,11 @@ def _insert_plain_text(self, cursor, text, flush=False): elif act.action == 'backspace': if not cursor.atBlockStart(): cursor.movePosition( - cursor.PreviousCharacter, cursor.MoveAnchor) + QtGui.QTextCursor.PreviousCharacter, + QtGui.QTextCursor.MoveAnchor) elif act.action == 'newline': - cursor.movePosition(cursor.EndOfLine) + cursor.movePosition(QtGui.QTextCursor.EndOfLine) # simulate replacement mode if substring is not None: @@ -2193,11 +2199,11 @@ def _insert_plain_text(self, cursor, text, flush=False): if not (hasattr(cursor,'_insert_mode') and cursor._insert_mode): pos = cursor.position() cursor2 = QtGui.QTextCursor(cursor) # self._get_line_end_pos() is the previous line, don't use it - cursor2.movePosition(cursor2.EndOfLine) + cursor2.movePosition(QtGui.QTextCursor.EndOfLine) remain = cursor2.position() - pos # number of characters until end of line n=len(substring) swallow = min(n, remain) # number of character to swallow - cursor.setPosition(pos+swallow,cursor.KeepAnchor) + cursor.setPosition(pos+swallow,QtGui.QTextCursor.KeepAnchor) cursor.insertText(substring,format) else: cursor.insertText(text) diff --git a/external-deps/qtconsole/qtconsole/frontend_widget.py b/external-deps/qtconsole/qtconsole/frontend_widget.py index ac6cf575f01..02860bb6fd6 100644 --- a/external-deps/qtconsole/qtconsole/frontend_widget.py +++ b/external-deps/qtconsole/qtconsole/frontend_widget.py @@ -733,7 +733,8 @@ def clear_output(self): """Clears the current line of output.""" cursor = self._control.textCursor() cursor.beginEditBlock() - cursor.movePosition(cursor.StartOfLine, cursor.KeepAnchor) + cursor.movePosition(QtGui.QTextCursor.StartOfLine, + QtGui.QTextCursor.KeepAnchor) cursor.insertText('') cursor.endEditBlock() diff --git a/external-deps/qtconsole/qtconsole/tests/test_00_console_widget.py b/external-deps/qtconsole/qtconsole/tests/test_00_console_widget.py index f98dfb9f53d..40f9a0d7da9 100644 --- a/external-deps/qtconsole/qtconsole/tests/test_00_console_widget.py +++ b/external-deps/qtconsole/qtconsole/tests/test_00_console_widget.py @@ -278,7 +278,7 @@ def tearDownClass(cls): QtWidgets.QApplication.quit() def assert_text_equal(self, cursor, text): - cursor.select(cursor.Document) + cursor.select(QtGui.QTextCursor.Document) selection = cursor.selectedText() self.assertEqual(selection, text) From 449edb26f4058c8ee4930c393b6f49ec48071019 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 3 Nov 2022 13:42:18 -0500 Subject: [PATCH 4/7] Update core dependencies on main.yml --- requirements/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/main.yml b/requirements/main.yml index 3f1be105646..66680c340f7 100644 --- a/requirements/main.yml +++ b/requirements/main.yml @@ -29,17 +29,17 @@ dependencies: - pyqt <5.16 - pyqtwebengine <5.16 - python-lsp-black >=1.2.0 - - python-lsp-server >=1.5.0,<1.6.0 + - python-lsp-server >=1.6.0,<1.7.0 - pyzmq >=22.1.0 - qdarkstyle >=3.0.2,<3.1.0 - qstylizer >=0.2.2 - qtawesome >=1.2.1 - - qtconsole >=5.3.2,<5.4.0 + - qtconsole >=5.4.0,<5.5.0 - qtpy >=2.1.0 - rtree >=0.9.7 - setuptools >=49.6.0 - sphinx >=0.6.6 - - spyder-kernels >=2.3.3,<2.4.0 + - spyder-kernels >=2.4.0,<2.5.0 - textdistance >=4.2.0 - three-merge >=0.1.1 - watchdog >=0.10.3 From 3e394961a1570301e5f4274c19aca58b9ed24c20 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 3 Nov 2022 15:33:55 -0500 Subject: [PATCH 5/7] CI: Remove Python 3.7 jobs --- .github/workflows/test-files.yml | 2 +- .github/workflows/test-linux.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-files.yml b/.github/workflows/test-files.yml index 25b3fc6d267..df82db3acca 100644 --- a/.github/workflows/test-files.yml +++ b/.github/workflows/test-files.yml @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - PYTHON_VERSION: ['3.7', '3.9'] + PYTHON_VERSION: ['3.9'] timeout-minutes: 30 steps: - name: Checkout Pull Requests diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 9324505bd24..a0787794df4 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -50,7 +50,7 @@ jobs: fail-fast: false matrix: INSTALL_TYPE: ['pip', 'conda'] - PYTHON_VERSION: ['3.7', '3.9'] + PYTHON_VERSION: ['3.9'] TEST_TYPE: ['fast', 'slow'] timeout-minutes: 120 steps: From 619bb0ebb7c1be023a8b7e3bd57c330dea31091b Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 3 Nov 2022 18:01:43 -0500 Subject: [PATCH 6/7] CI: Parse requirements to update spyder feedstock meta.yml --- installers-conda/build_conda_pkgs.py | 32 ++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/installers-conda/build_conda_pkgs.py b/installers-conda/build_conda_pkgs.py index 42918205b1f..ddac5fb31d6 100644 --- a/installers-conda/build_conda_pkgs.py +++ b/installers-conda/build_conda_pkgs.py @@ -34,6 +34,7 @@ # Standard library imports import os import re +import sys from argparse import ArgumentParser from configparser import ConfigParser from datetime import timedelta @@ -61,6 +62,11 @@ RESOURCES = HERE / "resources" EXTDEPS = HERE.parent / "external-deps" SPECS = DIST / "specs.yaml" +REQUIREMENTS = HERE.parent / "requirements" +REQ_MAIN = REQUIREMENTS / 'main.yml' +REQ_WINDOWS = REQUIREMENTS / 'windows.yml' +REQ_MAC = REQUIREMENTS / 'macos.yml' +REQ_LINUX = REQUIREMENTS / 'linux.yml' DIST.mkdir(exist_ok=True) @@ -156,7 +162,7 @@ def patch_meta(self): self.yaml = self._yaml.load(text) self.yaml['source'] = {'path': str(self.src_path)} - + self.yaml.pop('test', None) if 'outputs' in self.yaml: for out in self.yaml['outputs']: @@ -166,6 +172,9 @@ def patch_meta(self): self._yaml.dump_all([self.yaml], file) + self.logger.info("Patched 'meta.yaml'...") + self.logger.info(file.read_text()) + self._patched_meta = True def _patch_build(self): @@ -210,11 +219,30 @@ class SpyderCondaPkg(BuildCondaPkg): src_path = HERE.parent feedstock = "https://github.com/conda-forge/spyder-feedstock" shallow_ver = "v5.3.2" - + _yaml_yml = YAML() + def _patch_meta(self): self.yaml['build'].pop('osx_is_app', None) self.yaml.pop('app', None) + current_requirements = ['python'] + current_requirements += self._yaml_yml.load( + REQ_MAIN.read_text())['dependencies'] + if os.name == 'nt': + win_requirements = self._yaml_yml.load( + REQ_WINDOWS.read_text())['dependencies'] + current_requirements += win_requirements + current_requirements.append('ptyprocess >=0.5') + elif sys.platform == 'darwin': + mac_requirements = self._yaml_yml.load( + REQ_MAC.read_text())['dependencies'] + current_requirements += mac_requirements + else: + linux_requirements = self._yaml_yml.load( + REQ_LINUX.read_text())['dependencies'] + current_requirements += linux_requirements + self.yaml['requirements']['run'] = current_requirements + patches = self.yaml['source'].get('patches', []) patches.append(str(RESOURCES / "installers-conda.patch")) self.yaml['source']['patches'] = patches From d135d615c3a527f1bf33f283169da5d43bfacc68 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Fri, 4 Nov 2022 11:01:34 -0500 Subject: [PATCH 7/7] git subrepo pull --branch=v1.6.0 external-deps/python-lsp-server subrepo: subdir: "external-deps/python-lsp-server" merged: "0c76a528c" upstream: origin: "https://github.com/python-lsp/python-lsp-server.git" branch: "v1.6.0" commit: "0c76a528c" git-subrepo: version: "0.4.3" origin: "???" commit: "???" --- external-deps/python-lsp-server/.gitrepo | 6 +-- external-deps/python-lsp-server/CHANGELOG.md | 46 ++++++++++++++++++++ external-deps/python-lsp-server/RELEASE.md | 1 + 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/external-deps/python-lsp-server/.gitrepo b/external-deps/python-lsp-server/.gitrepo index 830ff5519c3..136461f4679 100644 --- a/external-deps/python-lsp-server/.gitrepo +++ b/external-deps/python-lsp-server/.gitrepo @@ -5,8 +5,8 @@ ; [subrepo] remote = https://github.com/python-lsp/python-lsp-server.git - branch = develop - commit = 5c37673ce1a49651bb0e0866a8602a994f434b45 - parent = ef4a41ee7fb7f0afe03311e856f04650930555c5 + branch = v1.6.0 + commit = 0c76a528c391ba723b5b1bc1a5c34dded9bb76c4 + parent = 619bb0ebb7c1be023a8b7e3bd57c330dea31091b method = merge cmdver = 0.4.3 diff --git a/external-deps/python-lsp-server/CHANGELOG.md b/external-deps/python-lsp-server/CHANGELOG.md index 4fa20e45183..6e24f10d962 100644 --- a/external-deps/python-lsp-server/CHANGELOG.md +++ b/external-deps/python-lsp-server/CHANGELOG.md @@ -1,5 +1,51 @@ # History of changes +## Version 1.6.0 (2022/11/02) + +### New features + +* Migrate to MarkupContent and convert docstrings to Markdown by default. +* Add support for flake8 version 5. +* Add function objects to Jedi completions. +* Don't include class and functions objects by default in Jedi completions. + +### Issues Closed + +* [Issue 273](https://github.com/python-lsp/python-lsp-server/issues/273) - Completion result have "typeParameter" duplicates ([PR 274](https://github.com/python-lsp/python-lsp-server/pull/274) by [@airportyh](https://github.com/airportyh)) +* [Issue 265](https://github.com/python-lsp/python-lsp-server/issues/265) - Server warns when optional modules do not exist ([PR 266](https://github.com/python-lsp/python-lsp-server/pull/266) by [@doolio](https://github.com/doolio)) +* [Issue 264](https://github.com/python-lsp/python-lsp-server/issues/264) - Errors in CONFIGURATION.md? ([PR 267](https://github.com/python-lsp/python-lsp-server/pull/267) by [@doolio](https://github.com/doolio)) +* [Issue 263](https://github.com/python-lsp/python-lsp-server/issues/263) - Conflict between README and CONFIGURATION ([PR 267](https://github.com/python-lsp/python-lsp-server/pull/267) by [@doolio](https://github.com/doolio)) +* [Issue 245](https://github.com/python-lsp/python-lsp-server/issues/245) - Add alternative ways to install python-lsp-server ([PR 248](https://github.com/python-lsp/python-lsp-server/pull/248) by [@nougcat](https://github.com/nougcat)) +* [Issue 244](https://github.com/python-lsp/python-lsp-server/issues/244) - Add function objects to completions ([PR 246](https://github.com/python-lsp/python-lsp-server/pull/246) by [@llan-ml](https://github.com/llan-ml)) +* [Issue 243](https://github.com/python-lsp/python-lsp-server/issues/243) - `Failed to load hook pylsp_completions: 'NoneType' object has no attribute 'type'` when working with Numpy 1.23 ([PR 281](https://github.com/python-lsp/python-lsp-server/pull/281) by [@gav451](https://github.com/gav451)) +* [Issue 22](https://github.com/python-lsp/python-lsp-server/issues/22) - Consider using docstring_to_markdown for markdown hover and documentation ([PR 80](https://github.com/python-lsp/python-lsp-server/pull/80) by [@krassowski](https://github.com/krassowski)) +* [Issue 21](https://github.com/python-lsp/python-lsp-server/issues/21) - Migrate from deprecated MarkedString to MarkupContent ([PR 80](https://github.com/python-lsp/python-lsp-server/pull/80) by [@krassowski](https://github.com/krassowski)) + +In this release 9 issues were closed. + +### Pull Requests Merged + +* [PR 285](https://github.com/python-lsp/python-lsp-server/pull/285) - Don't include class objects by default in completions, by [@ccordoba12](https://github.com/ccordoba12) +* [PR 281](https://github.com/python-lsp/python-lsp-server/pull/281) - Improve how Jedi handles Numpy, by [@gav451](https://github.com/gav451) ([243](https://github.com/python-lsp/python-lsp-server/issues/243)) +* [PR 274](https://github.com/python-lsp/python-lsp-server/pull/274) - Make default for `include_function_objects` false, by [@airportyh](https://github.com/airportyh) ([273](https://github.com/python-lsp/python-lsp-server/issues/273)) +* [PR 272](https://github.com/python-lsp/python-lsp-server/pull/272) - Include params only for classes and functions, by [@llan-ml](https://github.com/llan-ml) +* [PR 267](https://github.com/python-lsp/python-lsp-server/pull/267) - Update the configuration schema for consistency, by [@doolio](https://github.com/doolio) ([264](https://github.com/python-lsp/python-lsp-server/issues/264), [263](https://github.com/python-lsp/python-lsp-server/issues/263)) +* [PR 266](https://github.com/python-lsp/python-lsp-server/pull/266) - Prefer info log message for missing optional modules, by [@doolio](https://github.com/doolio) ([265](https://github.com/python-lsp/python-lsp-server/issues/265)) +* [PR 262](https://github.com/python-lsp/python-lsp-server/pull/262) - Fix options not being passed to yapf format, by [@masad-frost](https://github.com/masad-frost) +* [PR 261](https://github.com/python-lsp/python-lsp-server/pull/261) - PR: Include all symbols that Jedi reports as declared in a file when `add_import_symbols` is `False`, by [@ccordoba12](https://github.com/ccordoba12) +* [PR 258](https://github.com/python-lsp/python-lsp-server/pull/258) - Fix pylint message in tests, by [@bnavigator](https://github.com/bnavigator) +* [PR 257](https://github.com/python-lsp/python-lsp-server/pull/257) - Add support for flake8 version 5, by [@bnavigator](https://github.com/bnavigator) +* [PR 250](https://github.com/python-lsp/python-lsp-server/pull/250) - Include traceback when plugin fails to load, by [@j2kun](https://github.com/j2kun) +* [PR 248](https://github.com/python-lsp/python-lsp-server/pull/248) - Add more installation instructions to Readme, by [@nougcat](https://github.com/nougcat) ([245](https://github.com/python-lsp/python-lsp-server/issues/245)) +* [PR 246](https://github.com/python-lsp/python-lsp-server/pull/246) - Add support for including function objects, by [@llan-ml](https://github.com/llan-ml) ([244](https://github.com/python-lsp/python-lsp-server/issues/244)) +* [PR 242](https://github.com/python-lsp/python-lsp-server/pull/242) - Remove redundant wheel dep from pyproject.toml, by [@mgorny](https://github.com/mgorny) +* [PR 241](https://github.com/python-lsp/python-lsp-server/pull/241) - Update release instructions to use new build mechanism, by [@ccordoba12](https://github.com/ccordoba12) +* [PR 80](https://github.com/python-lsp/python-lsp-server/pull/80) - Migrate to MarkupContent and convert docstrings to Markdown, by [@krassowski](https://github.com/krassowski) ([22](https://github.com/python-lsp/python-lsp-server/issues/22), [21](https://github.com/python-lsp/python-lsp-server/issues/21)) + +In this release 16 pull requests were closed. + +---- + ## Version 1.5.0 (2022/07/10) ### New features diff --git a/external-deps/python-lsp-server/RELEASE.md b/external-deps/python-lsp-server/RELEASE.md index 461584d364d..bf7b7086f26 100644 --- a/external-deps/python-lsp-server/RELEASE.md +++ b/external-deps/python-lsp-server/RELEASE.md @@ -6,6 +6,7 @@ This is necessary to run our tests before the release, so we can be sure everything is in order. + ## To release a new version of python-lsp-server: 1. git fetch upstream && git checkout upstream/master