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 2023-01-16 17:59:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyterlab-server (Old)
 and      /work/SRC/openSUSE:Factory/.python-jupyterlab-server.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jupyterlab-server"

Mon Jan 16 17:59:08 2023 rev:3 rq:1058707 version:2.19.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-jupyterlab-server/python-jupyterlab-server.changes
        2023-01-08 21:26:00.631414996 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jupyterlab-server.new.32243/python-jupyterlab-server.changes
     2023-01-16 18:01:44.523772042 +0100
@@ -1,0 +2,8 @@
+Mon Jan 16 12:56:11 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 2.19.0
+  * Don't change language environment variable #366 (@fcollonval)
+  * Fix test_process_app #367 (@blink1073)
+  * Sync lint deps #365 (@blink1073)
+
+-------------------------------------------------------------------

Old:
----
  jupyterlab_server-2.18.0.tar.gz

New:
----
  jupyterlab_server-2.19.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-jupyterlab-server.spec ++++++
--- /var/tmp/diff_new_pack.54UfwH/_old  2023-01-16 18:01:45.251776126 +0100
+++ /var/tmp/diff_new_pack.54UfwH/_new  2023-01-16 18:01:45.263776194 +0100
@@ -26,7 +26,7 @@
 %endif
 
 Name:           python-jupyterlab-server%{psuffix}
-Version:        2.18.0
+Version:        2.19.0
 Release:        0
 Summary:        Server components for JupyterLab and JupyterLab-like 
applications
 License:        BSD-3-Clause

++++++ jupyterlab_server-2.18.0.tar.gz -> jupyterlab_server-2.19.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-2.18.0/.github/workflows/tests.yml 
new/jupyterlab_server-2.19.0/.github/workflows/tests.yml
--- old/jupyterlab_server-2.18.0/.github/workflows/tests.yml    2020-02-02 
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/.github/workflows/tests.yml    2020-02-02 
01:00:00.000000000 +0100
@@ -35,10 +35,10 @@
       - name: Base Setup
         uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
       - name: Run the tests
-        if: ${{ !startsWith(matrix.python-version, 'pypy') }}
+        if: ${{ !startsWith(matrix.python-version, 'pypy') && 
!startsWith(matrix.python-version, '3.7') }}
         run: hatch run cov:test
       - name: Run the tests on pypy
-        if: ${{ startsWith(matrix.python-version, 'pypy') }}
+        if: ${{ startsWith(matrix.python-version, 'pypy') || 
startsWith(matrix.python-version, '3.7') }}
         run: hatch run cov:nowarn
       - name: Upload coverage
         run: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-2.18.0/CHANGELOG.md 
new/jupyterlab_server-2.19.0/CHANGELOG.md
--- old/jupyterlab_server-2.18.0/CHANGELOG.md   2020-02-02 01:00:00.000000000 
+0100
+++ new/jupyterlab_server-2.19.0/CHANGELOG.md   2020-02-02 01:00:00.000000000 
+0100
@@ -2,6 +2,27 @@
 
 <!-- <START NEW CHANGELOG ENTRY> -->
 
