From fc91eeecb75d59310d39f7b5c6466c5e233f2a2d Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 3 Jan 2017 01:16:48 +0700 Subject: [PATCH] RadonBear: Pin to version 1.4.0 radon 1.4.2 added a dependency on flake8-polyfill, which depends on flake8 without any version specification, and flake8 versions have various version dependencies on pyflakes and pycodestyle. As a result, it is not possible to know what versions of pyflakes and pycodestyle that will be required to be compatible with whatever flake8 version happens to be installed. Fixes https://github.com/coala/coala-bears/issues/1228 --- .ci/generate_bear_requirements.py | 10 ++++++++-- bear-requirements.txt | 4 ++-- bears/python/PyFlakesBear.py | 2 +- bears/python/RadonBear.py | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.ci/generate_bear_requirements.py b/.ci/generate_bear_requirements.py index b672dd6cab..f35ae90080 100755 --- a/.ci/generate_bear_requirements.py +++ b/.ci/generate_bear_requirements.py @@ -29,6 +29,10 @@ PROJECT_BEAR_DIR = os.path.abspath(os.path.join(PROJECT_DIR, 'bears')) +PINNED_PACKAGES = ( + 'radon', +) + def get_args(): parser = argparse.ArgumentParser( @@ -71,8 +75,10 @@ def get_all_pip_requirements(bears): def write_requirements(requirements, output): for requirement in requirements: if requirement.version: - output.write(requirement.package + '~=' + requirement.version + - '\n') + marker = '==' if requirement.package in PINNED_PACKAGES else '~=' + output.write('{0}{1}{2}\n'.format(requirement.package, + marker, + requirement.version)) else: output.write(requirement.package + '\n') diff --git a/bear-requirements.txt b/bear-requirements.txt index 0d1605367d..491dfb5661 100644 --- a/bear-requirements.txt +++ b/bear-requirements.txt @@ -16,10 +16,10 @@ nltk~=3.2 proselint~=0.7.0 pycodestyle~=2.2 pydocstyle~=1.1 -pyflakes~=1.3.0 +pyflakes~=1.4.0 pylint~=1.6 pyyaml~=3.12 -radon~=1.4 +radon==1.4.0 requests~=2.12 restructuredtext-lint~=0.17.2 rstcheck~=2.2 diff --git a/bears/python/PyFlakesBear.py b/bears/python/PyFlakesBear.py index da419040e6..e38ea99645 100644 --- a/bears/python/PyFlakesBear.py +++ b/bears/python/PyFlakesBear.py @@ -18,7 +18,7 @@ class PyFlakesBear: See https://github.com/PyCQA/pyflakes for more info. """ LANGUAGES = {'Python', 'Python 3'} - REQUIREMENTS = {PipRequirement('pyflakes', '1.3.0')} + REQUIREMENTS = {PipRequirement('pyflakes', '1.4.0')} AUTHORS = {'The coala developers'} AUTHORS_EMAILS = {'coala-devel@googlegroups.com'} LICENSE = 'AGPL-3.0' diff --git a/bears/python/RadonBear.py b/bears/python/RadonBear.py index 506e98bf29..c93e38bbce 100644 --- a/bears/python/RadonBear.py +++ b/bears/python/RadonBear.py @@ -11,7 +11,7 @@ class RadonBear(LocalBear): LANGUAGES = {'Python', 'Python 2', 'Python 3'} - REQUIREMENTS = {PipRequirement('radon', '1.4')} + REQUIREMENTS = {PipRequirement('radon', '1.4.0')} AUTHORS = {'The coala developers'} AUTHORS_EMAILS = {'coala-devel@googlegroups.com'} LICENSE = 'AGPL-3.0'