[rdo-users] requests requires chardet >= 3.0.2, < 3.1.0

iain MacDonnell rdo-list at dseven.org
Tue Oct 2 19:22:38 UTC 2018


Not sure if this should go to -users or -dev (or somewhere else)...

RDO (Rocky) ships with python2-requests-2.19.1-3.el7.noarch.rpm and
python2-chardet-3.0.4-7.el7.noarch.rpm.

The requests code has a hard-coded check for:

    # Check chardet for compatibility.
    major, minor, patch = chardet_version.split('.')[:3]
    major, minor, patch = int(major), int(minor), int(patch)
    # chardet >= 3.0.2, < 3.1.0
    assert major == 3
    assert minor < 1
    assert patch >= 2

Unfortunately this requirement is not reflected in the
python2-requests RPM, which just "requires" "python-chardet" (without
any specific version). If the EL7-bundled version of python-chardet is
already installed, and one installs python2-requests from the RDO
repo, either directly or via dependency, python2-chardet does NOT get
updated, which results in warnings like:

# python -c 'import requests'
/usr/lib/python2.7/site-packages/requests/__init__.py:91:
RequestsDependencyWarning: urllib3 (1.21.1) or chardet (2.2.1) doesn't
match a supported version!
  RequestsDependencyWarning)
#

I think that the python2-requests PRM needs an explicit "requires" for
the specific version of python[2]-chardet. Anyone disagree? What's the
right way to file a bug on this?

TIA,

    ~iain


More information about the users mailing list