Skip to content

Commit eee02a7

Browse files
committed
Merge remote-tracking branch 'origin/main' into error_page_template
2 parents 5744f6d + 63053d2 commit eee02a7

File tree

43 files changed

+628
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+628
-146
lines changed

.github/workflows/python-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-latest, windows-latest, macos-latest]
21-
python-version: ["3.8", "3.11"]
21+
python-version: ["3.9", "3.11", "3.12"]
2222
include:
2323
- os: windows-latest
2424
python-version: "3.9"
2525
- os: ubuntu-latest
26-
python-version: "pypy-3.8"
26+
python-version: "pypy-3.9"
2727
- os: macos-latest
2828
python-version: "3.10"
2929
- os: ubuntu-latest
@@ -180,7 +180,7 @@ jobs:
180180
fail-fast: false
181181
matrix:
182182
os: [ubuntu-latest]
183-
python-version: ["3.8", "3.9", "3.10", "3.11"]
183+
python-version: ["3.9", "3.10", "3.11", "3.12"]
184184
steps:
185185
- uses: actions/checkout@v4
186186
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
@@ -194,7 +194,7 @@ jobs:
194194
- uses: actions/checkout@v4
195195
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
196196
with:
197-
python_version: "pypy-3.8"
197+
python_version: "pypy-3.9"
198198
- name: Run the tests
199199
run: hatch -v run test:nowarn --integration_tests=true
200200

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
- id: trailing-whitespace
2222

2323
- repo: https://github.com/python-jsonschema/check-jsonschema
24-
rev: 0.28.4
24+
rev: 0.28.6
2525
hooks:
2626
- id: check-github-workflows
2727

@@ -52,7 +52,7 @@ repos:
5252
- id: rst-inline-touching-normal
5353

5454
- repo: https://github.com/pre-commit/mirrors-mypy
55-
rev: "v1.10.0"
55+
rev: "v1.10.1"
5656
hooks:
5757
- id: mypy
5858
files: jupyter_server
@@ -61,7 +61,7 @@ repos:
6161
["traitlets>=5.13", "jupyter_core>=5.5", "jupyter_client>=8.5"]
6262

6363
- repo: https://github.com/astral-sh/ruff-pre-commit
64-
rev: v0.4.7
64+
rev: v0.5.0
6565
hooks:
6666
- id: ruff
6767
types_or: [python, jupyter]

CHANGELOG.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file.
44

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

