Skip to content

Commit 4ea514d

Browse files
authored
Add support for Jupyter Server v2 (#110)
* Add support for Jupyter Server v2 * Fix install test dep in CI * Install the test dep at the right place * Fix using `is_hidden`
1 parent f83d39c commit 4ea514d

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version: '3.9'
2323
architecture: 'x64'
2424
- name: Install dependencies
25-
run: python -m pip install jupyterlab pytest pytest-tornasync==0.6.0.post2
25+
run: python -m pip install jupyterlab pytest "pytest-jupyter[server]>=0.6.0"
2626
- name: Build the extension
2727
run: |
2828
jlpm

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
pytest_plugins = ["jupyter_server.pytest_plugin"]
3+
pytest_plugins = ["pytest_jupyter.jupyter_server"]
44

55

66
@pytest.fixture

jupyter_archive/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ async def get(self, archive_path, include_body=False):
224224
self.check_xsrf_cookie()
225225
cm = self.contents_manager
226226

227-
if cm.is_hidden(archive_path) and not cm.allow_hidden:
227+
if await ensure_async(cm.is_hidden(archive_path)) and not cm.allow_hidden:
228228
self.log.info("Refusing to serve hidden file, via 404 Error")
229229
raise web.HTTPError(404)
230230

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
cmdclass=cmdclass,
6262
packages=setuptools.find_packages(),
6363
install_requires=[
64-
"jupyter_server>=1.6,<2",
64+
"jupyter_server>=1.21,<3",
6565
],
66-
extra_requires={"test": ["pytest", "pytest-tornasync"]},
66+
extra_requires={"test": ["pytest", "pytest-jupyter[server]>=0.6.0"]},
6767
zip_safe=False,
6868
include_package_data=True,
6969
python_requires=">=3.6,<4",
@@ -79,6 +79,7 @@
7979
"Programming Language :: Python :: 3.8",
8080
"Programming Language :: Python :: 3.9",
8181
"Programming Language :: Python :: 3.10",
82+
"Programming Language :: Python :: 3.11",
8283
"Framework :: Jupyter",
8384
"Framework :: Jupyter :: JupyterLab",
8485
"Framework :: Jupyter :: JupyterLab :: 3",

0 commit comments

Comments
 (0)