Skip to content

Commit

Permalink
merge upstream 2.12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmarkarl committed Feb 5, 2024
2 parents 131878d + b48e64c commit da34455
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 28 deletions.
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.

<!-- <START NEW CHANGELOG ENTRY> -->

## 2.12.5

([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v2.12.4...a3a9d3deea7a798d13fe09a41e53f6f825caf21b))

### Maintenance and upkeep improvements

- Improve warning handling [#1386](https://github.com/jupyter-server/jupyter_server/pull/1386) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_server/graphs/contributors?from=2024-01-11&to=2024-01-16&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Ablink1073+updated%3A2024-01-11..2024-01-16&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 2.12.4

([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v2.12.3...7bb21b45392c889b5c87eb0d1b48662a497ba15a))
Expand All @@ -18,8 +34,6 @@ All notable changes to this project will be documented in this file.

[@minrk](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Aminrk+updated%3A2024-01-09..2024-01-11&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 2.12.3

([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v2.12.2...99b9126853b69aafb700b4c92b50b83b7ca00e32))
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import List

# Version string must appear intact for automatic versioning
__version__ = "2.12.4"
__version__ = "2.12.5"

# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
Expand Down
4 changes: 2 additions & 2 deletions jupyter_server/services/contents/largefilemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def save(self, model, path=""):
path = path.strip("/")

if chunk == 1:
self.run_pre_save_hook(model=model, path=path)
self.run_pre_save_hooks(model=model, path=path)

if "type" not in model:
raise web.HTTPError(400, "No file type provided")
Expand Down Expand Up @@ -92,7 +92,7 @@ async def save(self, model, path=""):
path = path.strip("/")

if chunk == 1:
self.run_pre_save_hook(model=model, path=path)
self.run_pre_save_hooks(model=model, path=path)

if "type" not in model:
raise web.HTTPError(400, "No file type provided")
Expand Down
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,7 @@ timeout = 100
timeout_method = "thread"
filterwarnings = [
"error",
"ignore:Passing a schema to Validator.iter_errors:DeprecationWarning",
"ignore:run_pre_save_hook is deprecated:DeprecationWarning",
"always:unclosed <socket.socket:ResourceWarning",
"module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
"ignore:jupyter_server.base.zmqhandlers module is deprecated in Jupyter Server 2.0:DeprecationWarning",
"ignore:datetime.datetime.utc:DeprecationWarning:dateutil",
"ignore:datetime.datetime.utc:DeprecationWarning:tornado",
"ignore:datetime.datetime.utc:DeprecationWarning",
"module:add_callback_from_signal is deprecated:DeprecationWarning",
]

Expand Down
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import os

# isort: off
# This must come before any Jupyter imports.
os.environ["JUPYTER_PLATFORM_DIRS"] = "1"
# isort: on

import pytest
from nbformat import writes
from nbformat.v4 import new_notebook
Expand Down
8 changes: 6 additions & 2 deletions tests/extension/test_app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import asyncio
import json
from io import StringIO
from logging import StreamHandler
from typing import Any
from unittest import mock

import pytest
from traitlets.config import Config
Expand Down Expand Up @@ -121,12 +123,14 @@ def test_extensionapp_no_parent():

@pytest.mark.parametrize("expected_value, config", OPEN_BROWSER_COMBINATIONS)
async def test_browser_open(monkeypatch, jp_environ, config, expected_value):
serverapp = MockExtensionApp.initialize_server(config=Config(config))
with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"):
serverapp = MockExtensionApp.initialize_server(config=Config(config))
assert serverapp.open_browser == expected_value


async def test_load_parallel_extensions(monkeypatch, jp_environ):
serverapp = MockExtensionApp.initialize_server()
with mock.patch("jupyter_server.serverapp.ServerApp.init_httpserver"):
serverapp = MockExtensionApp.initialize_server()
exts = serverapp.extension_manager.extensions
assert "tests.extension.mockextensions.mock1" in exts
assert "tests.extension.mockextensions" in exts
Expand Down
29 changes: 15 additions & 14 deletions tests/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,20 +715,21 @@ async def test_websocket_connection_closed(init_gateway, jp_serverapp, jp_fetch,
handler.ws_connection.is_closing = lambda: True

# Create the GatewayWebSocketConnection and attach it to the handler...
conn = GatewayWebSocketConnection(parent=km, websocket_handler=handler)
handler.connection = conn
await conn.connect()

# Processing websocket messages happens in separate coroutines and any
# errors in that process will show up in logs, but not bubble up to the
# caller.
#
# To check for these, we wait for the server to stop and then check the
# logs for errors.
await jp_serverapp._cleanup()
for _, level, message in caplog.record_tuples:
if level >= logging.ERROR:
pytest.fail(f"Logs contain an error: {message}")
with mocked_gateway:
conn = GatewayWebSocketConnection(parent=km, websocket_handler=handler)
handler.connection = conn
await conn.connect()

# Processing websocket messages happens in separate coroutines and any
# errors in that process will show up in logs, but not bubble up to the
# caller.
#
# To check for these, we wait for the server to stop and then check the
# logs for errors.
await jp_serverapp._cleanup()
for _, level, message in caplog.record_tuples:
if level >= logging.ERROR:
pytest.fail(f"Logs contain an error: {message}")


#
Expand Down

0 comments on commit da34455

Please sign in to comment.