Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-jupyterlab-server for
openSUSE:Factory checked in at 2024-09-16 17:42:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyterlab-server (Old)
and /work/SRC/openSUSE:Factory/.python-jupyterlab-server.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyterlab-server"
Mon Sep 16 17:42:43 2024 rev:14 rq:1201268 version:2.27.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-jupyterlab-server/python-jupyterlab-server.changes
2024-06-27 16:01:09.909895071 +0200
+++
/work/SRC/openSUSE:Factory/.python-jupyterlab-server.new.29891/python-jupyterlab-server.changes
2024-09-16 17:43:50.714965377 +0200
@@ -1,0 +2,9 @@
+Sun Sep 15 16:12:43 UTC 2024 - Ben Greiner <[email protected]>
+
+- Update to 2.27.3
+ * Fix handling language packs for pseudo language #456
+ (@fcollonval)
+ * Load overrides once, rather than in each settings handler #452
+ (@krassowski)
+
+-------------------------------------------------------------------
Old:
----
jupyterlab_server-2.27.1.tar.gz
New:
----
jupyterlab_server-2.27.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyterlab-server.spec ++++++
--- /var/tmp/diff_new_pack.V4uw1i/_old 2024-09-16 17:43:51.474996809 +0200
+++ /var/tmp/diff_new_pack.V4uw1i/_new 2024-09-16 17:43:51.478996975 +0200
@@ -26,7 +26,7 @@
%endif
Name: python-jupyterlab-server%{psuffix}
-Version: 2.27.1
+Version: 2.27.3
Release: 0
Summary: Server components for JupyterLab and JupyterLab-like
applications
License: BSD-3-Clause
++++++ jupyterlab_server-2.27.1.tar.gz -> jupyterlab_server-2.27.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyterlab_server-2.27.1/.github/workflows/tests.yml
new/jupyterlab_server-2.27.3/.github/workflows/tests.yml
--- old/jupyterlab_server-2.27.1/.github/workflows/tests.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/.github/workflows/tests.yml 2020-02-02
01:00:00.000000000 +0100
@@ -66,7 +66,7 @@
pipx run doc8 --max-line-length=200
docs:
- runs-on: windows-latest
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyterlab_server-2.27.1/CHANGELOG.md
new/jupyterlab_server-2.27.3/CHANGELOG.md
--- old/jupyterlab_server-2.27.1/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyterlab_server-2.27.3/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
@@ -2,6 +2,40 @@
<!-- <START NEW CHANGELOG ENTRY> -->
+## 2.27.3
+
+([Full
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.27.2...cac303a64815e1f373acb518c783bd25787c4d40))
+
+### Bugs fixed
+
+- Fix handling language packs for pseudo language
[#456](https://github.com/jupyterlab/jupyterlab_server/pull/456)
([@fcollonval](https://github.com/fcollonval))
+
+### Maintenance and upkeep improvements
+
+- Run docs on ubuntu
[#455](https://github.com/jupyterlab/jupyterlab_server/pull/455)
([@blink1073](https://github.com/blink1073))
+
+### Contributors to this release
+
+([GitHub contributors page for this
release](https://github.com/jupyterlab/jupyterlab_server/graphs/contributors?from=2024-05-22&to=2024-07-16&type=c))
+
+[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Ablink1073+updated%3A2024-05-22..2024-07-16&type=Issues)
|
[@fcollonval](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Afcollonval+updated%3A2024-05-22..2024-07-16&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
+## 2.27.2
+
+([Full
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.27.1...348c8ea202704ad1b5d87fa4ca90ccbdd541d1db))
+
+### Bugs fixed
+
+- Load overrides once, rather than in each settings handler
[#452](https://github.com/jupyterlab/jupyterlab_server/pull/452)
([@krassowski](https://github.com/krassowski))
+
+### Contributors to this release
+
+([GitHub contributors page for this
release](https://github.com/jupyterlab/jupyterlab_server/graphs/contributors?from=2024-04-23&to=2024-05-22&type=c))
+
+[@krassowski](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Akrassowski+updated%3A2024-04-23..2024-05-22&type=Issues)
+
## 2.27.1
([Full
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.27.0...055a1695ba0aa0718764541b503bb0b5871e69c5))
@@ -16,8 +50,6 @@
[@divyansshhh](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Adivyansshhh+updated%3A2024-04-22..2024-04-23&type=Issues)
-<!-- <END NEW CHANGELOG ENTRY> -->
-
## 2.27.0
([Full
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.26.0...951b54c234a30aa2c8825d43a372ae812fd6dc78))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyterlab_server-2.27.1/PKG-INFO
new/jupyterlab_server-2.27.3/PKG-INFO
--- old/jupyterlab_server-2.27.1/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyterlab_server-2.27.3/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.3
Name: jupyterlab_server
-Version: 2.27.1
+Version: 2.27.3
Summary: A set of server components for JupyterLab and JupyterLab like
applications.
Project-URL: Homepage, https://jupyterlab-server.readthedocs.io
Project-URL: Documentation, https://jupyterlab-server.readthedocs.io
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyterlab_server-2.27.1/jupyterlab_server/_version.py
new/jupyterlab_server-2.27.3/jupyterlab_server/_version.py
--- old/jupyterlab_server-2.27.1/jupyterlab_server/_version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/jupyterlab_server/_version.py 2020-02-02
01:00:00.000000000 +0100
@@ -7,7 +7,7 @@
"""
import re
-__version__ = "2.27.1"
+__version__ = "2.27.3"
# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyterlab_server-2.27.1/jupyterlab_server/handlers.py
new/jupyterlab_server-2.27.3/jupyterlab_server/handlers.py
--- old/jupyterlab_server-2.27.1/jupyterlab_server/handlers.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/jupyterlab_server/handlers.py 2020-02-02
01:00:00.000000000 +0100
@@ -20,6 +20,7 @@
from .licenses_handler import LicensesHandler, LicensesManager
from .listings_handler import ListingsHandler, fetch_listings
from .settings_handler import SettingsHandler
+from .settings_utils import _get_overrides
from .themes_handler import ThemesHandler
from .translations_handler import TranslationsHandler
from .workspaces_handler import WorkspacesHandler, WorkspacesManager
@@ -227,11 +228,19 @@
# Handle local settings.
if extension_app.schemas_dir:
+ # Load overrides once, rather than in each copy of the settings handler
+ overrides, error = _get_overrides(extension_app.app_settings_dir)
+
+ if error:
+ overrides_warning = "Failed loading overrides: %s"
+ extension_app.log.warning(overrides_warning, error)
+
settings_config: dict[str, Any] = {
"app_settings_dir": extension_app.app_settings_dir,
"schemas_dir": extension_app.schemas_dir,
"settings_dir": extension_app.user_settings_dir,
"labextensions_path": labextensions_path,
+ "overrides": overrides,
}
# Handle requests for the list of settings. Make slash optional.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyterlab_server-2.27.1/jupyterlab_server/settings_handler.py
new/jupyterlab_server-2.27.3/jupyterlab_server/settings_handler.py
--- old/jupyterlab_server-2.27.1/jupyterlab_server/settings_handler.py
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/jupyterlab_server/settings_handler.py
2020-02-02 01:00:00.000000000 +0100
@@ -25,11 +25,12 @@
schemas_dir: str,
settings_dir: str,
labextensions_path: list[str],
+ overrides: dict[str, Any] | None = None,
**kwargs: Any, # noqa: ARG002
) -> None:
"""Initialize the handler."""
SchemaHandler.initialize(
- self, app_settings_dir, schemas_dir, settings_dir,
labextensions_path
+ self, app_settings_dir, schemas_dir, settings_dir,
labextensions_path, overrides
)
ExtensionHandlerMixin.initialize(self, name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyterlab_server-2.27.1/jupyterlab_server/settings_utils.py
new/jupyterlab_server-2.27.3/jupyterlab_server/settings_utils.py
--- old/jupyterlab_server-2.27.1/jupyterlab_server/settings_utils.py
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/jupyterlab_server/settings_utils.py
2020-02-02 01:00:00.000000000 +0100
@@ -17,7 +17,13 @@
from jupyter_server.services.config.manager import ConfigManager,
recursive_update
from tornado import web
-from .translation_utils import DEFAULT_LOCALE, L10N_SCHEMA_NAME, SYS_LOCALE,
is_valid_locale
+from .translation_utils import (
+ DEFAULT_LOCALE,
+ L10N_SCHEMA_NAME,
+ PSEUDO_LANGUAGE,
+ SYS_LOCALE,
+ is_valid_locale,
+)
# The JupyterLab settings file extension.
SETTINGS_EXTENSION = ".jupyterlab-settings"
@@ -448,11 +454,15 @@
schemas_dir: str,
settings_dir: str,
labextensions_path: list[str] | None,
+ overrides: dict[str, Any] | None = None,
**kwargs: Any,
) -> None:
"""Initialize the handler."""
super().initialize(**kwargs)
- self.overrides, error = _get_overrides(app_settings_dir)
+ error = None
+ if not overrides:
+ overrides, error = _get_overrides(app_settings_dir)
+ self.overrides = overrides
self.app_settings_dir = app_settings_dir
self.schemas_dir = schemas_dir
self.settings_dir = settings_dir
@@ -493,7 +503,7 @@
current_locale = settings.get("settings", {}).get("locale") or
SYS_LOCALE
if current_locale == "default":
current_locale = SYS_LOCALE
- if not is_valid_locale(current_locale):
+ if not is_valid_locale(current_locale) and current_locale !=
PSEUDO_LANGUAGE:
current_locale = DEFAULT_LOCALE
return current_locale
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyterlab_server-2.27.1/jupyterlab_server/translation_utils.py
new/jupyterlab_server-2.27.3/jupyterlab_server/translation_utils.py
--- old/jupyterlab_server-2.27.1/jupyterlab_server/translation_utils.py
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/jupyterlab_server/translation_utils.py
2020-02-02 01:00:00.000000000 +0100
@@ -5,6 +5,7 @@
Localization utilities to find available language packs and packages with
localization data.
"""
+
from __future__ import annotations
import gettext
@@ -40,6 +41,9 @@
L10N_SCHEMA_NAME = "@jupyterlab/translation-extension:plugin"
PY37_OR_LOWER = sys.version_info[:2] <= (3, 7)
+# Pseudo language locale for in-context translation
+PSEUDO_LANGUAGE = "ach_UG"
+
_default_schema_context = "schema"
_default_settings_context = "settings"
_lab_i18n_config = "jupyter.lab.internationalization"
@@ -151,7 +155,9 @@
- Brazilian German: "de_BR"
"""
# Add exception for Norwegian
- if locale_ == "no_NO":
+ if locale_ in {
+ "no_NO",
+ }:
return True
valid = False
@@ -183,8 +189,11 @@
"""
locale_ = locale_ if is_valid_locale(locale_) else DEFAULT_LOCALE
display_locale = display_locale if is_valid_locale(display_locale) else
DEFAULT_LOCALE
- loc = babel.Locale.parse(locale_)
- display_name = loc.get_display_name(display_locale)
+ try:
+ loc = babel.Locale.parse(locale_)
+ display_name = loc.get_display_name(display_locale)
+ except babel.UnknownLocaleError:
+ display_name = display_locale
if display_name:
display_name = display_name[0].upper() + display_name[1:]
return display_name # type:ignore[return-value]
@@ -312,21 +321,38 @@
else:
invalid_locales.append(locale_)
- display_locale = display_locale if display_locale in valid_locales
else DEFAULT_LOCALE
+ display_locale_ = display_locale if display_locale in valid_locales
else DEFAULT_LOCALE
locales = {
DEFAULT_LOCALE: {
- "displayName": get_display_name(DEFAULT_LOCALE,
display_locale),
+ "displayName": (
+ get_display_name(DEFAULT_LOCALE, display_locale_)
+ if display_locale != PSEUDO_LANGUAGE
+ else "Default"
+ ),
"nativeName": get_display_name(DEFAULT_LOCALE, DEFAULT_LOCALE),
}
}
for locale_ in valid_locales:
locales[locale_] = {
- "displayName": get_display_name(locale_, display_locale),
+ "displayName": get_display_name(locale_, display_locale_),
"nativeName": get_display_name(locale_, locale_),
}
if invalid_locales:
- messages.append(f"The following locales are invalid:
{invalid_locales}!")
+ if PSEUDO_LANGUAGE in invalid_locales:
+ invalid_locales.remove(PSEUDO_LANGUAGE)
+ locales[PSEUDO_LANGUAGE] = {
+ "displayName": "Pseudo-language",
+ # Trick to ensure the proper language is selected in the
language menu
+ "nativeName": (
+ "to translate the UI"
+ if display_locale != PSEUDO_LANGUAGE
+ else "Pseudo-language"
+ ),
+ }
+ # Check again as the pseudo-language was maybe the only invalid
locale
+ if invalid_locales:
+ messages.append(f"The following locales are invalid:
{invalid_locales}!")
return locales, "\n".join(messages)
@@ -351,7 +377,11 @@
found_packages_locales, message = get_installed_packages_locale(locale_)
locale_data = {}
messages = message.split("\n")
- if not message and is_valid_locale(locale_) and locale_ in found_locales:
+ if (
+ not message
+ and (locale_ == PSEUDO_LANGUAGE or is_valid_locale(locale_))
+ and locale_ in found_locales
+ ):
path = found_locales[locale_]
for root, __, files in os.walk(path, topdown=False):
for name in files:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyterlab_server-2.27.1/tests/test_settings_api.py
new/jupyterlab_server-2.27.3/tests/test_settings_api.py
--- old/jupyterlab_server-2.27.1/tests/test_settings_api.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.27.3/tests/test_settings_api.py 2020-02-02
01:00:00.000000000 +0100
@@ -30,9 +30,13 @@
@pytest.mark.parametrize("ext", ["json", "json5"])
-async def test_get_settings_overrides_d_dicts(jp_fetch, labserverapp, ext):
+async def test_get_settings_overrides_d_dicts(
+ jp_fetch, jp_serverapp, make_labserver_extension_app, ext
+):
# Check that values that are dictionaries in overrides.d/*.json are
# merged with the schema.
+ labserverapp = make_labserver_extension_app()
+ labserverapp._link_jupyter_server_extension(jp_serverapp)
id = "@jupyterlab/apputils-extension:themes"
overrides_d = Path(labserverapp.app_settings_dir) / "overrides.d"
overrides_d.mkdir(exist_ok=True, parents=True)
@@ -41,6 +45,8 @@
if ext == "json5":
text += "\n// a comment"
(overrides_d / f"foo-{i}.{ext}").write_text(text, encoding="utf-8")
+ # Initialize labserverapp only after the overrides were created
+ labserverapp.initialize()
r = await jp_fetch("lab", "api", "settings", id)
validate_request(r)
res = r.body.decode()