Repository navigation
4.2.1: pytest errors cannot load crypto library for xmlsec. #1357
Copy link
Copy link
Open
Description
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
buildwith--no-isolationI'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>
- build is performed in env which is cut off from access to the public network (pytest is executed with
-m "not network")
I'm no sure what could be wron in my build env. If may I ask for some hints 🤔
pytest shows as well some PytestUnknownMarkWarning warnings
Here is pytest output:
Details
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-zeep-4.2.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.16, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1, configfile: pyproject.toml, testpaths: tests
plugins: anyio-3.6.2, httpx-0.21.0, requests-mock-1.10.0
collected 466 items / 3 errors
========================================================================================== ERRORS ===========================================================================================
_______________________________________________________________________ ERROR collecting tests/test_wsse_signature.py _______________________________________________________________________
tests/test_wsse_signature.py:9: in <module>
from zeep import ns, wsse
../../BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/zeep/wsse/__init__.py:2: in <module>
from .signature import BinarySignature, MemorySignature, Signature
../../BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/zeep/wsse/signature.py:20: in <module>
import xmlsec
E xmlsec.Error: (1, 'cannot load crypto library for xmlsec.')
_______________________________________________________________________ ERROR collecting tests/test_wsse_username.py ________________________________________________________________________
tests/test_wsse_username.py:10: in <module>
from zeep.wsse import UsernameToken
../../BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/zeep/wsse/__init__.py:2: in <module>
from .signature import BinarySignature, MemorySignature, Signature
../../BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/zeep/wsse/signature.py:20: in <module>
import xmlsec
E xmlsec.Error: (1, 'cannot load crypto library for xmlsec.')
_________________________________________________________________________ ERROR collecting tests/test_wsse_utils.py _________________________________________________________________________
tests/test_wsse_utils.py:3: in <module>
from zeep.wsse import utils
../../BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/zeep/wsse/__init__.py:2: in <module>
from .signature import BinarySignature, MemorySignature, Signature
../../BUILDROOT/python-zeep-4.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/zeep/wsse/signature.py:20: in <module>
import xmlsec
E xmlsec.Error: (1, 'cannot load crypto library for xmlsec.')
===================================================================================== warnings summary ======================================================================================
tests/conftest.py:19
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/conftest.py:19: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
Use @pytest.fixture instead; they are the same.
@pytest.yield_fixture()
tests/test_async_client.py:7
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_async_client.py:7: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.asyncio
tests/test_async_transport.py:28
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_async_transport.py:28: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.asyncio
tests/test_async_transport.py:41
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_async_transport.py:41: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.asyncio
tests/test_async_transport.py:58
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_async_transport.py:58: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.asyncio
tests/test_async_transport.py:65
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_async_transport.py:65: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.asyncio
tests/test_wsdl.py:162
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_wsdl.py:162: DeprecationWarning: invalid escape sequence \-
"""
tests/test_xsd_union.py:50
/home/tkloczko/rpmbuild/BUILD/python-zeep-4.2.1/tests/test_xsd_union.py:50: DeprecationWarning: invalid escape sequence \d
"""
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
ERROR tests/test_wsse_signature.py - xmlsec.Error: (1, 'cannot load crypto library for xmlsec.')
ERROR tests/test_wsse_username.py - xmlsec.Error: (1, 'cannot load crypto library for xmlsec.')
ERROR tests/test_wsse_utils.py - xmlsec.Error: (1, 'cannot load crypto library for xmlsec.')
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================== 8 warnings, 3 errors in 1.01s ===============================================================================Here is list of installed modules in build env
Details
Package Version
----------------------------- -----------------
aiohttp 3.8.3
aioresponses 0.7.4
aiosignal 1.3.1
alabaster 0.7.12
anyio 3.6.2
async-timeout 4.0.2
attrs 22.2.0
Babel 2.11.0
build 0.9.0
cached-property 1.5.2
certifi 2022.9.24
charset-normalizer 3.0.1
distro 1.8.0
docutils 0.19
exceptiongroup 1.0.0
extras 1.0.0
fixtures 4.0.0
freezegun 1.2.1
frozenlist 1.3.3
gpg 1.18.0-unknown
h11 0.13.0
httpcore 0.16.3
httpx 0.23.3
idna 3.4
imagesize 1.4.1
importlib-metadata 5.1.0
iniconfig 1.1.1
isodate 0.6.1
Jinja2 3.1.2
libcomps 0.1.19
lxml 4.9.1
MarkupSafe 2.1.1
multidict 6.0.2
packaging 21.3
pbr 5.9.0
pep517 0.13.0
pip 22.3.1
platformdirs 2.6.0
pluggy 1.0.0
pretend 1.0.9
Pygments 2.14.0
PyGObject 3.42.2
pyparsing 3.0.9
pytest 7.2.0
pytest-httpx 0.21.0
python-dateutil 2.8.2
pytz 2022.4
requests 2.28.1
requests-file 1.5.1
requests-mock 1.10.0
requests-toolbelt 0.10.1
rpm 4.17.0
setuptools 65.6.3
six 1.16.0
sniffio 1.2.0
snowballstemmer 2.2.0
Sphinx 5.3.0
sphinxcontrib-applehelp 1.0.2.dev20221204
sphinxcontrib-devhelp 1.0.2.dev20221204
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1.dev20221204
sphinxcontrib-qthelp 1.0.3.dev20221204
sphinxcontrib-serializinghtml 1.1.5
testtools 2.5.0
tomli 2.0.1
urllib3 1.26.12
wheel 0.38.4
xmlsec 1.3.13
yarl 1.8.2
zipp 3.11.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
kloczek commentedon Jan 28, 2023
gentle ping .. 🤔
kloczek commentedon May 27, 2024
With new pytest 8.2.1 test suite fails in new unit
Here is pytest output:
feat(wsse): add pure-Python WS-Security signing (no xmlsec dependency)
feat(wsse): add pure-Python WS-Security signing (no xmlsec dependency)