A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix(deps): update ruff, mkdocs, pytest (#3427)
renovate[bot]f59ea38abead
diff --git a/pyproject.toml b/pyproject.tomlindex 4ab9ecf809..887d0e5337 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -115,12 +115,12 @@ docs = ["mkdocs-material>=9.5.49","mkdocstrings[python]>=0.27.0","mkdocs-material-extensions>=1.3.1",- "mkdocs-autorefs>=1.0.1",- "mkdocs-git-revision-date-localized-plugin>=1.2.4",+ "mkdocs-autorefs>=1.2.0",+ "mkdocs-git-revision-date-localized-plugin>=1.3.0","mkdocs-minify-plugin>=0.8.0",- "mkdocs-glightbox>=0.3.7",- "mkdocs-macros-plugin>=1.3.0",- "mkdocs-redirects>=1.0.0",+ "mkdocs-glightbox>=0.4.0",+ "mkdocs-macros-plugin>=1.3.7",+ "mkdocs-redirects>=1.2.2","mkdocs-click>=0.8.1","mike>=2.0.0", # for versioning"pillow>=10.2.0", # for social cards@@ -192,10 +192,10 @@ extra-dependencies = [# For server testing"httpx~=0.27.0","matplotlib~=3.9.2",- "pytest~=8.3.2",+ "pytest~=8.3.4","pytest-timeout~=2.3.1",- "pytest-codecov~=0.5.1",- "pytest-asyncio~=0.23.8",+ "pytest-codecov~=0.6.1",+ "pytest-asyncio~=0.25.2",][[tool.hatch.envs.test.matrix]]@@ -220,10 +220,10 @@ extra-dependencies = ["hypothesis~=6.102.1","httpx~=0.27.0","matplotlib~=3.9.2",- "pytest~=8.3.2",+ "pytest~=8.3.4","pytest-timeout~=2.3.1",- "pytest-codecov~=0.5.1",- "pytest-asyncio~=0.23.8",+ "pytest-codecov~=0.6.1",+ "pytest-asyncio~=0.25.2",# For testing mo.ui.chart, table, ..."vl-convert-python","pyarrow",diff --git a/tests/_server/api/test_interrupt.py b/tests/_server/api/test_interrupt.pyindex 99bc91ce81..b63c2e669a 100644--- a/tests/_server/api/test_interrupt.py+++ b/tests/_server/api/test_interrupt.py@@ -1,10 +1,13 @@# Copyright 2024 Marimo. All rights reserved.+from __future__ import annotations++import asynciofrom unittest.mock import Mock, patchfrom marimo._server.api.interrupt import InterruptHandler-def test_interrupt_handler() -> None:+async def test_interrupt_handler() -> None:shutdown_mock = Mock()# Create an instance of InterruptHandler with quiet mode disabled@@ -13,21 +16,23 @@ def test_interrupt_handler() -> None:# Register the interrupt handlerinterrupt_handler.register()- # Simulate Ctrl+C signal- interrupt_handler.loop.call_soon(interrupt_handler.loop.stop)- interrupt_handler.loop.call_soon(interrupt_handler._interrupt_handler)+ # Mock the input function before simulating Ctrl+C+ with patch("builtins.input", return_value="y"):+ # Simulate Ctrl+C signal+ interrupt_handler.loop.call_soon(interrupt_handler._interrupt_handler)+ await asyncio.sleep(0) # Let the event loop process the signal- # Run the event loop to process the signal- interrupt_handler.loop.run_forever()+ # Assert that the shutdown callable was called+ shutdown_mock.assert_called_once()- # Assert that the shutdown callable was not called yet- shutdown_mock.assert_not_called()+ # Reset the mock for the next test+ shutdown_mock.reset_mock()- # Simulate user input 'y' for yes- with patch("builtins.input", return_value="y"):- interrupt_handler.loop.call_soon(interrupt_handler.loop.stop)+ # Test with 'n' response+ with patch("builtins.input", return_value="n"):+ # Simulate Ctrl+C signalinterrupt_handler.loop.call_soon(interrupt_handler._interrupt_handler)- interrupt_handler.loop.run_forever()+ await asyncio.sleep(0) # Let the event loop process the signal- # Assert that the shutdown callable was called after user input- shutdown_mock.assert_called_once()+ # Assert that the shutdown callable was not called+ shutdown_mock.assert_not_called()