diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 320a640e0e..39cf8836fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.2 + rev: 0.28.4 hooks: - id: check-github-workflows @@ -39,7 +39,7 @@ repos: types_or: [yaml, html, json] - repo: https://github.com/codespell-project/codespell - rev: "v2.2.6" + rev: "v2.3.0" hooks: - id: codespell args: ["-L", "sur,nd"] @@ -61,7 +61,7 @@ repos: ["traitlets>=5.13", "jupyter_core>=5.5", "jupyter_client>=8.5"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.3 + rev: v0.4.7 hooks: - id: ruff types_or: [python, jupyter] diff --git a/jupyter_server/services/contents/fileio.py b/jupyter_server/services/contents/fileio.py index f62ecbdc73..5799b57497 100644 --- a/jupyter_server/services/contents/fileio.py +++ b/jupyter_server/services/contents/fileio.py @@ -191,7 +191,7 @@ class FileManagerMixin(LoggingConfigurable, Configurable): use_atomic_writing = Bool( True, config=True, - help="""By default notebooks are saved on disk on a temporary file and then if succefully written, it replaces the old ones. + help="""By default notebooks are saved on disk on a temporary file and then if successfully written, it replaces the old ones. This procedure, namely 'atomic_writing', causes some bugs on file system without operation order enforcement (like some networked fs). If set to False, the new notebook is written directly on the old one which could fail (eg: full filesystem or quota )""", ) diff --git a/jupyter_server/utils.py b/jupyter_server/utils.py index 9a1bd89afb..0c987bff25 100644 --- a/jupyter_server/utils.py +++ b/jupyter_server/utils.py @@ -10,6 +10,7 @@ import socket import sys import warnings +from _frozen_importlib_external import _NamespacePath from contextlib import contextmanager from pathlib import Path from typing import Any, Generator, NewType, Sequence @@ -26,7 +27,6 @@ ) from urllib.request import pathname2url as _pathname2url -from _frozen_importlib_external import _NamespacePath from jupyter_core.utils import ensure_async as _ensure_async from packaging.version import Version from tornado.httpclient import AsyncHTTPClient, HTTPClient, HTTPRequest, HTTPResponse diff --git a/tests/test_files.py b/tests/test_files.py index 9f6105090e..84d63b934c 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -225,5 +225,5 @@ async def test_old_files_redirect(jp_fetch, jp_serverapp, jp_root_dir): # r = self.request('GET', 'files/test.txt?download=1') # disposition = r.headers.get('Content-Disposition', '') - # self.assertIn('attachment', disposition) - # self.assertIn("filename*=utf-8''test.txt", disposition) + # assert 'attachment' in disposition + # assert "filename*=utf-8''test.txt" in disposition