Closed kloczek closed 8 months ago
@kloczek attr.s
comes from https://www.attrs.org/en/stable/api-attr.html#core, not https://github.com/denis-ryzhkov/attr. All of this project's Python dependencies are list at https://github.com/Toblerity/Fiona/blob/master/pyproject.toml#L37.
After install correct module in build env now pytest is failing with call trace and deprecation message
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
GDAL: 3.8.1 (3080100)
Supported drivers: CSV, DGN, DXF, ESRI Shapefile, ESRIJSON, FlatGeobuf, GML, GPKG, GeoJSON, GeoJSONSeq, Idrisi, MapInfo File, OGR_GMT, OGR_PDS, OpenFileGDB, PCIDSK, S57, SQLite, TopoJSON
rootdir: /home/tkloczko/rpmbuild/BUILD/Fiona-1.9.5
configfile: pytest.ini
testpaths: tests
plugins: anyio-4.1.0, asyncio-0.23.2, mock-3.12.0, vcr-1.0.2
asyncio: mode=strict
collected 426 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 845, in genitems
INTERNALERROR> yield from self.genitems(subnode)
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 540, in import_path
INTERNALERROR> spec.loader.exec_module(mod) # type: ignore[union-attr]
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 186, in exec_module
INTERNALERROR> exec(co, module.__dict__)
INTERNALERROR> File "/home/tkloczko/rpmbuild/BUILD/Fiona-1.9.5/tests/test_fio_info.py", line 5, in <module>
INTERNALERROR> from pkg_resources import iter_entry_points
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 118, in <module>
INTERNALERROR> warnings.warn(
INTERNALERROR> DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
=================================================================================== no tests ran in 0.78s ===================================================================================
this was resolved in maint-1.9
with 1f3ca4dd965f5e7f3544bc48dcdffe1ceaccfd7f
Thank you however even with that commit still have few few units failing
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
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-fiona-1.9.5-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-fiona-1.9.5-5.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ImportError while loading conftest '/home/tkloczko/rpmbuild/BUILD/Fiona-1.9.5/tests/conftest.py'. tests/conftest.py:15: inList of installed modules in build env:
```console Package Version ----------------------------- ------- alabaster 0.7.13 attr 0.3.2 Babel 2.14.0 build 1.0.3 charset-normalizer 3.3.2 click 8.1.7 cppclean 0.13 Cython 3.0.6 distro 1.8.0 dnf 4.18.2 docutils 0.20.1 exceptiongroup 1.1.3 gpg 1.23.2 idna 3.6 imagesize 1.4.1 importlib-metadata 7.0.0 iniconfig 2.0.0 installer 0.7.0 Jinja2 3.1.2 libdnf 0.72.0 MarkupSafe 2.1.3 numpy 1.24.4 packaging 23.2 pluggy 1.3.0 Pygments 2.17.2 pyproject_hooks 1.0.0 pytest 7.4.3 python-dateutil 2.8.2 pytz 2023.3 requests 2.31.0 setuptools 69.0.2 six 1.16.0 snowballstemmer 2.2.0 Sphinx 7.1.2 sphinx-click 5.0.1 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.9 tomli 2.0.1 urllib3 1.26.18 wheel 0.42.0 zipp 3.17.0 ```