7+
## 2.14.2
8+
9+
([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v2.14.1...b961d4eb499071c0c60e24f429c20d1e6a908a32))
10+
11+
### Bugs fixed
12+
13+
- Pass session_id during Websocket connect [#1440](https://github.com/jupyter-server/jupyter_server/pull/1440) ([@gogasca](https://github.com/gogasca))
14+
- Do not log environment variables passed to kernels [#1437](https://github.com/jupyter-server/jupyter_server/pull/1437) ([@krassowski](https://github.com/krassowski))
15+
16+
### Maintenance and upkeep improvements
17+
18+
- chore: update pre-commit hooks [#1441](https://github.com/jupyter-server/jupyter_server/pull/1441) ([@pre-commit-ci](https://github.com/pre-commit-ci))
19+
- chore: update pre-commit hooks [#1427](https://github.com/jupyter-server/jupyter_server/pull/1427) ([@pre-commit-ci](https://github.com/pre-commit-ci))
20+
21+
### Documentation improvements
22+
23+
- Update documentation for `cookie_secret` [#1433](https://github.com/jupyter-server/jupyter_server/pull/1433) ([@krassowski](https://github.com/krassowski))
24+
- Add Changelog for 2.14.1 [#1430](https://github.com/jupyter-server/jupyter_server/pull/1430) ([@blink1073](https://github.com/blink1073))
25+
- Update simple extension examples: \_jupyter_server_extension_points [#1426](https://github.com/jupyter-server/jupyter_server/pull/1426) ([@manics](https://github.com/manics))
26+
27+
### Contributors to this release
28+
29+
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_server/graphs/contributors?from=2024-05-31&to=2024-07-12&type=c))
30+
31+
[@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Ablink1073+updated%3A2024-05-31..2024-07-12&type=Issues) | [@gogasca](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Agogasca+updated%3A2024-05-31..2024-07-12&type=Issues) | [@krassowski](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Akrassowski+updated%3A2024-05-31..2024-07-12&type=Issues) | [@manics](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Amanics+updated%3A2024-05-31..2024-07-12&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Apre-commit-ci+updated%3A2024-05-31..2024-07-12&type=Issues)
32+
33+
<!-- <END NEW CHANGELOG ENTRY> -->
34+
735
## 2.14.1
836

937
([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v2.14.0...f1379164fa209bc4bfeadf43ab0e7f473b03a0ce))
@@ -27,8 +55,6 @@ All notable changes to this project will be documented in this file.
2755

2856
[@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Ablink1073+updated%3A2024-04-11..2024-05-31&type=Issues) | [@lresende](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Alresende+updated%3A2024-04-11..2024-05-31&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Apre-commit-ci+updated%3A2024-04-11..2024-05-31&type=Issues)
2957

30-
<!-- <END NEW CHANGELOG ENTRY> -->
31-
3258
## 2.14.0
3359

3460
([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v2.13.0...074628806d6b2ec3304d60ab5cfba1c326f67730))

examples/simple/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ build-backend = "hatchling.build"
66
name = "jupyter-server-example"
77
description = "Jupyter Server Example"
88
readme = "README.md"
9-
license = ""
10-
requires-python = ">=3.8"
9+
license = "MIT"
10+
requires-python = ">=3.9"
1111
dependencies = [
1212
"jinja2",
1313
"jupyter_server",

examples/simple/simple_ext1/handlers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def get(self):
1818
self.log.info(f"Extension Name in {self.name} Default Handler: {self.name}")
1919
# A method for getting the url to static files (prefixed with /static/<name>).
2020
self.log.info(
21-
"Static URL for / in simple_ext1 Default Handler: {}".format(self.static_url(path="/"))
21+
"Static URL for / in simple_ext1 Default Handler: %s",
22+
self.static_url(path="/"),
2223
)
2324
self.write("<h1>Hello Simple 1 - I am the default...</h1>")
2425
self.write(f"Config in {self.name} Default Handler: {self.config}")

jupyter_server/_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"""
55

66
import re
7-
from typing import List
87

98
# Version string must appear intact for automatic versioning
109
__version__ = "2.15.0.dev0"
@@ -13,7 +12,7 @@
1312
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
1413
match = re.match(pattern, __version__)
1514
assert match is not None
16-
parts: List[object] = [int(match[part]) for part in ["major", "minor", "patch"]]
15+
parts: list[object] = [int(match[part]) for part in ["major", "minor", "patch"]]
1716
if match["rest"]:
1817
parts.append(match["rest"])
1918
version_info = tuple(parts)

jupyter_server/auth/authorizer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010
# Distributed under the terms of the Modified BSD License.
1111
from __future__ import annotations
1212

13-
from typing import TYPE_CHECKING, Awaitable
13+
from typing import TYPE_CHECKING
1414

1515
from traitlets import Instance
1616
from traitlets.config import LoggingConfigurable
1717

1818
from .identity import IdentityProvider, User
1919

2020
if TYPE_CHECKING:
21+
from collections.abc import Awaitable
22+
2123
from jupyter_server.base.handlers import JupyterHandler
2224

2325

jupyter_server/base/call_context.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Distributed under the terms of the Modified BSD License.
44

55
from contextvars import Context, ContextVar, copy_context
6-
from typing import Any, Dict, List
6+
from typing import Any
77

88

99
class CallContext:
@@ -22,7 +22,7 @@ class CallContext:
2222
# easier management over maintaining a set of ContextVar instances, since the Context is a
2323
# map of ContextVar instances to their values, and the "name" is no longer a lookup key.
2424
_NAME_VALUE_MAP = "_name_value_map"
25-
_name_value_map: ContextVar[Dict[str, Any]] = ContextVar(_NAME_VALUE_MAP)
25+
_name_value_map: ContextVar[dict[str, Any]] = ContextVar(_NAME_VALUE_MAP)
2626

2727
@classmethod
2828
def get(cls, name: str) -> Any:
@@ -65,7 +65,7 @@ def set(cls, name: str, value: Any) -> None:
6565
name_value_map[name] = value
6666

6767
@classmethod
68-
def context_variable_names(cls) -> List[str]:
68+
def context_variable_names(cls) -> list[str]:
6969
"""Returns a list of variable names set for this call context.
7070
7171
Returns
@@ -77,7 +77,7 @@ def context_variable_names(cls) -> List[str]:
7777
return list(name_value_map.keys())
7878

7979
@classmethod
80-
def _get_map(cls) -> Dict[str, Any]:
80+
def _get_map(cls) -> dict[str, Any]:
8181
"""Get the map of names to their values from the _NAME_VALUE_MAP context var.
8282
8383
If the map does not exist in the current context, an empty map is created and returned.

jupyter_server/base/handlers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
import re
1414
import types
1515
import warnings
16+
from collections.abc import Awaitable, Coroutine, Sequence
1617
from http.client import responses
1718
from logging import Logger
18-
from typing import TYPE_CHECKING, Any, Awaitable, Coroutine, Sequence, cast
19+
from typing import TYPE_CHECKING, Any, cast
1920
from urllib.parse import urlparse
2021

2122
import prometheus_client

jupyter_server/config_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from traitlets.config import LoggingConfigurable
1515
from traitlets.traitlets import Bool, Unicode
1616

17-
StrDict = t.Dict[str, t.Any]
17+
StrDict = dict[str, t.Any]
1818

1919

2020
def recursive_update(target: StrDict, new: StrDict) -> None:

0 commit comments

Comments
 (0)