==> Building on p ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list created directory packages/python-dictpath ./ PKGBUILD 825 100% 0.00kB/s 0:00:00 825 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3) python-dictpath-0.1.3-1.log 243 100% 237.30kB/s 0:00:00 243 100% 237.30kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 832 bytes received 104 bytes 624.00 bytes/sec total size is 1,013 speedup is 1.08 ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l felix27 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... community downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix27]...done ==> Making package: python-dictpath 0.1.3-1 (Wed Mar 30 01:55:23 2022) ==> Retrieving sources...  -> Downloading dictpath-0.1.3.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 122 100 122 0 0 2720 0 --:--:-- --:--:-- --:--:-- 2772 100 276 100 276 0 0 1566 0 --:--:-- --:--:-- --:--:-- 1566 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 8125 100 8125 0 0 40872 0 --:--:-- --:--:-- --:--:-- 40872 ==> Validating source files with sha256sums... dictpath-0.1.3.tar.gz ... Passed ==> Making package: python-dictpath 0.1.3-1 (Wed 30 Mar 2022 01:55:34 AM CEST) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (2) New Version Net Change core/libnsl 2.0.0-2 0.06 MiB core/python 3.10.1-2 79.11 MiB Total Installed Size: 79.17 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libnsl... installing python... Optional dependencies for python python-setuptools python-pip sqlite [installed] mpdecimal: for decimal xz: for lzma [installed] tk: for tkinter [?25h==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (25) New Version Net Change community/flake8 1:4.0.1-4 0.52 MiB community/python-apipkg 2.1.0-1 0.03 MiB extra/python-appdirs 1.4.4-6 0.07 MiB extra/python-attrs 21.4.0-1 0.45 MiB community/python-coverage 6.1.1-3 1.19 MiB community/python-entrypoints 0.4-1 0.01 MiB community/python-iniconfig 1.1.1-5 0.02 MiB community/python-mccabe 0.7.0-1 0.04 MiB community/python-more-itertools 8.12.0-1 0.48 MiB extra/python-ordered-set 4.0.2-6 0.06 MiB extra/python-packaging 21.0-1 0.26 MiB extra/python-pep517 0.12.0-4 0.13 MiB community/python-pluggy 1.0.0-1 0.10 MiB community/python-py 1.11.0-1 0.71 MiB community/python-pycodestyle 2.8.0-5 0.27 MiB community/python-pyflakes 2.4.0-3 0.90 MiB extra/python-pyparsing 3.0.7-1 0.96 MiB community/python-pytest 7.1.1-1 2.62 MiB extra/python-tomli 2.0.1-1 0.08 MiB community/python-build 0.7.0-4 0.95 MiB community/python-installer 0.5.1-1 1.13 MiB community/python-pytest-cov 2.12.1-6 0.11 MiB community/python-pytest-flake8 1.0.7-3 0.03 MiB extra/python-setuptools 1:59.1.0-1 2.95 MiB community/python-wheel 0.37.1-1 0.16 MiB Total Installed Size: 14.24 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-tomli... installing python-pep517... installing python-pyparsing... Optional dependencies for python-pyparsing python-railroad-diagrams: for generating Railroad Diagrams python-jinja: for generating Railroad Diagrams installing python-packaging... installing python-build... Optional dependencies for python-build python-virtualenv: Use virtualenv for build isolation installing python-installer... installing python-appdirs... installing python-more-itertools... installing python-ordered-set... installing python-setuptools... installing python-wheel... Optional dependencies for python-wheel python-keyring: for wheel.signatures python-xdg: for wheel.signatures installing python-attrs... installing python-iniconfig... installing python-pluggy... installing python-apipkg... installing python-py... installing python-pytest... installing python-coverage... Optional dependencies for python-coverage python-tomli: for pyproject.toml support [installed] installing python-pytest-cov... installing python-pyflakes... installing python-mccabe... installing python-pycodestyle... installing python-entrypoints... installing flake8... installing python-pytest-flake8... [?25h==> Retrieving sources...  -> Found dictpath-0.1.3.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting dictpath-0.1.3.tar.gz with bsdtar ==> Starting build()... /usr/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'long-description-content-type' will not be supported in future versions. Please use the underscore name 'long_description_content_type' instead warnings.warn( /usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'setup_cfg' warnings.warn(msg) /usr/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'long-description-content-type' will not be supported in future versions. Please use the underscore name 'long_description_content_type' instead warnings.warn( running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/dictpath copying dictpath/paths.py -> build/lib/dictpath copying dictpath/accessors.py -> build/lib/dictpath copying dictpath/parsers.py -> build/lib/dictpath copying dictpath/__init__.py -> build/lib/dictpath running egg_info writing dictpath.egg-info/PKG-INFO writing dependency_links to dictpath.egg-info/dependency_links.txt writing top-level names to dictpath.egg-info/top_level.txt reading manifest file 'dictpath.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'dictpath.egg-info/SOURCES.txt' installing to build/bdist.linux-riscv64/wheel running install running install_lib creating build/bdist.linux-riscv64 creating build/bdist.linux-riscv64/wheel creating build/bdist.linux-riscv64/wheel/dictpath copying build/lib/dictpath/paths.py -> build/bdist.linux-riscv64/wheel/dictpath copying build/lib/dictpath/accessors.py -> build/bdist.linux-riscv64/wheel/dictpath copying build/lib/dictpath/parsers.py -> build/bdist.linux-riscv64/wheel/dictpath copying build/lib/dictpath/__init__.py -> build/bdist.linux-riscv64/wheel/dictpath running install_egg_info Copying dictpath.egg-info to build/bdist.linux-riscv64/wheel/dictpath-0.1.3-py3.10.egg-info running install_scripts adding license file "LICENSE" (matched pattern "LICEN[CS]E*") creating build/bdist.linux-riscv64/wheel/dictpath-0.1.3.dist-info/WHEEL creating '/build/python-dictpath/src/dictpath-0.1.3/dist/tmpkh0s3vs_/dictpath-0.1.3-py3-none-any.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'dictpath/__init__.py' adding 'dictpath/accessors.py' adding 'dictpath/parsers.py' adding 'dictpath/paths.py' adding 'dictpath-0.1.3.dist-info/LICENSE' adding 'dictpath-0.1.3.dist-info/METADATA' adding 'dictpath-0.1.3.dist-info/WHEEL' adding 'dictpath-0.1.3.dist-info/top_level.txt' adding 'dictpath-0.1.3.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel * Getting dependencies for wheel... * Building wheel... Successfully built dictpath-0.1.3-py3-none-any.whl ==> Starting check()... ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-7.1.1, pluggy-1.0.0 -- /usr/bin/python cachedir: .pytest_cache rootdir: /build/python-dictpath/src/dictpath-0.1.3, configfile: setup.cfg plugins: cov-2.12.1, flake8-1.0.7 collecting ... collected 5 items setup.py::FLAKE8 PASSED dictpath/__init__.py::FLAKE8 PASSED dictpath/accessors.py::FLAKE8 ERROR dictpath/parsers.py::FLAKE8 ERROR dictpath/paths.py::FLAKE8 ERROR ==================================== ERRORS ==================================== ________________________ ERROR at setup of FLAKE8-check ________________________ self = def _importtestmodule(self): # We assume we are only called once per module. importmode = self.config.getoption("--import-mode") try: > mod = import_path(self.path, mode=importmode, root=self.config.rootpath) /usr/lib/python3.10/site-packages/_pytest/python.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ p = PosixPath('/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py') def import_path( p: Union[str, "os.PathLike[str]"], *, mode: Union[str, ImportMode] = ImportMode.prepend, root: Path, ) -> ModuleType: """Import and return a module from the given path, which can be a file (a module) or a directory (a package). The import mechanism used is controlled by the `mode` parameter: * `mode == ImportMode.prepend`: the directory containing the module (or package, taking `__init__.py` files into account) will be put at the *start* of `sys.path` before being imported with `__import__. * `mode == ImportMode.append`: same as `prepend`, but the directory will be appended to the end of `sys.path`, if not already in `sys.path`. * `mode == ImportMode.importlib`: uses more fine control mechanisms provided by `importlib` to import the module, which avoids having to use `__import__` and muck with `sys.path` at all. It effectively allows having same-named test modules in different places. :param root: Used as an anchor when mode == ImportMode.importlib to obtain a unique name for the module being imported so it can safely be stored into ``sys.modules``. :raises ImportPathMismatchError: If after importing the given `path` and the module `__file__` are different. Only raised in `prepend` and `append` modes. """ mode = ImportMode(mode) path = Path(p) if not path.exists(): raise ImportError(path) if mode is ImportMode.importlib: module_name = module_name_from_path(path, root) for meta_importer in sys.meta_path: spec = meta_importer.find_spec(module_name, [str(path.parent)]) if spec is not None: break else: spec = importlib.util.spec_from_file_location(module_name, str(path)) if spec is None: raise ImportError(f"Can't find module {module_name} at location {path}") mod = importlib.util.module_from_spec(spec) sys.modules[module_name] = mod spec.loader.exec_module(mod) # type: ignore[union-attr] insert_missing_modules(sys.modules, module_name) return mod pkg_path = resolve_package_path(path) if pkg_path is not None: pkg_root = pkg_path.parent names = list(path.with_suffix("").relative_to(pkg_root).parts) if names[-1] == "__init__": names.pop() module_name = ".".join(names) else: pkg_root = path.parent module_name = path.stem # Change sys.path permanently: restoring it at the end of this function would cause surprising # problems because of delayed imports: for example, a conftest.py file imported by this function # might have local imports, which would fail at runtime if we restored sys.path. if mode is ImportMode.append: if str(pkg_root) not in sys.path: sys.path.append(str(pkg_root)) elif mode is ImportMode.prepend: if str(pkg_root) != sys.path[0]: sys.path.insert(0, str(pkg_root)) else: assert_never(mode) > importlib.import_module(module_name) /usr/lib/python3.10/site-packages/_pytest/pathlib.py:533: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', import_ = > ??? :1006: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec = ModuleSpec(name='dictpath', loader=<_frozen_importlib_external.SourceFileLoader object at 0x40045e1ab0>, origin='/buil...ictpath-0.1.3/dictpath/__init__.py', submodule_search_locations=['/build/python-dictpath/src/dictpath-0.1.3/dictpath']) > ??? :688: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_frozen_importlib_external.SourceFileLoader object at 0x40045e1ab0> module = > ??? :883: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = args = ( at 0x400471b310, file "/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py", line 1>...pyc', '__doc__': 'Dictpath module', '__file__': '/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py', ...}) kwds = {} > ??? :241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # -*- coding: utf-8 -*- """Dictpath module""" > from dictpath.paths import ( BasePath, AccessorPath, DictOrListPath, DictOrListPath as DictPath, DictOrListPath as ListPath, ) dictpath/__init__.py:3: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """Dictpath paths module""" from contextlib import contextmanager > from six import text_type E ModuleNotFoundError: No module named 'six' dictpath/paths.py:4: ModuleNotFoundError The above exception was the direct cause of the following exception: self = <_HookCaller 'pytest_runtest_setup'>, args = () kwargs = {'item': }, argname = 'item' firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4003265720> hook_name = 'pytest_runtest_setup' methods = [...apturing= _capture_fixture=None>>, ...] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_setup(item: Item) -> None: _update_current_test_var(item, "setup") > item.session._setupstate.setup(item) /usr/lib/python3.10/site-packages/_pytest/runner.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: raise exc for col in needed_collectors[len(self.stack) :]: assert col not in self.stack # Push onto the stack. self.stack[col] = ([col.teardown], None) try: col.setup() except TEST_OUTCOME as exc: self.stack[col] = (self.stack[col][0], exc) > raise exc /usr/lib/python3.10/site-packages/_pytest/runner.py:494: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: raise exc for col in needed_collectors[len(self.stack) :]: assert col not in self.stack # Push onto the stack. self.stack[col] = ([col.teardown], None) try: > col.setup() /usr/lib/python3.10/site-packages/_pytest/runner.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def setup(self) -> None: # Not using fixtures to call setup_module here because autouse fixtures # from packages are not called automatically (#4085). setup_module = _get_first_non_fixture_func( > self.obj, ("setUpModule", "setup_module") ) /usr/lib/python3.10/site-packages/_pytest/python.py:681: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = @property def obj(self): """Underlying Python object.""" obj = getattr(self, "_obj", None) if obj is None: > self._obj = obj = self._getobj() /usr/lib/python3.10/site-packages/_pytest/python.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _getobj(self): > return self._importtestmodule() /usr/lib/python3.10/site-packages/_pytest/python.py:519: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _importtestmodule(self): # We assume we are only called once per module. importmode = self.config.getoption("--import-mode") try: mod = import_path(self.path, mode=importmode, root=self.config.rootpath) except SyntaxError as e: raise self.CollectError( ExceptionInfo.from_current().getrepr(style="short") ) from e except ImportPathMismatchError as e: raise self.CollectError( "import file mismatch:\n" "imported module %r has this __file__ attribute:\n" " %s\n" "which is not the same as the test file we want to collect:\n" " %s\n" "HINT: remove __pycache__ / .pyc files and/or use a " "unique basename for your test file modules" % e.args ) from e except ImportError as e: exc_info = ExceptionInfo.from_current() if self.config.getoption("verbose") < 2: exc_info.traceback = exc_info.traceback.filter(filter_traceback) exc_repr = ( exc_info.getrepr(style="short") if exc_info.traceback else exc_info.exconly() ) formatted_tb = str(exc_repr) > raise self.CollectError( "ImportError while importing test module '{path}'.\n" "Hint: make sure your test modules/packages have valid Python names.\n" "Traceback:\n" "{traceback}".format(path=self.path, traceback=formatted_tb) ) from e E _pytest.nodes.Collector.CollectError: ImportError while importing test module '/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py'. E Hint: make sure your test modules/packages have valid Python names. E Traceback: E /usr/lib/python3.10/site-packages/_pytest/python.py:608: in _importtestmodule E mod = import_path(self.path, mode=importmode, root=self.config.rootpath) E /usr/lib/python3.10/site-packages/_pytest/pathlib.py:533: in import_path E importlib.import_module(module_name) E /usr/lib/python3.10/importlib/__init__.py:126: in import_module E return _bootstrap._gcd_import(name[level:], package, level) E :1050: in _gcd_import E ??? E :1027: in _find_and_load E ??? E :1006: in _find_and_load_unlocked E ??? E :688: in _load_unlocked E ??? E :883: in exec_module E ??? E :241: in _call_with_frames_removed E ??? E dictpath/__init__.py:3: in E from dictpath.paths import ( E dictpath/paths.py:4: in E from six import text_type E E ModuleNotFoundError: No module named 'six' /usr/lib/python3.10/site-packages/_pytest/python.py:633: CollectError ________________________ ERROR at setup of FLAKE8-check ________________________ self = def _importtestmodule(self): # We assume we are only called once per module. importmode = self.config.getoption("--import-mode") try: > mod = import_path(self.path, mode=importmode, root=self.config.rootpath) /usr/lib/python3.10/site-packages/_pytest/python.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ p = PosixPath('/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py') def import_path( p: Union[str, "os.PathLike[str]"], *, mode: Union[str, ImportMode] = ImportMode.prepend, root: Path, ) -> ModuleType: """Import and return a module from the given path, which can be a file (a module) or a directory (a package). The import mechanism used is controlled by the `mode` parameter: * `mode == ImportMode.prepend`: the directory containing the module (or package, taking `__init__.py` files into account) will be put at the *start* of `sys.path` before being imported with `__import__. * `mode == ImportMode.append`: same as `prepend`, but the directory will be appended to the end of `sys.path`, if not already in `sys.path`. * `mode == ImportMode.importlib`: uses more fine control mechanisms provided by `importlib` to import the module, which avoids having to use `__import__` and muck with `sys.path` at all. It effectively allows having same-named test modules in different places. :param root: Used as an anchor when mode == ImportMode.importlib to obtain a unique name for the module being imported so it can safely be stored into ``sys.modules``. :raises ImportPathMismatchError: If after importing the given `path` and the module `__file__` are different. Only raised in `prepend` and `append` modes. """ mode = ImportMode(mode) path = Path(p) if not path.exists(): raise ImportError(path) if mode is ImportMode.importlib: module_name = module_name_from_path(path, root) for meta_importer in sys.meta_path: spec = meta_importer.find_spec(module_name, [str(path.parent)]) if spec is not None: break else: spec = importlib.util.spec_from_file_location(module_name, str(path)) if spec is None: raise ImportError(f"Can't find module {module_name} at location {path}") mod = importlib.util.module_from_spec(spec) sys.modules[module_name] = mod spec.loader.exec_module(mod) # type: ignore[union-attr] insert_missing_modules(sys.modules, module_name) return mod pkg_path = resolve_package_path(path) if pkg_path is not None: pkg_root = pkg_path.parent names = list(path.with_suffix("").relative_to(pkg_root).parts) if names[-1] == "__init__": names.pop() module_name = ".".join(names) else: pkg_root = path.parent module_name = path.stem # Change sys.path permanently: restoring it at the end of this function would cause surprising # problems because of delayed imports: for example, a conftest.py file imported by this function # might have local imports, which would fail at runtime if we restored sys.path. if mode is ImportMode.append: if str(pkg_root) not in sys.path: sys.path.append(str(pkg_root)) elif mode is ImportMode.prepend: if str(pkg_root) != sys.path[0]: sys.path.insert(0, str(pkg_root)) else: assert_never(mode) > importlib.import_module(module_name) /usr/lib/python3.10/site-packages/_pytest/pathlib.py:533: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', import_ = > ??? :1006: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec = ModuleSpec(name='dictpath', loader=<_frozen_importlib_external.SourceFileLoader object at 0x40045e1ab0>, origin='/buil...ictpath-0.1.3/dictpath/__init__.py', submodule_search_locations=['/build/python-dictpath/src/dictpath-0.1.3/dictpath']) > ??? :688: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_frozen_importlib_external.SourceFileLoader object at 0x40045e1ab0> module = > ??? :883: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = args = ( at 0x400471b310, file "/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py", line 1>...pyc', '__doc__': 'Dictpath module', '__file__': '/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py', ...}) kwds = {} > ??? :241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # -*- coding: utf-8 -*- """Dictpath module""" > from dictpath.paths import ( BasePath, AccessorPath, DictOrListPath, DictOrListPath as DictPath, DictOrListPath as ListPath, ) dictpath/__init__.py:3: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """Dictpath paths module""" from contextlib import contextmanager > from six import text_type E ModuleNotFoundError: No module named 'six' dictpath/paths.py:4: ModuleNotFoundError The above exception was the direct cause of the following exception: self = <_HookCaller 'pytest_runtest_setup'>, args = () kwargs = {'item': }, argname = 'item' firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4003265720> hook_name = 'pytest_runtest_setup' methods = [...apturing= _capture_fixture=None>>, ...] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_setup(item: Item) -> None: _update_current_test_var(item, "setup") > item.session._setupstate.setup(item) /usr/lib/python3.10/site-packages/_pytest/runner.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: > raise exc /usr/lib/python3.10/site-packages/_pytest/runner.py:484: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = . at 0x40045a15a0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.10/site-packages/_pytest/runner.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.10/site-packages/_pytest/runner.py:259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'>, args = () kwargs = {'item': }, argname = 'item' firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4003265720> hook_name = 'pytest_runtest_setup' methods = [...apturing= _capture_fixture=None>>, ...] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_setup(item: Item) -> None: _update_current_test_var(item, "setup") > item.session._setupstate.setup(item) /usr/lib/python3.10/site-packages/_pytest/runner.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: raise exc for col in needed_collectors[len(self.stack) :]: assert col not in self.stack # Push onto the stack. self.stack[col] = ([col.teardown], None) try: col.setup() except TEST_OUTCOME as exc: self.stack[col] = (self.stack[col][0], exc) > raise exc /usr/lib/python3.10/site-packages/_pytest/runner.py:494: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: raise exc for col in needed_collectors[len(self.stack) :]: assert col not in self.stack # Push onto the stack. self.stack[col] = ([col.teardown], None) try: > col.setup() /usr/lib/python3.10/site-packages/_pytest/runner.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def setup(self) -> None: # Not using fixtures to call setup_module here because autouse fixtures # from packages are not called automatically (#4085). setup_module = _get_first_non_fixture_func( > self.obj, ("setUpModule", "setup_module") ) /usr/lib/python3.10/site-packages/_pytest/python.py:681: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = @property def obj(self): """Underlying Python object.""" obj = getattr(self, "_obj", None) if obj is None: > self._obj = obj = self._getobj() /usr/lib/python3.10/site-packages/_pytest/python.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _getobj(self): > return self._importtestmodule() /usr/lib/python3.10/site-packages/_pytest/python.py:519: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _importtestmodule(self): # We assume we are only called once per module. importmode = self.config.getoption("--import-mode") try: mod = import_path(self.path, mode=importmode, root=self.config.rootpath) except SyntaxError as e: raise self.CollectError( ExceptionInfo.from_current().getrepr(style="short") ) from e except ImportPathMismatchError as e: raise self.CollectError( "import file mismatch:\n" "imported module %r has this __file__ attribute:\n" " %s\n" "which is not the same as the test file we want to collect:\n" " %s\n" "HINT: remove __pycache__ / .pyc files and/or use a " "unique basename for your test file modules" % e.args ) from e except ImportError as e: exc_info = ExceptionInfo.from_current() if self.config.getoption("verbose") < 2: exc_info.traceback = exc_info.traceback.filter(filter_traceback) exc_repr = ( exc_info.getrepr(style="short") if exc_info.traceback else exc_info.exconly() ) formatted_tb = str(exc_repr) > raise self.CollectError( "ImportError while importing test module '{path}'.\n" "Hint: make sure your test modules/packages have valid Python names.\n" "Traceback:\n" "{traceback}".format(path=self.path, traceback=formatted_tb) ) from e E _pytest.nodes.Collector.CollectError: ImportError while importing test module '/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py'. E Hint: make sure your test modules/packages have valid Python names. E Traceback: E /usr/lib/python3.10/site-packages/_pytest/python.py:608: in _importtestmodule E mod = import_path(self.path, mode=importmode, root=self.config.rootpath) E /usr/lib/python3.10/site-packages/_pytest/pathlib.py:533: in import_path E importlib.import_module(module_name) E /usr/lib/python3.10/importlib/__init__.py:126: in import_module E return _bootstrap._gcd_import(name[level:], package, level) E :1050: in _gcd_import E ??? E :1027: in _find_and_load E ??? E :1006: in _find_and_load_unlocked E ??? E :688: in _load_unlocked E ??? E :883: in exec_module E ??? E :241: in _call_with_frames_removed E ??? E dictpath/__init__.py:3: in E from dictpath.paths import ( E dictpath/paths.py:4: in E from six import text_type E E ModuleNotFoundError: No module named 'six' /usr/lib/python3.10/site-packages/_pytest/python.py:633: CollectError ________________________ ERROR at setup of FLAKE8-check ________________________ self = def _importtestmodule(self): # We assume we are only called once per module. importmode = self.config.getoption("--import-mode") try: > mod = import_path(self.path, mode=importmode, root=self.config.rootpath) /usr/lib/python3.10/site-packages/_pytest/python.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ p = PosixPath('/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py') def import_path( p: Union[str, "os.PathLike[str]"], *, mode: Union[str, ImportMode] = ImportMode.prepend, root: Path, ) -> ModuleType: """Import and return a module from the given path, which can be a file (a module) or a directory (a package). The import mechanism used is controlled by the `mode` parameter: * `mode == ImportMode.prepend`: the directory containing the module (or package, taking `__init__.py` files into account) will be put at the *start* of `sys.path` before being imported with `__import__. * `mode == ImportMode.append`: same as `prepend`, but the directory will be appended to the end of `sys.path`, if not already in `sys.path`. * `mode == ImportMode.importlib`: uses more fine control mechanisms provided by `importlib` to import the module, which avoids having to use `__import__` and muck with `sys.path` at all. It effectively allows having same-named test modules in different places. :param root: Used as an anchor when mode == ImportMode.importlib to obtain a unique name for the module being imported so it can safely be stored into ``sys.modules``. :raises ImportPathMismatchError: If after importing the given `path` and the module `__file__` are different. Only raised in `prepend` and `append` modes. """ mode = ImportMode(mode) path = Path(p) if not path.exists(): raise ImportError(path) if mode is ImportMode.importlib: module_name = module_name_from_path(path, root) for meta_importer in sys.meta_path: spec = meta_importer.find_spec(module_name, [str(path.parent)]) if spec is not None: break else: spec = importlib.util.spec_from_file_location(module_name, str(path)) if spec is None: raise ImportError(f"Can't find module {module_name} at location {path}") mod = importlib.util.module_from_spec(spec) sys.modules[module_name] = mod spec.loader.exec_module(mod) # type: ignore[union-attr] insert_missing_modules(sys.modules, module_name) return mod pkg_path = resolve_package_path(path) if pkg_path is not None: pkg_root = pkg_path.parent names = list(path.with_suffix("").relative_to(pkg_root).parts) if names[-1] == "__init__": names.pop() module_name = ".".join(names) else: pkg_root = path.parent module_name = path.stem # Change sys.path permanently: restoring it at the end of this function would cause surprising # problems because of delayed imports: for example, a conftest.py file imported by this function # might have local imports, which would fail at runtime if we restored sys.path. if mode is ImportMode.append: if str(pkg_root) not in sys.path: sys.path.append(str(pkg_root)) elif mode is ImportMode.prepend: if str(pkg_root) != sys.path[0]: sys.path.insert(0, str(pkg_root)) else: assert_never(mode) > importlib.import_module(module_name) /usr/lib/python3.10/site-packages/_pytest/pathlib.py:533: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'dictpath', import_ = > ??? :1006: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec = ModuleSpec(name='dictpath', loader=<_frozen_importlib_external.SourceFileLoader object at 0x40045e1ab0>, origin='/buil...ictpath-0.1.3/dictpath/__init__.py', submodule_search_locations=['/build/python-dictpath/src/dictpath-0.1.3/dictpath']) > ??? :688: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_frozen_importlib_external.SourceFileLoader object at 0x40045e1ab0> module = > ??? :883: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = args = ( at 0x400471b310, file "/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py", line 1>...pyc', '__doc__': 'Dictpath module', '__file__': '/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py', ...}) kwds = {} > ??? :241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # -*- coding: utf-8 -*- """Dictpath module""" > from dictpath.paths import ( BasePath, AccessorPath, DictOrListPath, DictOrListPath as DictPath, DictOrListPath as ListPath, ) dictpath/__init__.py:3: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """Dictpath paths module""" from contextlib import contextmanager > from six import text_type E ModuleNotFoundError: No module named 'six' dictpath/paths.py:4: ModuleNotFoundError The above exception was the direct cause of the following exception: self = <_HookCaller 'pytest_runtest_setup'>, args = () kwargs = {'item': }, argname = 'item', firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4003265720> hook_name = 'pytest_runtest_setup' methods = [...apturing= _capture_fixture=None>>, ...] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_setup(item: Item) -> None: _update_current_test_var(item, "setup") > item.session._setupstate.setup(item) /usr/lib/python3.10/site-packages/_pytest/runner.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: > raise exc /usr/lib/python3.10/site-packages/_pytest/runner.py:484: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = . at 0x40034408b0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.10/site-packages/_pytest/runner.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.10/site-packages/_pytest/runner.py:259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'>, args = () kwargs = {'item': }, argname = 'item' firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4003265720> hook_name = 'pytest_runtest_setup' methods = [...apturing= _capture_fixture=None>>, ...] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_setup(item: Item) -> None: _update_current_test_var(item, "setup") > item.session._setupstate.setup(item) /usr/lib/python3.10/site-packages/_pytest/runner.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: > raise exc /usr/lib/python3.10/site-packages/_pytest/runner.py:484: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = . at 0x40045a15a0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.10/site-packages/_pytest/runner.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3.10/site-packages/_pytest/runner.py:259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'>, args = () kwargs = {'item': }, argname = 'item' firstresult = False def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() # This is written to avoid expensive operations when not needed. if self.spec: for argname in self.spec.argnames: if argname not in kwargs: notincall = tuple(set(self.spec.argnames) - kwargs.keys()) warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(notincall), stacklevel=2, ) break firstresult = self.spec.opts.get("firstresult") else: firstresult = False > return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_hooks.py:265: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x4003265720> hook_name = 'pytest_runtest_setup' methods = [...apturing= _capture_fixture=None>>, ...] kwargs = {'item': }, firstresult = False def _hookexec(self, hook_name, methods, kwargs, firstresult): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.10/site-packages/pluggy/_manager.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_setup(item: Item) -> None: _update_current_test_var(item, "setup") > item.session._setupstate.setup(item) /usr/lib/python3.10/site-packages/_pytest/runner.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: raise exc for col in needed_collectors[len(self.stack) :]: assert col not in self.stack # Push onto the stack. self.stack[col] = ([col.teardown], None) try: col.setup() except TEST_OUTCOME as exc: self.stack[col] = (self.stack[col][0], exc) > raise exc /usr/lib/python3.10/site-packages/_pytest/runner.py:494: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.runner.SetupState object at 0x40043ebf70> item = def setup(self, item: Item) -> None: """Setup objects along the collector chain to the item.""" needed_collectors = item.listchain() # If a collector fails its setup, fail its entire subtree of items. # The setup is not retried for each item - the same exception is used. for col, (finalizers, exc) in self.stack.items(): assert col in needed_collectors, "previous item was not torn down properly" if exc: raise exc for col in needed_collectors[len(self.stack) :]: assert col not in self.stack # Push onto the stack. self.stack[col] = ([col.teardown], None) try: > col.setup() /usr/lib/python3.10/site-packages/_pytest/runner.py:491: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def setup(self) -> None: # Not using fixtures to call setup_module here because autouse fixtures # from packages are not called automatically (#4085). setup_module = _get_first_non_fixture_func( > self.obj, ("setUpModule", "setup_module") ) /usr/lib/python3.10/site-packages/_pytest/python.py:681: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = @property def obj(self): """Underlying Python object.""" obj = getattr(self, "_obj", None) if obj is None: > self._obj = obj = self._getobj() /usr/lib/python3.10/site-packages/_pytest/python.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _getobj(self): > return self._importtestmodule() /usr/lib/python3.10/site-packages/_pytest/python.py:519: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _importtestmodule(self): # We assume we are only called once per module. importmode = self.config.getoption("--import-mode") try: mod = import_path(self.path, mode=importmode, root=self.config.rootpath) except SyntaxError as e: raise self.CollectError( ExceptionInfo.from_current().getrepr(style="short") ) from e except ImportPathMismatchError as e: raise self.CollectError( "import file mismatch:\n" "imported module %r has this __file__ attribute:\n" " %s\n" "which is not the same as the test file we want to collect:\n" " %s\n" "HINT: remove __pycache__ / .pyc files and/or use a " "unique basename for your test file modules" % e.args ) from e except ImportError as e: exc_info = ExceptionInfo.from_current() if self.config.getoption("verbose") < 2: exc_info.traceback = exc_info.traceback.filter(filter_traceback) exc_repr = ( exc_info.getrepr(style="short") if exc_info.traceback else exc_info.exconly() ) formatted_tb = str(exc_repr) > raise self.CollectError( "ImportError while importing test module '{path}'.\n" "Hint: make sure your test modules/packages have valid Python names.\n" "Traceback:\n" "{traceback}".format(path=self.path, traceback=formatted_tb) ) from e E _pytest.nodes.Collector.CollectError: ImportError while importing test module '/build/python-dictpath/src/dictpath-0.1.3/dictpath/__init__.py'. E Hint: make sure your test modules/packages have valid Python names. E Traceback: E /usr/lib/python3.10/site-packages/_pytest/python.py:608: in _importtestmodule E mod = import_path(self.path, mode=importmode, root=self.config.rootpath) E /usr/lib/python3.10/site-packages/_pytest/pathlib.py:533: in import_path E importlib.import_module(module_name) E /usr/lib/python3.10/importlib/__init__.py:126: in import_module E return _bootstrap._gcd_import(name[level:], package, level) E :1050: in _gcd_import E ??? E :1027: in _find_and_load E ??? E :1006: in _find_and_load_unlocked E ??? E :688: in _load_unlocked E ??? E :883: in exec_module E ??? E :241: in _call_with_frames_removed E ??? E dictpath/__init__.py:3: in E from dictpath.paths import ( E dictpath/paths.py:4: in E from six import text_type E E ModuleNotFoundError: No module named 'six' /usr/lib/python3.10/site-packages/_pytest/python.py:633: CollectError =============================== warnings summary =============================== ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:146 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:146 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:146 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:146 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:146 /usr/lib/python3.10/site-packages/_pytest/nodes.py:146: PytestDeprecationWarning: is not using a cooperative constructor and only takes {'fspath', 'parent'}. See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details. warnings.warn( ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:672 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:672 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:672 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:672 ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:672 /usr/lib/python3.10/site-packages/_pytest/nodes.py:672: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to Flake8Item is deprecated. Please use the (path: pathlib.Path) argument instead. See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path super().__init__( ../../../../usr/lib/python3.10/site-packages/_pytest/nodes.py:708 /usr/lib/python3.10/site-packages/_pytest/nodes.py:708: PytestWarning: Flake8Item is an Item subclass and should not be a collector, however its bases File are collectors. Please split the Collectors and the Item into separate node types. Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/ warnings.warn( setup.py::FLAKE8 setup.py::FLAKE8 dictpath/__init__.py::FLAKE8 dictpath/__init__.py::FLAKE8 /usr/lib/python3.10/site-packages/flake8/plugins/manager.py:261: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select. eps = importlib_metadata.entry_points().get(self.namespace, ()) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html - generated xml file: /build/python-dictpath/src/dictpath-0.1.3/reports/junit.xml - ---------- coverage: platform linux, python 3.10.1-final-0 ----------- Name Stmts Miss Cover Missing ----------------------------------------------------- dictpath/__init__.py 8 6 25% 9-15 dictpath/accessors.py 20 20 0% 2-29 dictpath/parsers.py 33 33 0% 2-46 dictpath/paths.py 133 131 2% 6-185 ----------------------------------------------------- TOTAL 194 190 2% Coverage XML written to file reports/coverage.xml =========================== short test summary info ============================ ERROR dictpath/accessors.py::FLAKE8 - _pytest.nodes.Collector.CollectError: I... ERROR dictpath/parsers.py::FLAKE8 - _pytest.nodes.Collector.CollectError: Imp... ERROR dictpath/paths.py::FLAKE8 - _pytest.nodes.Collector.CollectError: Impor... =================== 2 passed, 15 warnings, 3 errors in 6.75s =================== ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/felix27/build receiving incremental file list python-dictpath-0.1.3-1-riscv64-build.log python-dictpath-0.1.3-1-riscv64-check.log sent 62 bytes received 7,349 bytes 4,940.67 bytes/sec total size is 68,392 speedup is 9.23