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

4.0.0: pytest is failing #228

Closed
kloczek opened this issue Oct 27, 2022 · 3 comments
Closed

4.0.0: pytest is failing #228

kloczek opened this issue Oct 27, 2022 · 3 comments

Comments

@kloczek
Copy link

kloczek commented Oct 27, 2022

I'm trying to package 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-pytest-benchmark-4.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-benchmark-4.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.1.3, pluggy-1.0.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-benchmark-4.0.0, configfile: pytest.ini, testpaths: tests
plugins: benchmark-4.0.0, forked-1.4.0, xdist-2.5.0, aspectlib-1.5.2
collected 225 items / 2 errors

================================================================================== ERRORS ==================================================================================
___________________________________________________________ ERROR collecting tests/test_elasticsearch_storage.py ___________________________________________________________
/usr/lib/python3.8/site-packages/requests/__init__.py:105: in <module>
    check_compatibility(
/usr/lib/python3.8/site-packages/requests/__init__.py:84: in check_compatibility
    assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)
E   AssertionError

During handling of the above exception, another exception occurred:
tests/test_elasticsearch_storage.py:9: in <module>
    import elasticsearch
/usr/lib/python3.8/site-packages/elasticsearch/__init__.py:24: in <module>
    from elastic_transport import __version__ as _elastic_transport_version
/usr/lib/python3.8/site-packages/elastic_transport/__init__.py:22: in <module>
    from ._async_transport import AsyncTransport as AsyncTransport
/usr/lib/python3.8/site-packages/elastic_transport/_async_transport.py:41: in <module>
    from ._node import AiohttpHttpNode, BaseAsyncNode
/usr/lib/python3.8/site-packages/elastic_transport/_node/__init__.py:21: in <module>
    from ._http_requests import RequestsHttpNode
/usr/lib/python3.8/site-packages/elastic_transport/_node/_http_requests.py:39: in <module>
    import requests
/usr/lib/python3.8/site-packages/requests/__init__.py:109: in <module>
    warnings.warn(
E   requests.exceptions.RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.0) doesn't match a supported version!
___________________________________________________________ ERROR collecting tests/test_elasticsearch_storage.py ___________________________________________________________
/usr/lib/python3.8/site-packages/requests/__init__.py:105: in <module>
    check_compatibility(
/usr/lib/python3.8/site-packages/requests/__init__.py:84: in check_compatibility
    assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)
E   AssertionError

During handling of the above exception, another exception occurred:
tests/test_elasticsearch_storage.py:9: in <module>
    import elasticsearch
/usr/lib/python3.8/site-packages/elasticsearch/__init__.py:24: in <module>
    from elastic_transport import __version__ as _elastic_transport_version
/usr/lib/python3.8/site-packages/elastic_transport/__init__.py:22: in <module>
    from ._async_transport import AsyncTransport as AsyncTransport
/usr/lib/python3.8/site-packages/elastic_transport/_async_transport.py:41: in <module>
    from ._node import AiohttpHttpNode, BaseAsyncNode
/usr/lib/python3.8/site-packages/elastic_transport/_node/__init__.py:21: in <module>
    from ._http_requests import RequestsHttpNode
/usr/lib/python3.8/site-packages/elastic_transport/_node/_http_requests.py:39: in <module>
    import requests
/usr/lib/python3.8/site-packages/requests/__init__.py:109: in <module>
    warnings.warn(
E   requests.exceptions.RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.0) doesn't match a supported version!
========================================================================= short test summary info ==========================================================================
ERROR tests/test_elasticsearch_storage.py - requests.exceptions.RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.0) doesn't match a...
ERROR tests/test_elasticsearch_storage.py - requests.exceptions.RequestsDependencyWarning: urllib3 (1.26.12) or chardet (None)/charset_normalizer (3.0.0) doesn't match a...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 2 errors in 0.65s =============================================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
appdirs                       1.4.4
aspectlib                     1.5.2
attrs                         22.1.0
Babel                         2.10.2
Brlapi                        0.8.3
build                         0.8.0
certifi                       2021.10.8
charset-normalizer            3.0.0
codespell                     2.2.1
cssselect                     1.1.0
distro                        1.7.0
dnspython                     2.2.1
docutils                      0.18.1
elastic-transport             8.4.0
elasticsearch                 8.4.3
execnet                       1.9.0
extras                        1.0.0
fields                        5.0.0
fixtures                      4.0.0
freezegun                     1.2.1
gpg                           1.17.1-unknown
idna                          3.4
imagesize                     1.4.1
importlib-metadata            5.0.0
iniconfig                     1.1.1
Jinja2                        3.1.1
libcomps                      0.1.19
louis                         3.23.0
lxml                          4.9.1
MarkupSafe                    2.1.1
numpy                         1.23.1
packaging                     21.3
pbr                           5.9.0
pep517                        0.13.0
pip                           22.2.2
pluggy                        1.0.0
py                            1.11.0
py-cpuinfo                    8.0.0
pygal                         3.0.0
Pygments                      2.13.0
PyGObject                     3.42.2
pyparsing                     3.0.9
pytest                        7.1.3
pytest-forked                 1.4.0
pytest-xdist                  2.5.0
python-dateutil               2.8.2
pytz                          2022.4
requests                      2.28.1
rpm                           4.17.0
scour                         0.38.2
setuptools                    65.5.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        5.3.0
sphinx-py3doc-enhanced-theme  2.4.0
sphinxcontrib-applehelp       1.0.2.dev20220730
sphinxcontrib-devhelp         1.0.2.dev20220730
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1.dev20220730
sphinxcontrib-qthelp          1.0.3.dev20220730
sphinxcontrib-serializinghtml 1.1.5
testtools                     2.5.0
tomli                         2.0.1
urllib3                       1.26.12
wheel                         0.37.1
zipp                          3.9.0
@ionelmc
Copy link
Owner

ionelmc commented Oct 27, 2022

I can't do anything here. It's up to you to resolve this dependency conflict.

@kloczek
Copy link
Author

kloczek commented Oct 27, 2022

Closing I've opened psf/requests#6272

@kloczek kloczek closed this as completed Oct 27, 2022
@ionelmc
Copy link
Owner

ionelmc commented Oct 27, 2022 via email

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

2 participants