diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d4807e6..5a057b48 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,12 +85,15 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.8", "3.11"] + python-version: ["3.8", "3.11", "3.12"] # PyPy is not supported because we use the file_id_manager. See: # https://github.com/jupyter-server/jupyter_server_fileid/issues/44 #include: # - os: ubuntu-latest # python-version: "pypy-3.8" + exclude: + - os: windows-latest + python-version: "3.12" steps: - name: Checkout uses: actions/checkout@v3 @@ -172,7 +175,7 @@ jobs: - name: Install the Python dependencies run: | - pip install --pre -e ".[test]" + pip install -e ".[test]" - name: List installed packages run: | diff --git a/jupyter_collaboration/handlers.py b/jupyter_collaboration/handlers.py index 4f000041..61a73d7c 100644 --- a/jupyter_collaboration/handlers.py +++ b/jupyter_collaboration/handlers.py @@ -105,7 +105,9 @@ async def prepare(self): await self._websocket_server.start_room(self.room) self._websocket_server.add_room(self._room_id, self.room) - return await super().prepare() + res = super().prepare() + if res is not None: + return await res def initialize( self, diff --git a/package.json b/package.json index b8e3210a..446684f7 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,13 @@ "jupyterlab", "jupyterlab-extension" ], - "homepage": "https://github.com/jupyterlab/jupyter_collaboration", + "homepage": "https://github.com/jupyterlab/jupyter-collaboration", "bugs": { - "url": "https://github.com/jupyterlab/jupyter_collaboration/issues" + "url": "https://github.com/jupyterlab/jupyter-collaboration/issues" }, "repository": { "type": "git", - "url": "https://github.com/jupyterlab/jupyter_collaboration.git" + "url": "https://github.com/jupyterlab/jupyter-collaboration.git" }, "license": "BSD-3-Clause", "author": { @@ -65,6 +65,5 @@ "stylelint-prettier": "^3.0.0", "typedoc": "~0.23.28", "typescript": "~5.0.4" - }, - "packageManager": "yarn@3.5.0" + } } diff --git a/packages/collaboration-extension/package.json b/packages/collaboration-extension/package.json index 74f47eb7..304246dc 100644 --- a/packages/collaboration-extension/package.json +++ b/packages/collaboration-extension/package.json @@ -7,13 +7,13 @@ "jupyterlab", "jupyterlab-extension" ], - "homepage": "https://github.com/jupyterlab/jupyter_collaboration", + "homepage": "https://github.com/jupyterlab/jupyter-collaboration", "bugs": { - "url": "https://github.com/jupyterlab/jupyter_collaboration/issues" + "url": "https://github.com/jupyterlab/jupyter-collaboration/issues" }, "repository": { "type": "git", - "url": "https://github.com/jupyterlab/jupyter_collaboration.git" + "url": "https://github.com/jupyterlab/jupyter-collaboration.git" }, "license": "BSD-3-Clause", "author": "Project Jupyter", diff --git a/packages/collaboration/package.json b/packages/collaboration/package.json index 8b36751a..2d126d60 100644 --- a/packages/collaboration/package.json +++ b/packages/collaboration/package.json @@ -2,13 +2,13 @@ "name": "@jupyter/collaboration", "version": "1.0.1", "description": "JupyterLab - Real-Time Collaboration Widgets", - "homepage": "https://github.com/jupyterlab/jupyter_collaboration", + "homepage": "https://github.com/jupyterlab/jupyter-collaboration", "bugs": { - "url": "https://github.com/jupyterlab/jupyter_collaboration/issues" + "url": "https://github.com/jupyterlab/jupyter-collaboration/issues" }, "repository": { "type": "git", - "url": "https://github.com/jupyterlab/jupyter_collaboration.git" + "url": "https://github.com/jupyterlab/jupyter-collaboration.git" }, "license": "BSD-3-Clause", "author": "Project Jupyter", diff --git a/packages/docprovider/package.json b/packages/docprovider/package.json index bff11844..f0ff8009 100644 --- a/packages/docprovider/package.json +++ b/packages/docprovider/package.json @@ -2,13 +2,13 @@ "name": "@jupyter/docprovider", "version": "1.0.1", "description": "JupyterLab - Document Provider", - "homepage": "https://github.com/jupyterlab/jupyter_collaboration", + "homepage": "https://github.com/jupyterlab/jupyter-collaboration", "bugs": { - "url": "https://github.com/jupyterlab/jupyter_collaboration/issues" + "url": "https://github.com/jupyterlab/jupyter-collaboration/issues" }, "repository": { "type": "git", - "url": "https://github.com/jupyterlab/jupyter_collaboration.git" + "url": "https://github.com/jupyterlab/jupyter-collaboration.git" }, "license": "BSD-3-Clause", "author": "Project Jupyter", diff --git a/pyproject.toml b/pyproject.toml index f501a189..2c9dd593 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,6 @@ test = [ "jupyter_server_fileid[test]", "pytest>=7.0", "pytest-cov", - "pytest-asyncio", "websockets" ] docs = [ @@ -141,6 +140,8 @@ filterwarnings = [ "module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning", # In PyPy/Cython: see https://github.com/yaml/pyyaml/issues/688 "ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning", + # see https://github.com/dateutil/dateutil/issues/1314 + "ignore:.*datetime.utcfromtimestamp\\(\\) is deprecated.*:DeprecationWarning:", ] [tool.mypy] diff --git a/tests/test_loaders.py b/tests/test_loaders.py index 6ee57648..483a2c80 100644 --- a/tests/test_loaders.py +++ b/tests/test_loaders.py @@ -6,14 +6,11 @@ import asyncio from datetime import datetime -import pytest - from jupyter_collaboration.loaders import FileLoader, FileLoaderMapping from .utils import FakeContentsManager, FakeFileIDManager -@pytest.mark.asyncio async def test_FileLoader_with_watcher(): id = "file-4567" path = "myfile.txt" @@ -46,7 +43,6 @@ async def trigger(*args): await loader.clean() -@pytest.mark.asyncio async def test_FileLoader_without_watcher(): id = "file-4567" path = "myfile.txt" @@ -78,7 +74,6 @@ async def trigger(*args): await loader.clean() -@pytest.mark.asyncio async def test_FileLoaderMapping_with_watcher(): id = "file-4567" path = "myfile.txt" diff --git a/tests/test_rooms.py b/tests/test_rooms.py index 7ecc5ccd..8f788687 100644 --- a/tests/test_rooms.py +++ b/tests/test_rooms.py @@ -6,13 +6,11 @@ import asyncio from datetime import datetime -import pytest from jupyter_ydoc import YUnicode from .utils import overite_msg, reload_msg -@pytest.mark.asyncio async def test_should_initialize_document_room_without_store(rtc_create_mock_document_room): content = "test" _, _, room = rtc_create_mock_document_room("test-id", "test.txt", content) @@ -21,7 +19,6 @@ async def test_should_initialize_document_room_without_store(rtc_create_mock_doc assert room._document.source == content -@pytest.mark.asyncio async def test_should_initialize_document_room_from_store( rtc_create_SQLite_store, rtc_create_mock_document_room ): @@ -38,7 +35,6 @@ async def test_should_initialize_document_room_from_store( assert room._document.source == content -@pytest.mark.asyncio async def test_should_overwrite_the_store(rtc_create_SQLite_store, rtc_create_mock_document_room): id = "test-id" content = "test" @@ -54,7 +50,6 @@ async def test_should_overwrite_the_store(rtc_create_SQLite_store, rtc_create_mo assert doc.source == content -@pytest.mark.asyncio async def test_defined_save_delay_should_save_content_after_document_change( rtc_create_mock_document_room, ): @@ -70,7 +65,6 @@ async def test_defined_save_delay_should_save_content_after_document_change( assert "save" in cm.actions -@pytest.mark.asyncio async def test_undefined_save_delay_should_not_save_content_after_document_change( rtc_create_mock_document_room, ): @@ -86,7 +80,6 @@ async def test_undefined_save_delay_should_not_save_content_after_document_chang assert "save" not in cm.actions -@pytest.mark.asyncio async def test_should_reload_content_from_disk(rtc_create_mock_document_room): content = "test" last_modified = datetime.now() @@ -109,7 +102,6 @@ async def test_should_reload_content_from_disk(rtc_create_mock_document_room): assert room._document.source == content -@pytest.mark.asyncio async def test_should_not_reload_content_from_disk(rtc_create_mock_document_room): content = "test" last_modified = datetime.now()