Skip to content
  • John Snow's avatar
    1e4d8b31
    python: pin setuptools below v60.0.0 · 1e4d8b31
    John Snow authored
    setuptools is a package that replaces the python stdlib 'distutils'. It
    is generally installed by all venv-creating tools "by default". It isn't
    actually needed at runtime for the qemu package, so our own setup.cfg
    does not mention it as a dependency.
    
    However, tox will create virtual environments that include it, and will
    upgrade it to the very latest version. the 'venv' tool will also include
    whichever version your host system happens to have.
    
    Unfortunately, setuptools version 60.0.0 and above include a hack to
    forcibly overwrite python's built-in distutils. The pylint tool that we
    use to run code analysis checks on this package relies on distutils and
    suffers regressions when setuptools >= 60.0.0 is present at all, see
    https://github.com/PyCQA/pylint/issues/5704
    
    
    
    Instruct tox and the 'check-dev' targets to avoid setuptools packages
    that are too new, for now. Pipenv is unaffected, because setuptools 60
    does not offer Python 3.6 support, and our pipenv config is pinned
    against Python 3.6.
    
    Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
    Reviewed-by: default avatarBeraldo Leal <bleal@redhat.com>
    Reviewed-by: default avatarCleber Rosa <crosa@redhat.com>
    Tested-by: default avatarCleber Rosa <crosa@redhat.com>
    Message-id: 20220121005221.142236-1-jsnow@redhat.com
    Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
    1e4d8b31
    python: pin setuptools below v60.0.0
    John Snow authored
    setuptools is a package that replaces the python stdlib 'distutils'. It
    is generally installed by all venv-creating tools "by default". It isn't
    actually needed at runtime for the qemu package, so our own setup.cfg
    does not mention it as a dependency.
    
    However, tox will create virtual environments that include it, and will
    upgrade it to the very latest version. the 'venv' tool will also include
    whichever version your host system happens to have.
    
    Unfortunately, setuptools version 60.0.0 and above include a hack to
    forcibly overwrite python's built-in distutils. The pylint tool that we
    use to run code analysis checks on this package relies on distutils and
    suffers regressions when setuptools >= 60.0.0 is present at all, see
    https://github.com/PyCQA/pylint/issues/5704
    
    
    
    Instruct tox and the 'check-dev' targets to avoid setuptools packages
    that are too new, for now. Pipenv is unaffected, because setuptools 60
    does not offer Python 3.6 support, and our pipenv config is pinned
    against Python 3.6.
    
    Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
    Reviewed-by: default avatarBeraldo Leal <bleal@redhat.com>
    Reviewed-by: default avatarCleber Rosa <crosa@redhat.com>
    Tested-by: default avatarCleber Rosa <crosa@redhat.com>
    Message-id: 20220121005221.142236-1-jsnow@redhat.com
    Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
Loading