Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Jupyter Server v2 #110

Merged
merged 4 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
python-version: '3.9'
architecture: 'x64'
- name: Install dependencies
run: python -m pip install jupyterlab pytest pytest-tornasync==0.6.0.post2
run: python -m pip install jupyterlab pytest "pytest-jupyter[server]>=0.6.0"
- name: Build the extension
run: |
jlpm
Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

pytest_plugins = ["jupyter_server.pytest_plugin"]
pytest_plugins = ["pytest_jupyter.jupyter_server"]


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion jupyter_archive/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ async def get(self, archive_path, include_body=False):
self.check_xsrf_cookie()
cm = self.contents_manager

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

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
cmdclass=cmdclass,
packages=setuptools.find_packages(),
install_requires=[
"jupyter_server>=1.6,<2",
"jupyter_server>=1.21,<3",
],
extra_requires={"test": ["pytest", "pytest-tornasync"]},
extra_requires={"test": ["pytest", "pytest-jupyter[server]>=0.6.0"]},
zip_safe=False,
include_package_data=True,
python_requires=">=3.6,<4",
Expand All @@ -79,6 +79,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 3",
Expand Down