+## 2.19.0
+
+([Full 
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.18.0...a226eaa4e0a55a167ef7ab6ef7da53a2013a3fb1))
+
+### Enhancements made
+
+- Don't change language environment variable 
[#366](https://github.com/jupyterlab/jupyterlab_server/pull/366) 
([@fcollonval](https://github.com/fcollonval))
+
+### Maintenance and upkeep improvements
+
+- Fix test_process_app 
[#367](https://github.com/jupyterlab/jupyterlab_server/pull/367) 
([@blink1073](https://github.com/blink1073))
+- Sync lint deps 
[#365](https://github.com/jupyterlab/jupyterlab_server/pull/365) 
([@blink1073](https://github.com/blink1073))
+
+### Contributors to this release
+
+([GitHub contributors page for this 
release](https://github.com/jupyterlab/jupyterlab_server/graphs/contributors?from=2023-01-03&to=2023-01-16&type=c))
+
+[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Ablink1073+updated%3A2023-01-03..2023-01-16&type=Issues)
 | 
[@codecov-commenter](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Acodecov-commenter+updated%3A2023-01-03..2023-01-16&type=Issues)
 | 
[@fcollonval](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Afcollonval+updated%3A2023-01-03..2023-01-16&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
 ## 2.18.0
 
 ([Full 
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.17.0...a2528876192e34fa2856b8fb3941148c6447d591))
@@ -24,8 +45,6 @@
 
 
[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Ablink1073+updated%3A2022-12-26..2023-01-03&type=Issues)
 | 
[@codecov-commenter](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Acodecov-commenter+updated%3A2022-12-26..2023-01-03&type=Issues)
 | 
[@fcollonval](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Afcollonval+updated%3A2022-12-26..2023-01-03&type=Issues)
 | 
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Apre-commit-ci+updated%3A2022-12-26..2023-01-03&type=Issues)
 | 
[@vidartf](https://github.com/search?q=repo%3Ajupyterlab%2Fjupyterlab_server+involves%3Avidartf+updated%3A2022-12-26..2023-01-03&type=Issues)
 
-<!-- <END NEW CHANGELOG ENTRY> -->
-
 ## 2.17.0
 
 ([Full 
Changelog](https://github.com/jupyterlab/jupyterlab_server/compare/v2.16.6...6870153670345c20e2b86a02e6a35394703fbbf5))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-2.18.0/PKG-INFO 
new/jupyterlab_server-2.19.0/PKG-INFO
--- old/jupyterlab_server-2.18.0/PKG-INFO       2020-02-02 01:00:00.000000000 
+0100
+++ new/jupyterlab_server-2.19.0/PKG-INFO       2020-02-02 01:00:00.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: jupyterlab_server
-Version: 2.18.0
+Version: 2.19.0
 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.18.0/jupyterlab_server/_version.py 
new/jupyterlab_server-2.19.0/jupyterlab_server/_version.py
--- old/jupyterlab_server-2.18.0/jupyterlab_server/_version.py  2020-02-02 
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/jupyterlab_server/_version.py  2020-02-02 
01:00:00.000000000 +0100
@@ -7,7 +7,7 @@
 """
 import re
 
-__version__ = "2.18.0"
+__version__ = "2.19.0"
 
 # 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.18.0/jupyterlab_server/settings_utils.py 
new/jupyterlab_server-2.19.0/jupyterlab_server/settings_utils.py
--- old/jupyterlab_server-2.18.0/jupyterlab_server/settings_utils.py    
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/jupyterlab_server/settings_utils.py    
2020-02-02 01:00:00.000000000 +0100
@@ -13,7 +13,7 @@
 from tornado import web
 
 from .server import APIHandler, tz
-from .translation_utils import DEFAULT_LOCALE, L10N_SCHEMA_NAME, 
is_valid_locale
+from .translation_utils import DEFAULT_LOCALE, L10N_SCHEMA_NAME, SYS_LOCALE, 
is_valid_locale
 
 # The JupyterLab settings file extension.
 SETTINGS_EXTENSION = ".jupyterlab-settings"
@@ -454,12 +454,14 @@
                 labextensions_path=self.labextensions_path,
             )
         except web.HTTPError as e:
-            schema_warning = "Missing or misshappen translation settings 
schema:\n%s"
+            schema_warning = "Missing or misshapen translation settings 
schema:\n%s"
             self.log.warning(schema_warning % str(e))
 
             settings = {}
 
-        current_locale = settings.get("settings", {}).get("locale", 
DEFAULT_LOCALE)
+        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):
             current_locale = DEFAULT_LOCALE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-2.18.0/jupyterlab_server/translation_utils.py 
new/jupyterlab_server-2.19.0/jupyterlab_server/translation_utils.py
--- old/jupyterlab_server-2.18.0/jupyterlab_server/translation_utils.py 
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/jupyterlab_server/translation_utils.py 
2020-02-02 01:00:00.000000000 +0100
@@ -9,6 +9,7 @@
 import gettext
 import importlib
 import json
+import locale
 import os
 import re
 import sys
@@ -31,6 +32,7 @@
 
 # Constants
 DEFAULT_LOCALE = "en"
+SYS_LOCALE = locale.getlocale()[0] or DEFAULT_LOCALE
 LOCALE_DIR = "locale"
 LC_MESSAGES_DIR = "LC_MESSAGES"
 DEFAULT_DOMAIN = "jupyterlab"
@@ -85,12 +87,6 @@
     tuple
         A tuple, where the first item is the result and the second item any
         error messages.
-
-    Notes
-    -----
-    This functions are meant to be called via a subprocess to guarantee the
-    results represent the most up-to-date entry point information, which
-    seems to be defined on interpreter startup.
     """
     data = {}
     messages = []
@@ -114,12 +110,6 @@
         A tuple, where the first item is the result and the second item any
         error messages. The value for the key points to the root location
         the package.
-
-    Notes
-    -----
-    This functions are meant to be called via a subprocess to guarantee the
-    results represent the most up-to-date entry point information, which
-    seems to be defined on interpreter startup.
     """
     data = {}
     messages = []
@@ -133,35 +123,15 @@
     return data, message
 
 
-def _main():
-    """
-    Run functions in this file in a subprocess and prints to stdout the 
results.
-    """
-    data = {}
-    message = ""
-    if len(sys.argv) == 2:
-        func_name = sys.argv[-1]
-        func = globals().get(func_name, None)
-        if func:
-            try:
-                data, message = func()
-            except Exception:
-                message = traceback.format_exc()
-    else:
-        message = "Invalid number of arguments!"
-
-    sys.stdout.write(json.dumps({"data": data, "message": message}))
-
-
 # --- Helpers
 # ----------------------------------------------------------------------------
-def is_valid_locale(locale: str) -> bool:
+def is_valid_locale(locale_: str) -> bool:
     """
-    Check if a `locale` value is valid.
+    Check if a `locale_` value is valid.
 
     Parameters
     ----------
-    locale: str
+    locale_: str
         Language locale code.
 
     Notes
@@ -179,39 +149,40 @@
     - Australian Spanish: "es_AU"
     - Brazilian German: "de_BR"
     """
+    # Add exception for Norwegian
+    if locale_ == "no_NO":
+        return True
+
     valid = False
     try:
-        babel.Locale.parse(locale)
+        babel.Locale.parse(locale_)
         valid = True
-    except babel.core.UnknownLocaleError:
-        # no-op
-        pass
-    except ValueError:
-        # no-op
+    except (babel.core.UnknownLocaleError, ValueError):
+        # Expected error if the locale is unknown
         pass
 
     return valid
 
 
-def get_display_name(locale: str, display_locale: str = DEFAULT_LOCALE) -> str:
+def get_display_name(locale_: str, display_locale: str = DEFAULT_LOCALE) -> 
str:
     """
     Return the language name to use with a `display_locale` for a given 
language locale.
 
     Parameters
     ----------
-    locale: str
+    locale_: str
         The language name to use.
     display_locale: str, optional
-        The language to display the `locale`.
+        The language to display the `locale_`.
 
     Returns
     -------
     str
-        Localized `locale` and capitalized language name using 
`display_locale` as language.
+        Localized `locale_` and capitalized language name using 
`display_locale` as language.
     """
-    locale = locale if is_valid_locale(locale) else DEFAULT_LOCALE
+    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)
+    loc = babel.Locale.parse(locale_)
     display_name = loc.get_display_name(display_locale)
     if display_name:
         display_name = display_name[0].upper() + display_name[1:]
@@ -255,7 +226,7 @@
     return result
 
 
-def get_installed_packages_locale(locale: str) -> Tuple[dict, str]:
+def get_installed_packages_locale(locale_: str) -> Tuple[dict, str]:
     """
     Get all jupyterlab extensions installed that contain locale data.
 
@@ -289,10 +260,10 @@
             except Exception:
                 messages.append(traceback.format_exc())
 
-            if locale.lower() in locales:
+            if locale_.lower() in locales:
                 locale_json_path = os.path.join(
                     locale_path,
-                    locales[locale.lower()],
+                    locales[locale_.lower()],
                     LC_MESSAGES_DIR,
                     f"{package_name}.json",
                 )
@@ -332,11 +303,11 @@
         invalid_locales = []
         valid_locales = []
         messages = []
-        for locale in found_locales:
-            if is_valid_locale(locale):
-                valid_locales.append(locale)
+        for locale_ in found_locales:
+            if is_valid_locale(locale_):
+                valid_locales.append(locale_)
             else:
-                invalid_locales.append(locale)
+                invalid_locales.append(locale_)
 
         display_locale = display_locale if display_locale in valid_locales 
else DEFAULT_LOCALE
         locales = {
@@ -345,10 +316,10 @@
                 "nativeName": get_display_name(DEFAULT_LOCALE, DEFAULT_LOCALE),
             }
         }
-        for locale in valid_locales:
-            locales[locale] = {
-                "displayName": get_display_name(locale, display_locale),
-                "nativeName": get_display_name(locale, locale),
+        for locale_ in valid_locales:
+            locales[locale_] = {
+                "displayName": get_display_name(locale_, display_locale),
+                "nativeName": get_display_name(locale_, locale_),
             }
 
         if invalid_locales:
@@ -357,9 +328,9 @@
     return locales, "\n".join(messages)
 
 
-def get_language_pack(locale: str) -> tuple:
+def get_language_pack(locale_: str) -> tuple:
     """
-    Get a language pack for a given `locale` and update with any installed
+    Get a language pack for a given `locale_` and update with any installed
     package locales.
 
     Returns
@@ -374,12 +345,12 @@
     information, which seems to be defined on interpreter startup.
     """
     found_locales, message = _get_installed_language_pack_locales()
-    found_packages_locales, message = get_installed_packages_locale(locale)
+    found_packages_locales, message = get_installed_packages_locale(locale_)
     locale_data = {}
     messages = message.split("\n")
-    if not message and is_valid_locale(locale):
-        if locale in found_locales:
-            path = found_locales[locale]
+    if not message and is_valid_locale(locale_):
+        if locale_ in found_locales:
+            path = found_locales[locale_]
             for root, __, files in os.walk(path, topdown=False):
                 for name in files:
                     if name.endswith(".json"):
@@ -413,27 +384,28 @@
     Translation bundle providing gettext translation functionality.
     """
 
-    def __init__(self, domain: str, locale: str):
+    def __init__(self, domain: str, locale_: str):
         """Initialize the bundle."""
         self._domain = domain
-        self._locale = locale
+        self._locale = locale_
+        self._translator = gettext.NullTranslations()
 
-        self.update_locale(locale)
+        self.update_locale(locale_)
 
-    def update_locale(self, locale: str) -> None:
+    def update_locale(self, locale_: str) -> None:
         """
-        Update the locale environment variables.
+        Update the locale.
 
         Parameters
         ----------
-        locale: str
+        locale_: str
             The language name to use.
         """
         # TODO: Need to handle packages that provide their own .mo files
-        self._locale = locale
+        self._locale = locale_
         localedir = None
-        if locale != DEFAULT_LOCALE:
-            language_pack_module = f"jupyterlab_language_pack_{locale}"
+        if locale_ != DEFAULT_LOCALE:
+            language_pack_module = f"jupyterlab_language_pack_{locale_}"
             try:
                 mod = importlib.import_module(language_pack_module)
                 assert mod.__file__ is not None  # noqa
@@ -442,7 +414,9 @@
                 # no-op
                 pass
 
-        gettext.bindtextdomain(self._domain, localedir=localedir)
+        self._translator = gettext.translation(
+            self._domain, localedir=localedir, languages=(self._locale,), 
fallback=True
+        )
 
     def gettext(self, msgid: str) -> str:
         """
@@ -458,7 +432,7 @@
         str
             The translated string.
         """
-        return gettext.dgettext(self._domain, msgid)
+        return self._translator.gettext(msgid)
 
     def ngettext(self, msgid: str, msgid_plural: str, n: int) -> str:
         """
@@ -478,7 +452,7 @@
         str
             The translated string.
         """
-        return gettext.dngettext(self._domain, msgid, msgid_plural, n)
+        return self._translator.ngettext(msgid, msgid_plural, n)
 
     def pgettext(self, msgctxt: str, msgid: str) -> str:
         """
@@ -499,9 +473,9 @@
         # Python 3.7 or lower does not offer translations based on context.
         # On these versions `pgettext` falls back to `gettext`
         if PY37_OR_LOWER:
-            translation = gettext.dgettext(self._domain, msgid)
+            translation = self._translator.gettext(msgid)
         else:
-            translation = gettext.dpgettext(self._domain, msgctxt, msgid)
+            translation = self._translator.pgettext(msgctxt, msgid)
 
         return translation
 
@@ -528,9 +502,9 @@
         # Python 3.7 or lower does not offer translations based on context.
         # On these versions `npgettext` falls back to `ngettext`
         if PY37_OR_LOWER:
-            translation = gettext.dngettext(self._domain, msgid, msgid_plural, 
n)
+            translation = self._translator.ngettext(msgid, msgid_plural, n)
         else:
-            translation = gettext.dnpgettext(self._domain, msgctxt, msgid, 
msgid_plural, n)
+            translation = self._translator.npgettext(msgctxt, msgid, 
msgid_plural, n)
 
         return translation
 
@@ -617,21 +591,8 @@
     Translations manager.
     """
 
-    _TRANSLATORS: dict = {}
-    _LOCALE = DEFAULT_LOCALE
-
-    @staticmethod
-    def _update_env(locale: str) -> None:
-        """
-        Update the locale environment variables based on the settings.
-
-        Parameters
-        ----------
-        locale: str
-            The language name to use.
-        """
-        for key in ["LANGUAGE", "LANG"]:
-            os.environ[key] = f"{locale}.UTF-8"
+    _TRANSLATORS: Dict[str, TranslationBundle] = {}
+    _LOCALE = SYS_LOCALE
 
     @staticmethod
     def normalize_domain(domain: str) -> str:
@@ -650,24 +611,23 @@
         return domain.replace("-", "_")
 
     @classmethod
-    def set_locale(cls, locale: str) -> None:
+    def set_locale(cls, locale_: str) -> None:
         """
         Set locale for the translation bundles based on the settings.
 
         Parameters
         ----------
-        locale: str
+        locale_: str
             The language name to use.
         """
-        if locale == cls._LOCALE:
+        if locale_ == cls._LOCALE:
             # Nothing to do bail early
             return
 
-        if is_valid_locale(locale):
-            cls._LOCALE = locale
-            translator._update_env(locale)
+        if is_valid_locale(locale_):
+            cls._LOCALE = locale_
             for _, bundle in cls._TRANSLATORS.items():
-                bundle.update_locale(locale)
+                bundle.update_locale(locale_)
 
     @classmethod
     def load(cls, domain: str) -> TranslationBundle:
@@ -693,7 +653,7 @@
             trans = TranslationBundle(norm_domain, cls._LOCALE)
             cls._TRANSLATORS[norm_domain] = trans
 
-        return trans  # type:ignore
+        return trans
 
     @staticmethod
     def _translate_schema_strings(
@@ -757,10 +717,6 @@
         )
 
         new_schema = schema.copy()
-        translator._translate_schema_strings(translations, schema.copy())
+        translator._translate_schema_strings(translations, new_schema)
 
         return new_schema
-
-
-if __name__ == "__main__":
-    _main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-2.18.0/jupyterlab_server/translations_handler.py 
new/jupyterlab_server-2.19.0/jupyterlab_server/translations_handler.py
--- old/jupyterlab_server-2.18.0/jupyterlab_server/translations_handler.py      
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/jupyterlab_server/translations_handler.py      
2020-02-02 01:00:00.000000000 +0100
@@ -6,36 +6,52 @@
 
 import json
 import traceback
+from functools import partial
 
 import tornado
-from tornado import gen
 
 from .settings_utils import SchemaHandler
-from .translation_utils import get_language_pack, get_language_packs, 
is_valid_locale, translator
+from .translation_utils import (
+    SYS_LOCALE,
+    get_language_pack,
+    get_language_packs,
+    is_valid_locale,
+    translator,
+)
 
 
 class TranslationsHandler(SchemaHandler):
-    """Translation handler."""
+    """An API handler for translations."""
 
-    @gen.coroutine
     @tornado.web.authenticated
-    def get(self, locale=""):
+    async def get(self, locale=None):
         """
         Get installed language packs.
 
+        If `locale` is equals to "default", the default locale will be used.
+
         Parameters
         ----------
         locale: str, optional
             If no locale is provided, it will list all the installed language 
packs.
-            Default is `""`.
+            Default is `None`.
         """
         data: dict
         data, message = {}, ""
         try:
-            if locale == "":
-                data, message = 
get_language_packs(display_locale=self.get_current_locale())
+            current_loop = tornado.ioloop.IOLoop.current()
+            if locale is None:
+                data, message = await current_loop.run_in_executor(
+                    None,
+                    partial(get_language_packs, 
display_locale=self.get_current_locale()),
+                )
             else:
-                data, message = get_language_pack(locale)
+                locale = locale or SYS_LOCALE
+                if locale == "default":
+                    locale = SYS_LOCALE
+                data, message = await current_loop.run_in_executor(
+                    None, partial(get_language_pack, locale)
+                )
                 if data == {} and message == "":
                     if is_valid_locale(locale):
                         message = f"Language pack '{locale}' not installed!"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-2.18.0/pyproject.toml 
new/jupyterlab_server-2.19.0/pyproject.toml
--- old/jupyterlab_server-2.18.0/pyproject.toml 2020-02-02 01:00:00.000000000 
+0100
+++ new/jupyterlab_server-2.19.0/pyproject.toml 2020-02-02 01:00:00.000000000 
+0100
@@ -115,10 +115,10 @@
 
 [tool.hatch.envs.lint]
 dependencies = [
-  "black[jupyter]==22.6.0",
+  "black[jupyter]==22.12.0",
   "mdformat>0.7",
   "mdformat-gfm>=0.3.5",
-  "ruff==0.0.189"
+  "ruff==0.0.206"
 ]
 detatched = true
 [tool.hatch.envs.lint.scripts]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jupyterlab_server-2.18.0/tests/test_process.py 
new/jupyterlab_server-2.19.0/tests/test_process.py
--- old/jupyterlab_server-2.18.0/tests/test_process.py  2020-02-02 
01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/tests/test_process.py  2020-02-02 
01:00:00.000000000 +0100
@@ -33,7 +33,7 @@
     helper.wait()
 
 
-def test_process_app():
+async def test_process_app():
     class TestApp(ProcessApp):
         name = "tests"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jupyterlab_server-2.18.0/tests/test_translation_utils.py 
new/jupyterlab_server-2.19.0/tests/test_translation_utils.py
--- old/jupyterlab_server-2.18.0/tests/test_translation_utils.py        
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyterlab_server-2.19.0/tests/test_translation_utils.py        
2020-02-02 01:00:00.000000000 +0100
@@ -1,23 +1,15 @@
 # Copyright (c) Jupyter Development Team.
 # Distributed under the terms of the Modified BSD License.
 
-import sys
 
 from jupyterlab_server.translation_utils import (
     TranslationBundle,
-    _main,
     get_installed_packages_locale,
     get_language_packs,
     translator,
 )
 
 
-def test_transutils_main():
-    sys.argv = ["", "get_language_packs"]
-    _main()
-    sys.argv = [""]
-
-
 def test_get_installed_packages_locale(jp_environ):
     get_installed_packages_locale("es_co")
 

Reply via email to