Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.16.0: pytest is failing #317

Closed
kloczek opened this issue Oct 13, 2022 · 9 comments · Fixed by #362
Closed

2.16.0: pytest is failing #317

kloczek opened this issue Oct 13, 2022 · 9 comments · Fixed by #362
Labels

Comments

@kloczek
Copy link

kloczek commented Oct 13, 2022

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.16.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.16.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -qq

================================================================================== ERRORS ==================================================================================
__________________________________________________________________ ERROR collecting tests/test_labapp.py ___________________________________________________________________
tests/test_labapp.py:7: in <module>
    from jupyterlab_server.test_utils import expected_http_error
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
__________________________________________________________________ ERROR collecting tests/test_labapp.py ___________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.0/tests/test_labapp.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_labapp.py:7: in <module>
    from jupyterlab_server.test_utils import expected_http_error
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
_______________________________________________________________ ERROR collecting tests/test_listings_api.py ________________________________________________________________
tests/test_listings_api.py:1: in <module>
    from jupyterlab_server.test_utils import validate_request
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
_______________________________________________________________ ERROR collecting tests/test_listings_api.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.0/tests/test_listings_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_listings_api.py:1: in <module>
    from jupyterlab_server.test_utils import validate_request
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
_______________________________________________________________ ERROR collecting tests/test_settings_api.py ________________________________________________________________
tests/test_settings_api.py:11: in <module>
    from jupyterlab_server.test_utils import (
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
_______________________________________________________________ ERROR collecting tests/test_settings_api.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.0/tests/test_settings_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_settings_api.py:11: in <module>
    from jupyterlab_server.test_utils import (
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
________________________________________________________________ ERROR collecting tests/test_themes_api.py _________________________________________________________________
tests/test_themes_api.py:1: in <module>
    from jupyterlab_server.test_utils import validate_request
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
________________________________________________________________ ERROR collecting tests/test_themes_api.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.0/tests/test_themes_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_themes_api.py:1: in <module>
    from jupyterlab_server.test_utils import validate_request
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
______________________________________________________________ ERROR collecting tests/test_translation_api.py ______________________________________________________________
tests/test_translation_api.py:11: in <module>
    from jupyterlab_server.test_utils import maybe_patch_ioloop, validate_request
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
______________________________________________________________ ERROR collecting tests/test_translation_api.py ______________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.0/tests/test_translation_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_translation_api.py:11: in <module>
    from jupyterlab_server.test_utils import maybe_patch_ioloop, validate_request
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
______________________________________________________________ ERROR collecting tests/test_workspaces_api.py _______________________________________________________________
tests/test_workspaces_api.py:9: in <module>
    from jupyterlab_server.test_utils import (
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
______________________________________________________________ ERROR collecting tests/test_workspaces_api.py _______________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.0/tests/test_workspaces_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_workspaces_api.py:9: in <module>
    from jupyterlab_server.test_utils import (
jupyterlab_server/test_utils.py:11: in <module>
    from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters
/usr/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
/usr/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.spec.shortcuts import create_spec
/usr/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
E   ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__init__.py)
========================================================================= short test summary info ==========================================================================
ERROR tests/test_labapp.py - ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validator/__...
ERROR tests/test_labapp.py
ERROR tests/test_listings_api.py - ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_valida...
ERROR tests/test_listings_api.py
ERROR tests/test_settings_api.py - ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_valida...
ERROR tests/test_settings_api.py
ERROR tests/test_themes_api.py - ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_validato...
ERROR tests/test_themes_api.py
ERROR tests/test_translation_api.py - ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_val...
ERROR tests/test_translation_api.py
ERROR tests/test_workspaces_api.py - ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator' (/usr/lib/python3.8/site-packages/openapi_spec_vali...
ERROR tests/test_workspaces_api.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 12 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is list of installed modules in build env

Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
anyio                         3.6.1
appdirs                       1.4.4
argon2-cffi                   21.3.0
argon2-cffi-bindings          21.2.0
attrs                         22.1.0
autodoc-traits                0.1.0
Babel                         2.10.2
beautifulsoup4                4.11.1
bleach                        5.0.0
Brlapi                        0.8.3
build                         0.8.0
cffi                          1.15.1
charset-normalizer            2.1.0
codespell                     2.2.1
cssselect                     1.1.0
decorator                     5.1.1
defusedxml                    0.7.1
deprecation                   2.1.0
distro                        1.7.0
dnspython                     2.2.1
docutils                      0.18.1
editables                     0.3
entrypoints                   0.4
extras                        1.0.0
fastjsonschema                2.16.1
fixtures                      4.0.0
freezegun                     1.2.1
gpg                           1.17.1-unknown
hatchling                     1.11.0
html5lib                      1.1
idna                          3.4
imagesize                     1.4.1
importlib-metadata            5.0.0
importlib-resources           5.9.0
iniconfig                     1.1.1
isodate                       0.6.1
Jinja2                        3.1.1
json5                         0.9.9
jsonschema                    4.16.0
jsonschema-spec               0.1.2
jupyter_client                7.4.2
jupyter_core                  4.11.1
jupyter_packaging             0.12.3
jupyter-server                1.21.0
jupyterlab-pygments           0.1.2
lazy-object-proxy             1.7.1
libcomps                      0.1.19
louis                         3.23.0
lxml                          4.9.1
m2r                           0.2.1
markdown-it-py                2.1.0
MarkupSafe                    2.1.1
mdit-py-plugins               0.3.1
mdurl                         0.1.1
mistune                       2.0.4
more-itertools                8.14.0
myst-parser                   0.18.0
nbclient                      0.7.0
nbconvert                     7.2.1
nbformat                      5.7.0
nest-asyncio                  1.5.6
numpy                         1.23.1
numpydoc                      1.5.0
openapi-core                  0.14.2
openapi-schema-validator      0.3.4
openapi-spec-validator        0.5.1
packaging                     21.3
pandocfilters                 1.5.0
parse                         1.19.0
pathable                      0.4.3
pathspec                      0.10.1
pbr                           5.9.0
pep517                        0.12.0
pip                           22.2.2
pkgutil_resolve_name          1.3.10
pluggy                        1.0.0
ply                           3.11
prometheus-client             0.14.1
ptyprocess                    0.7.0
py                            1.11.0
pycparser                     2.21
Pygments                      2.13.0
PyGObject                     3.42.2
pyparsing                     3.0.9
pyrsistent                    0.18.1
pytest                        7.1.3
pytest-runner                 6.0.0
pytest-timeout                2.1.0
pytest-tornasync              0.6.0.post2
python-dateutil               2.8.2
pytz                          2022.4
PyYAML                        6.0
pyzmq                         24.0.0
requests                      2.28.1
rpm                           4.17.0
ruamel.yaml                   0.17.21
ruamel.yaml.clib              0.2.6
scour                         0.38.2
Send2Trash                    1.8.0
setuptools                    65.4.1
six                           1.16.0
sniffio                       1.2.0
snowballstemmer               2.2.0
soupsieve                     2.3.2.post1
Sphinx                        5.2.3
sphinx-copybutton             0.5.0
sphinxcontrib-applehelp       1.0.2.dev20220730
sphinxcontrib-devhelp         1.0.2.dev20220730
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-httpdomain      1.8.0
sphinxcontrib-jsmath          1.0.1.dev20220730
sphinxcontrib-openapi         0.7.0
sphinxcontrib-qthelp          1.0.3.dev20220730
sphinxcontrib-serializinghtml 1.1.5
strict-rfc3339                0.7
terminado                     0.15.0
testtools                     2.5.0
text-unidecode                1.3
tinycss2                      1.1.1
tomli                         2.0.1
tomlkit                       0.11.5
tornado                       6.2
traitlets                     5.4.0
typing_extensions             4.3.0
urllib3                       1.26.12
validators                    0.20.0
webencodings                  0.5.1
websocket-client              1.4.1
Werkzeug                      2.2.2
wheel                         0.37.1
zipp                          3.9.0
@kloczek kloczek added the bug label Oct 13, 2022
@fcollonval
Copy link
Member

Thanks @kloczek

It seems that the tests are actually skipped on CI 😲

@fcollonval
Copy link
Member

@kloczek the openapi packages are not consistent. You have:

openapi-core                  0.14.2
openapi-schema-validator      0.3.4
openapi-spec-validator        0.5.1

But if I tried to upgrade openapi-spec-validator to match your version I'm getting:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
openapi-core 0.14.5 requires openapi-schema-validator<0.3.0, but you have openapi-schema-validator 0.3.4 which is incompatible.
openapi-core 0.14.5 requires openapi-spec-validator<0.5.0, but you have openapi-spec-validator 0.5.1 which is incompatible.

We have multiple constrains on openapi stack:

# openapi_core 0.15.0 alpha is not working
"openapi_core~=0.14.2",
"openapi-spec-validator<0.5",

@kloczek
Copy link
Author

kloczek commented Dec 8, 2022

Just FTR pytest output

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.16.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.16.4-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -qq

================================================================================== ERRORS ==================================================================================
__________________________________________________________________ ERROR collecting tests/test_labapp.py ___________________________________________________________________
tests/test_labapp.py:7: in <module>
    from jupyterlab_server.test_utils import expected_http_error
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
__________________________________________________________________ ERROR collecting tests/test_labapp.py ___________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.4/tests/test_labapp.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_labapp.py:7: in <module>
    from jupyterlab_server.test_utils import expected_http_error
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
_______________________________________________________________ ERROR collecting tests/test_listings_api.py ________________________________________________________________
tests/test_listings_api.py:3: in <module>
    import requests_mock
E   ModuleNotFoundError: No module named 'requests_mock'
_______________________________________________________________ ERROR collecting tests/test_listings_api.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.4/tests/test_listings_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_listings_api.py:3: in <module>
    import requests_mock
E   ModuleNotFoundError: No module named 'requests_mock'
_______________________________________________________________ ERROR collecting tests/test_settings_api.py ________________________________________________________________
tests/test_settings_api.py:11: in <module>
    from jupyterlab_server.test_utils import big_unicode_string, expected_http_error, validate_request
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
_______________________________________________________________ ERROR collecting tests/test_settings_api.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.4/tests/test_settings_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_settings_api.py:11: in <module>
    from jupyterlab_server.test_utils import big_unicode_string, expected_http_error, validate_request
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
________________________________________________________________ ERROR collecting tests/test_themes_api.py _________________________________________________________________
tests/test_themes_api.py:6: in <module>
    from jupyterlab_server.test_utils import validate_request
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
________________________________________________________________ ERROR collecting tests/test_themes_api.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.4/tests/test_themes_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_themes_api.py:6: in <module>
    from jupyterlab_server.test_utils import validate_request
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
______________________________________________________________ ERROR collecting tests/test_translation_api.py ______________________________________________________________
tests/test_translation_api.py:11: in <module>
    from jupyterlab_server.test_utils import maybe_patch_ioloop, validate_request
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
______________________________________________________________ ERROR collecting tests/test_translation_api.py ______________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.4/tests/test_translation_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_translation_api.py:11: in <module>
    from jupyterlab_server.test_utils import maybe_patch_ioloop, validate_request
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
______________________________________________________________ ERROR collecting tests/test_workspaces_api.py _______________________________________________________________
tests/test_workspaces_api.py:9: in <module>
    from jupyterlab_server.test_utils import (
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
______________________________________________________________ ERROR collecting tests/test_workspaces_api.py _______________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.16.4/tests/test_workspaces_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_workspaces_api.py:9: in <module>
    from jupyterlab_server.test_utils import (
jupyterlab_server/test_utils.py:10: in <module>
    from openapi_core.validation.request.datatypes import (  # type:ignore
E   ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/datatypes.py)
========================================================================= short test summary info ==========================================================================
ERROR tests/test_labapp.py - ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/dat...
ERROR tests/test_labapp.py
ERROR tests/test_listings_api.py - ModuleNotFoundError: No module named 'requests_mock'
ERROR tests/test_listings_api.py
ERROR tests/test_settings_api.py - ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/dat...
ERROR tests/test_settings_api.py
ERROR tests/test_themes_api.py - ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/dat...
ERROR tests/test_themes_api.py
ERROR tests/test_translation_api.py - ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/dat...
ERROR tests/test_translation_api.py
ERROR tests/test_workspaces_api.py - ImportError: cannot import name 'OpenAPIRequest' from 'openapi_core.validation.request.datatypes' (/usr/lib/python3.8/site-packages/openapi_core/validation/request/dat...
ERROR tests/test_workspaces_api.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 12 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

with:

openapi-core                  0.16.2
openapi-schema-validator      0.3.4
openapi-spec-validator        0.5.1

@kloczek
Copy link
Author

kloczek commented Dec 26, 2022

Here is pytest output for 2.17.0:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.17.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.17.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0, configfile: pyproject.toml, testpaths: tests/
plugins: anyio-3.6.2, timeout-2.1.0, requests-mock-1.10.0, console-scripts-1.3.1
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 141 items

tests/test_config.py .                                                                                                                                               [  0%]
tests/test_labapp.py ...                                                                                                                                             [  2%]
tests/test_licenses_api.py .....................................................................................                                                     [ 63%]
tests/test_listings_api.py ..                                                                                                                                        [ 64%]
tests/test_process.py F..F                                                                                                                                           [ 67%]
tests/test_settings_api.py FFFFF.FF.....                                                                                                                             [ 76%]
tests/test_themes_api.py ..                                                                                                                                          [ 78%]
tests/test_translation_api.py .................                                                                                                                      [ 90%]
tests/test_translation_utils.py .....                                                                                                                                [ 93%]
tests/test_workspaces_api.py ........                                                                                                                                [ 99%]
tests/test_workspaces_app.py .                                                                                                                                       [100%]

================================================================================= FAILURES =================================================================================
________________________________________________________________________________ test_which ________________________________________________________________________________

    def test_which():
>       assert which("python")

tests/test_process.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

command = 'python'
env = environ({'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-jupyterlab-server-2.17.0-2.fc35.x86_64/usr/bin:/usr/bin:/us...LC_CTYPE': 'C.UTF-8', 'JUPYTER_PLATFORM_DIRS': '1', 'PYTEST_CURRENT_TEST': 'tests/test_process.py::test_which (call)'})

    def which(command, env=None):
        """Get the full path to a command.

        Parameters
        ----------
        command: str
            The command name or path.
        env: dict, optional
            The environment variables, defaults to `os.environ`.
        """
        env = env or os.environ
        path = env.get("PATH") or os.defpath
        command_with_path = _which(command, path=path)

        # Allow nodejs as an alias to node.
        if command == "node" and not command_with_path:
            command = "nodejs"
            command_with_path = _which("nodejs", path=path)

        if not command_with_path:
            if command in ["nodejs", "node", "npm"]:
                msg = "Please install Node.js and npm before continuing installation. You may be able to install Node.js from your package manager, from conda, or directly from the Node.js website (https://nodejs.org)."
                raise ValueError(msg)
>           raise ValueError("The command was not found or was not " + "executable: %s." % command)
E           ValueError: The command was not found or was not executable: python.

jupyterlab_server/process.py:59: ValueError
_____________________________________________________________________________ test_process_app _____________________________________________________________________________

    def test_process_app():
        class TestApp(ProcessApp):
            name = "tests"

        app = TestApp()
        app.initialize_server([])
        try:
            app.initialize()
            with pytest.raises(SystemExit):
>               app.start()

tests/test_process.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/jupyter_server/extension/application.py:430: in start
    self.serverapp.start()
/usr/lib/python3.8/site-packages/jupyter_server/serverapp.py:2815: in start
    self.start_ioloop()
/usr/lib/python3.8/site-packages/jupyter_server/serverapp.py:2801: in start_ioloop
    self.io_loop.start()
/usr/lib64/python3.8/site-packages/tornado/platform/asyncio.py:215: in start
    self.asyncio_loop.run_forever()
/usr/lib64/python3.8/asyncio/base_events.py:570: in run_forever
    self._run_once()
/usr/lib64/python3.8/asyncio/base_events.py:1823: in _run_once
    event_list = self._selector.select(timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selectors.EpollSelector object at 0x7ff78bfe7b20>, timeout = -1

    def select(self, timeout=None):
        if timeout is None:
            timeout = -1
        elif timeout <= 0:
            timeout = 0
        else:
            # epoll_wait() has a resolution of 1 millisecond, round away
            # from zero to wait *at least* timeout seconds.
            timeout = math.ceil(timeout * 1e3) * 1e-3

        # epoll_wait() expects `maxevents` to be greater than zero;
        # we want to make sure that `select()` can be called when no
        # FD is registered.
        max_ev = max(len(self._fd_to_key), 1)

        ready = []
        try:
>           fd_event_list = self._selector.poll(timeout, max_ev)
E           Failed: Timeout >300.0s

/usr/lib64/python3.8/selectors.py:468: Failed
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[I 2022-12-26 19:56:46.573 ServerApp] tests | extension was successfully linked.
[W 2022-12-26 19:56:46.581 ServerApp] tests | extension failed loading with message: A `_load_jupyter_server_extension` function was not found in <module 'tests' from '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/tests/__init__.py'>. Instead, a `load_jupyter_server_extension` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[E 2022-12-26 19:56:46.581 ServerApp] tests | stack trace
    Traceback (most recent call last):
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/utils.py", line 29, in get_loader
        func = getattr(obj, "_load_jupyter_server_extension")  # noqa B009
    AttributeError: module 'tests' has no attribute '_load_jupyter_server_extension'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 355, in load_extension
        extension.load_all_points(self.serverapp)
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 229, in load_all_points
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 229, in <listcomp>
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 222, in load_point
        return point.load(serverapp)
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 147, in load
        loader = self._get_loader()
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 116, in _get_loader
        loader = get_loader(loc)
      File "/usr/lib/python3.8/site-packages/jupyter_server/extension/utils.py", line 32, in get_loader
        warnings.warn(
    DeprecationWarning: A `_load_jupyter_server_extension` function was not found in <module 'tests' from '/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/tests/__init__.py'>. Instead, a `load_jupyter_server_extension` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2022-12-26 19:56:46.584 ServerApp] Serving notebooks from local directory: /home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0
[I 2022-12-26 19:56:46.585 ServerApp] Jupyter Server 1.23.3 is running at:
[I 2022-12-26 19:56:46.585 ServerApp] http://localhost:8888/?token=183af2a0df5c5de65712fba74c10c46613c8986b328c3ea6
[I 2022-12-26 19:56:46.585 ServerApp]  or http://127.0.0.1:8888/?token=183af2a0df5c5de65712fba74c10c46613c8986b328c3ea6
[I 2022-12-26 19:56:46.585 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-12-26 19:56:46.587 ServerApp]

    To access the server, open this file in a browser:
        file:///home/tkloczko/.local/share/jupyter/runtime/jpserver-252401-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=183af2a0df5c5de65712fba74c10c46613c8986b328c3ea6
     or http://127.0.0.1:8888/?token=183af2a0df5c5de65712fba74c10c46613c8986b328c3ea6
[I 2022-12-26 19:56:46.587 TestApp] > python --version
[E 2022-12-26 19:56:46.588 ServerApp] Exception in callback functools.partial(<bound method ProcessApp._run_command of <tests.test_process.test_process_app.<locals>.TestApp object at 0x7ff78bfe7640>>)
    Traceback (most recent call last):
      File "/usr/lib64/python3.8/site-packages/tornado/ioloop.py", line 740, in _run_callback
        ret = callback()
      File "/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/jupyterlab_server/process_app.py", line 36, in _run_command
        future = Process(command, **kwargs).wait_async()
      File "/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/jupyterlab_server/process.py", line 103, in __init__
        self.proc = self._create_process(cwd=cwd, env=env, **kwargs)
      File "/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/jupyterlab_server/process.py", line 168, in _create_process
        cmd[0] = which(cmd[0], kwargs.get("env"))
      File "/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/jupyterlab_server/process.py", line 59, in which
        raise ValueError("The command was not found or was not " + "executable: %s." % command)
    ValueError: The command was not found or was not executable: python.

+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++

~~~~~~~~~~~~~~~~~~~~~ Stack of Thread-1 (140701172971200) ~~~~~~~~~~~~~~~~~~~~~~
  File "/usr/lib64/python3.8/threading.py", line 890, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/jupyterlab_server-2.17.0/jupyterlab_server/process.py", line 254, in _read_incoming
    buf = os.read(fileno, 1024)

~~~~~~~~~~~~~~ Stack of ThreadPoolExecutor-0_0 (140701164578496) ~~~~~~~~~~~~~~~
  File "/usr/lib64/python3.8/threading.py", line 890, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 78, in _worker
    work_item = work_queue.get(block=True)

+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
------------------------------------------------------------------------- Captured stderr teardown -------------------------------------------------------------------------
[I 2022-12-26 20:01:46.687 ServerApp] Shutting down 1 extension
[I 2022-12-26 20:01:46.687 ServerApp] Shutting down 0 terminals
____________________________________________________________________ test_get_settings_overrides_dicts _____________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78bdfd430>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78bd6cd00>

    async def test_get_settings_overrides_dicts(jp_fetch, labserverapp):
        # Check that values that are dictionaries in overrides.json are
        # merged with the schema.
        id = "@jupyterlab/apputils-extension:themes"
        r = await jp_fetch("lab", "api", "settings", id)
>       validate_request(r)

tests/test_settings_api.py:19:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78c08fd00>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:46.693 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_di0/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:37503/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:37503/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
________________________________________________________________ test_get_settings_overrides_d_dicts[json] _________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78bb1f790>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78bc16760>, ext = 'json'

    @pytest.mark.parametrize("ext", ["json", "json5"])
    async def test_get_settings_overrides_d_dicts(jp_fetch, labserverapp, ext):
        # Check that values that are dictionaries in overrides.d/*.json are
        # merged with the schema.
        id = "@jupyterlab/apputils-extension:themes"
        overrides_d = Path(labserverapp.app_settings_dir) / "overrides.d"
        overrides_d.mkdir(exist_ok=True, parents=True)
        for i in range(10):
            text = json.dumps({id: {"codeCellConfig": {"cursorBlinkRate": 530 + i}}})
            if ext == "json5":
                text += "\n// a comment"
            (overrides_d / f"foo-{i}.{ext}").write_text(text, encoding="utf-8")
        r = await jp_fetch("lab", "api", "settings", id)
>       validate_request(r)

tests/test_settings_api.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78bc157f0>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:46.861 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_0/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:39717/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:39717/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
________________________________________________________________ test_get_settings_overrides_d_dicts[json5] ________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78bb104c0>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78bd49d60>, ext = 'json5'

    @pytest.mark.parametrize("ext", ["json", "json5"])
    async def test_get_settings_overrides_d_dicts(jp_fetch, labserverapp, ext):
        # Check that values that are dictionaries in overrides.d/*.json are
        # merged with the schema.
        id = "@jupyterlab/apputils-extension:themes"
        overrides_d = Path(labserverapp.app_settings_dir) / "overrides.d"
        overrides_d.mkdir(exist_ok=True, parents=True)
        for i in range(10):
            text = json.dumps({id: {"codeCellConfig": {"cursorBlinkRate": 530 + i}}})
            if ext == "json5":
                text += "\n// a comment"
            (overrides_d / f"foo-{i}.{ext}").write_text(text, encoding="utf-8")
        r = await jp_fetch("lab", "api", "settings", id)
>       validate_request(r)

tests/test_settings_api.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78bd49e80>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:47.025 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_get_settings_overrides_d_1/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:42375/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:42375/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
____________________________________________________________________________ test_get_settings _____________________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78bdfd940>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78b839850>

    async def test_get_settings(jp_fetch, labserverapp):
        id = "@jupyterlab/apputils-extension:themes"
        r = await jp_fetch("lab", "api", "settings", id)
>       validate_request(r)

tests/test_settings_api.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78b777cd0>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:47.259 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_get_settings0/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:37777/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:37777/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
____________________________________________________________________________ test_get_federated ____________________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78b8948b0>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78c0b8d00>

    async def test_get_federated(jp_fetch, labserverapp):
        id = "@jupyterlab/apputils-extension-federated:themes"
        r = await jp_fetch("lab", "api", "settings", id)
>       validate_request(r)

tests/test_settings_api.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78bd09ac0>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:47.423 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_get_federated0/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:40677/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:40677/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
_______________________________________________________________________________ test_listing _______________________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78bb68b80>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78bf7d190>

    async def test_listing(jp_fetch, labserverapp):
        ids = [
            "@jupyterlab/apputils-extension:themes",
            "@jupyterlab/apputils-extension-federated:themes",
            "@jupyterlab/codemirror-extension:commands",
            "@jupyterlab/codemirror-extension-federated:commands",
            "@jupyterlab/shortcuts-extension:plugin",
            "@jupyterlab/translation-extension:plugin",
            "@jupyterlab/unicode-extension:plugin",
        ]
        versions = ["N/A", "N/A", "test-version"]
        r = await jp_fetch("lab", "api", "settings/")
>       validate_request(r)

tests/test_settings_api.py:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:203: in unmarshal
    return list(map(self.items_unmarshaller, value))
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78bdbcd60>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:47.625 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_listing0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_listing0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_listing0/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_listing0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_listing0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_listing0/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_listing0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_listing0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_listing0/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_listing0/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:45187/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:45187/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
________________________________________________________________________________ test_patch ________________________________________________________________________________

jp_fetch = <function jp_fetch.<locals>.client_fetch at 0x7ff78bb68d30>, labserverapp = <jupyterlab_server.app.LabServerApp object at 0x7ff78bfee160>

    async def test_patch(jp_fetch, labserverapp):
        id = "@jupyterlab/shortcuts-extension:plugin"

        r = await jp_fetch(
            "lab", "api", "settings", id, method="PUT", body=json.dumps(dict(raw=json5.dumps(dict())))
        )
        validate_request(r)

        r = await jp_fetch(
            "lab",
            "api",
            "settings",
            id,
            method="GET",
        )
        validate_request(r)
        data = json.loads(r.body.decode())
        first_created = rfc3339_to_timestamp(data["created"])
        first_modified = rfc3339_to_timestamp(data["last_modified"])

        r = await jp_fetch(
            "lab", "api", "settings", id, method="PUT", body=json.dumps(dict(raw=json5.dumps(dict())))
        )
        validate_request(r)

        r = await jp_fetch(
            "lab",
            "api",
            "settings",
            id,
            method="GET",
        )
        validate_request(r)
        data = json.loads(r.body.decode())
        second_created = rfc3339_to_timestamp(data["created"])
        second_modified = rfc3339_to_timestamp(data["last_modified"])

        assert first_created <= second_created
        assert first_modified < second_modified

        r = await jp_fetch(
            "lab",
            "api",
            "settings/",
            method="GET",
        )
>       validate_request(r)

tests/test_settings_api.py:150:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupyterlab_server/test_utils.py:147: in validate_request
    result2.raise_for_errors()
/usr/lib/python3.8/site-packages/openapi_core/validation/datatypes.py:12: in raise_for_errors
    raise error
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:245: in validate
    data = self._get_data(response, operation_response)
/usr/lib/python3.8/site-packages/openapi_core/validation/response/validators.py:88: in _get_data
    data = self._unmarshal(schema, casted)
/usr/lib/python3.8/site-packages/openapi_core/validation/validators.py:76: in _unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:203: in unmarshal
    return list(map(self.items_unmarshaller, value))
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:285: in _unmarshal_properties
    properties[prop_name] = self.unmarshallers_factory.create(prop)(
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:374: in unmarshal
    return super().unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:343: in unmarshal
    return unmarshaller(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:82: in __call__
    return self.unmarshal(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:217: in unmarshal
    properties = self.format(value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:226: in format
    return self._unmarshal_properties(formatted)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:305: in _unmarshal_properties
    properties[prop_name] = additional_prop_unmarshaler(prop_value)
/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:76: in __call__
    self.validate(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <openapi_core.unmarshalling.schemas.unmarshallers.AnyUnmarshaller object at 0x7ff78bd09be0>, value = None

    def validate(self, value: Any) -> None:
        errors_iter = self.validator.iter_errors(value)
        errors = tuple(errors_iter)
        if errors:
            schema_type = self.schema.getkey("type", "any")
>           raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
E           openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)

/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:95: InvalidSchemaValue
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-12-26 20:01:47.964 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {}}, 'NotebookNotary': {'db_file': ':memory:'}}
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG    ServerApp:application.py:190 Searching ['/tmp/pytest-of-tkloczko/pytest-13/test_patch0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_patch0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-13/test_patch0/etc/jupyter'] for config files
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_patch0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_patch0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-13/test_patch0/config
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_patch0/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_patch0/env/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG    ServerApp:application.py:851 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-13/test_patch0/config
INFO     ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-13/test_patch0/root_dir
INFO     ServerApp:serverapp.py:2726 Jupyter Server 1.23.3 is running at:
INFO     ServerApp:serverapp.py:2726 http://localhost:46749/a%40b/?token=...
INFO     ServerApp:serverapp.py:2726  or http://127.0.0.1:46749/a%40b/?token=...
INFO     ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
DEBUG    ServerApp:login.py:211 Accepting token-authenticated connection from 127.0.0.1
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO     ServerApp:serverapp.py:2514 Shutting down 0 extensions
INFO     ServerApp:serverapp.py:2503 Shutting down 0 terminals
=========================================================================== slowest 10 durations ===========================================================================
300.00s call     tests/test_process.py::test_process_app
247.76s setup    tests/test_translation_api.py::test_get
2.03s call     tests/test_process.py::test_process
1.21s teardown tests/test_translation_api.py::test_get_display_name_invalid
0.53s call     tests/test_settings_api.py::test_patch
0.17s call     tests/test_settings_api.py::test_listing
0.13s call     tests/test_workspaces_api.py::test_get_non_existant
0.11s call     tests/test_listings_api.py::test_get_listing
0.08s call     tests/test_settings_api.py::test_patch_unicode
0.08s setup    tests/test_labapp.py::test_lab_handler
========================================================================= short test summary info ==========================================================================
FAILED tests/test_process.py::test_which - ValueError: The command was not found or was not executable: python.
FAILED tests/test_process.py::test_process_app - Failed: Timeout >300.0s
FAILED tests/test_settings_api.py::test_get_settings_overrides_dicts - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_settings_overrides_d_dicts[json] - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_settings_overrides_d_dicts[json5] - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_settings - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_federated - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_listing - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_patch - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
================================================================ 9 failed, 132 passed in 558.18s (0:09:18) =================================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
anyio                         3.6.2
appdirs                       1.4.4
argon2-cffi                   21.3.0
argon2-cffi-bindings          21.2.0
asn1crypto                    1.5.1
asttokens                     2.2.0
attrs                         22.2.0
autodoc-traits                0.1.0
Babel                         2.11.0
backcall                      0.2.0
bcrypt                        3.2.2
beautifulsoup4                4.11.1
bleach                        5.0.0
Brlapi                        0.8.3
build                         0.9.0
cffi                          1.15.1
charset-normalizer            3.0.1
comm                          0.1.2
contourpy                     1.0.6
cryptography                  38.0.4
cssselect                     1.1.0
cycler                        0.11.0
debugpy                       1.6.4
decorator                     5.1.1
deepmerge                     1.1.0
defusedxml                    0.7.1
deprecation                   2.1.0
distro                        1.8.0
dnspython                     2.2.1
docutils                      0.19
editables                     0.3
entrypoints                   0.4
exceptiongroup                1.0.0
executing                     1.2.0
extras                        1.0.0
fastjsonschema                2.16.1
fixtures                      4.0.0
fonttools                     4.38.0
gpg                           1.18.0-unknown
hatchling                     1.11.1
html5lib                      1.1
idna                          3.4
imagesize                     1.4.1
importlib-metadata            5.1.0
importlib-resources           5.10.1
iniconfig                     1.1.1
ipykernel                     6.19.4
ipython                       8.6.0
isodate                       0.6.1
jedi                          0.18.2
Jinja2                        3.1.2
json5                         0.9.9
jsonschema                    4.17.3
jsonschema-spec               0.1.2
jupyter_client                7.4.8
jupyter_core                  5.1.1
jupyter_packaging             0.12.3
jupyter-server                1.23.3
jupyterlab-pygments           0.1.2
kiwisolver                    1.4.4
lazy-object-proxy             1.8.0
libcomps                      0.1.19
louis                         3.24.0
lxml                          4.9.1
markdown-it-py                2.1.0
MarkupSafe                    2.1.1
matplotlib                    3.6.2
matplotlib-inline             0.1.6
mdit-py-plugins               0.3.3
mdurl                         0.1.2
mistune                       2.0.4
more-itertools                9.0.0
myst-parser                   0.18.1
nbclient                      0.7.2
nbconvert                     7.2.6
nbformat                      5.7.0
nest-asyncio                  1.5.6
numpy                         1.23.1
numpydoc                      1.5.0
olefile                       0.46
openapi-core                  0.16.2
openapi-schema-validator      0.3.4
openapi-spec-validator        0.5.1
packaging                     21.3
pandocfilters                 1.5.0
parse                         1.19.0
parso                         0.8.3
pathable                      0.4.3
pathspec                      0.10.3
pbr                           5.9.0
pep517                        0.13.0
pexpect                       4.8.0
pickleshare                   0.7.5
picobox                       2.2.0
Pillow                        9.3.0
pip                           22.3.1
pkgutil_resolve_name          1.3.10
platformdirs                  2.6.0
pluggy                        1.0.0
ply                           3.11
prometheus-client             0.15.0
prompt-toolkit                3.0.29
psutil                        5.9.2
ptyprocess                    0.7.0
pure-eval                     0.2.2
pyasn1                        0.4.8
pyasn1-modules                0.2.8
pycparser                     2.21
Pygments                      2.13.0
PyGObject                     3.42.2
pyparsing                     3.0.9
pyrsistent                    0.19.2
pytest                        7.2.0
pytest-console-scripts        1.3.1
pytest-jupyter                0.6.0
pytest-timeout                2.1.0
python-dateutil               2.8.2
pytz                          2022.4
PyYAML                        6.0
pyzmq                         24.0.0
requests                      2.28.1
requests-mock                 1.10.0
rpm                           4.17.0
ruamel.yaml                   0.17.21
ruamel.yaml.clib              0.2.6
scour                         0.38.2
Send2Trash                    1.8.0
setuptools                    65.6.3
six                           1.16.0
sniffio                       1.2.0
snowballstemmer               2.2.0
soupsieve                     2.3.2.post1
Sphinx                        5.3.0
sphinx-copybutton             0.5.1
sphinx_mdinclude              0.5.3
sphinxcontrib-applehelp       1.0.2.dev20221204
sphinxcontrib-devhelp         1.0.2.dev20221204
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-httpdomain      1.8.0
sphinxcontrib-jsmath          1.0.1.dev20221204
sphinxcontrib-openapi         0.7.0
sphinxcontrib-qthelp          1.0.3.dev20221204
sphinxcontrib-serializinghtml 1.1.5
stack-data                    0.6.2
strict-rfc3339                0.7
terminado                     0.17.1
testtools                     2.5.0
tinycss2                      1.2.1
tomli                         2.0.1
tomlkit                       0.11.6
tornado                       6.2
tpm2-pkcs11-tools             1.33.7
tpm2-pytss                    1.1.0
traitlets                     5.7.1
typing_extensions             4.4.0
urllib3                       1.26.12
wcwidth                       0.2.5
webencodings                  0.5.1
websocket-client              1.4.2
Werkzeug                      2.2.2
wheel                         0.38.4
zipp                          3.11.0

@kloczek
Copy link
Author

kloczek commented Dec 26, 2022

Looks like at least one unit is failing because python interpreter name issomewhere hardcoded.
In such cases sys.executable should be used.

@kloczek
Copy link
Author

kloczek commented Dec 26, 2022

Here it is where python is hardoded

def get_command(self):
"""Get the command and kwargs to run with `Process`.
This is intended to be overridden.
"""
return ["python", "--version"], {}

@kloczek
Copy link
Author

kloczek commented Dec 26, 2022

With below patch

--- a/jupyterlab_server/process_app.py
+++ b/jupyterlab_server/process_app.py
@@ -20,7 +20,7 @@
         """Get the command and kwargs to run with `Process`.
         This is intended to be overridden.
         """
-        return ["python", "--version"], {}
+        return [sys.executable, "--version"], {}

     def initialize_settings(self):
         """Start the application."""

pytest is failing in one unit failing less

========================================================================= short test summary info ==========================================================================
FAILED tests/test_process.py::test_which - ValueError: The command was not found or was not executable: python.
FAILED tests/test_settings_api.py::test_get_settings_overrides_dicts - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_settings_overrides_d_dicts[json] - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_settings_overrides_d_dicts[json5] - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_settings - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_get_federated - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_listing - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
FAILED tests/test_settings_api.py::test_patch - openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue: Value None not valid for schema of type any: (<ValidationError: 'None for not nullable'>,)
================================================================ 8 failed, 133 passed in 276.46s (0:04:36) =================================================================

However IMO jupyterlab_server/process_app.py should be ewitten andabove patch it is only quick dirty fix.

@kloczek
Copy link
Author

kloczek commented Dec 26, 2022

Fix for tests/test_process.py::test_which

--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -8,10 +8,6 @@
 from jupyterlab_server.process_app import ProcessApp


-def test_which():
-    assert which("python")
-
-
 async def test_process():
     p = Process([sys.executable, "--version"])
     p.get_log().info("test")

@kloczek
Copy link
Author

kloczek commented Dec 27, 2022

What about other failing units? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants