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

5.0.1: pytest fails on scanning units with call trace #1031

Open
kloczek opened this issue Dec 17, 2023 · 0 comments
Open

5.0.1: pytest fails on scanning units with call trace #1031

kloczek opened this issue Dec 17, 2023 · 0 comments

Comments

@kloczek
Copy link

kloczek commented Dec 17, 2023

Description

Looks like pytest fails on scanning units with call trace

Reproduce

  • 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> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Expected behavior

Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-lsp-5.0.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-lsp-5.0.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyterlab-lsp-5.0.1
plugins: anyio-4.2.0, asyncio-0.23.2
asyncio: mode=strict
collected 67 items
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 271, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 152, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 114, in get_result
INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 335, in pytest_collection
INTERNALERROR>     session.perform_collect()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 675, in perform_collect
INTERNALERROR>     self.items.extend(self.genitems(node))
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 842, in genitems
INTERNALERROR>     rep = collect_one_node(node)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 546, in collect_one_node
INTERNALERROR>     ihook.pytest_collectstart(collector=collector)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py", line 612, in pytest_collectstart
INTERNALERROR>     pyobject = collector.obj
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 315, in obj
INTERNALERROR>     self._obj = obj = self._getobj()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 533, in _getobj
INTERNALERROR>     return self._importtestmodule()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 622, in _importtestmodule
INTERNALERROR>     mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/pathlib.py", line 567, in import_path
INTERNALERROR>     importlib.import_module(module_name)
INTERNALERROR>   File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
INTERNALERROR>     return _bootstrap._gcd_import(name[level:], package, level)
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
INTERNALERROR>   File "<frozen importlib._bootstrap_external>", line 843, in exec_module
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
INTERNALERROR>   File "/home/tkloczko/rpmbuild/BUILD/jupyterlab-lsp-5.0.1/python_packages/jupyterlab_lsp/jupyterlab_lsp/__init__.py", line 2, in <module>
INTERNALERROR>     from ._version import __version__
INTERNALERROR>   File "/home/tkloczko/rpmbuild/BUILD/jupyterlab-lsp-5.0.1/python_packages/jupyterlab_lsp/jupyterlab_lsp/_version.py", line 6, in <module>
INTERNALERROR>     (MAIN_PACKAGE_PATH / "package.json").read_text(encoding="utf-8")
INTERNALERROR>   File "/usr/lib64/python3.8/pathlib.py", line 1236, in read_text
INTERNALERROR>     with self.open(mode='r', encoding=encoding, errors=errors) as f:
INTERNALERROR>   File "/usr/lib64/python3.8/pathlib.py", line 1222, in open
INTERNALERROR>     return io.open(self, mode, buffering, encoding, errors, newline,
INTERNALERROR>   File "/usr/lib64/python3.8/pathlib.py", line 1078, in _opener
INTERNALERROR>     return self._accessor.open(self, flags, mode)
INTERNALERROR> FileNotFoundError: [Errno 2] No such file or directory: '/home/tkloczko/rpmbuild/BUILD/jupyterlab-lsp-5.0.1/python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/@jupyter-lsp/jupyterlab-lsp/package.json'

============================= 6 warnings in 0.58s ==============================

Context

  • Operating System and version: Linux x86/64
  • Browser and version: N/A
  • JupyterLab version: test suite do not need jupyterlab
  • Language server and version: N/A
List of installed modules in build env:
Package                   Version
------------------------- --------
anyio                     4.2.0
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
attrs                     23.1.0
beautifulsoup4            4.12.2
bleach                    6.1.0
build                     1.0.3
cffi                      1.16.0
cppclean                  0.13
defusedxml                0.7.1
distro                    1.8.0
dnf                       4.18.2
exceptiongroup            1.1.3
fastjsonschema            2.18.0
gpg                       1.23.2
html5lib                  1.1
idna                      3.6
importlib-metadata        7.0.0
importlib-resources       6.1.1
iniconfig                 2.0.0
installer                 0.7.0
Jinja2                    3.1.2
jsonschema                4.19.1
jsonschema-specifications 2023.7.1
jupyter_client            8.6.0
jupyter_core              5.5.0
jupyter-events            0.9.0
jupyter_server            2.12.1
jupyter_server_terminals  0.5.0
jupyterlab-pygments       0.1.2
libdnf                    0.72.0
MarkupSafe                2.1.3
mistune                   2.0.5
nbclient                  0.9.0
nbconvert                 7.12.0
nbformat                  5.9.2
overrides                 7.4.0
packaging                 23.2
pandocfilters             1.5.0
pkgutil_resolve_name      1.3.10
platformdirs              4.1.0
pluggy                    1.3.0
ply                       3.11
prometheus-client         0.19.0
ptyprocess                0.7.0
pycparser                 2.21
Pygments                  2.17.2
pyproject_hooks           1.0.0
pytest                    7.4.3
pytest-asyncio            0.23.2
python-dateutil           2.8.2
python-json-logger        2.0.7
PyYAML                    6.0.1
pyzmq                     25.1.1
referencing               0.30.2
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.14.1
Send2Trash                1.8.2
setuptools                69.0.2
six                       1.16.0
sniffio                   1.3.0
soupsieve                 2.5
terminado                 0.18.0
tinycss2                  1.2.1
tomli                     2.0.1
tornado                   6.3.3
traitlets                 5.14.0
typing_extensions         4.9.0
webencodings              0.5.1
websocket-client          1.7.0
wheel                     0.42.0
zipp                      3.17.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant