From 2685205240144a6b95bba5062e5fcd374a82edfe Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 16 Jan 2015 01:31:14 +0100 Subject: testsuite/requirements: python-daemon >= 2.0.0 is broken --- testsuite/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuite') diff --git a/testsuite/requirements.txt b/testsuite/requirements.txt index 898249389..48657acf7 100644 --- a/testsuite/requirements.txt +++ b/testsuite/requirements.txt @@ -4,4 +4,4 @@ mock sphinx pylint<1.0 pep8 -python-daemon +python-daemon<2.0.0 -- cgit v1.2.3-1-g7c22 From 4609569ec9a7b9ea083c5546fa38ef401bba5fa8 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 16 Jan 2015 02:58:40 +0100 Subject: testsuite: support for python-2.7.9 pylint could not parse the dynamic assignment of the PROTOCOL_* values in the ssl module (the real values are in the _ssl extension). We dynamically add here the PROTOCOL_* constants we need. --- testsuite/ext/ssl_protocols.py | 17 +++++++++++++++++ testsuite/pylintrc.conf | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 testsuite/ext/ssl_protocols.py (limited to 'testsuite') diff --git a/testsuite/ext/ssl_protocols.py b/testsuite/ext/ssl_protocols.py new file mode 100644 index 000000000..66068d2a9 --- /dev/null +++ b/testsuite/ext/ssl_protocols.py @@ -0,0 +1,17 @@ +try: + from logilab.astng import MANAGER, scoped_nodes, node_classes + PYLINT=0 +except ImportError: + from astroid import MANAGER, scoped_nodes, node_classes + PYLINT=1 + +def ssl_transform(module): + if module.name == 'ssl': + for proto in ('SSLv23', 'TLSv1'): + module.locals['PROTOCOL_%s' % proto] = [node_classes.Const()] + +def register(linter): + if PYLINT == 0: + MANAGER.register_transformer(ssl_transform) + else: + MANAGER.register_transform(scoped_nodes.Module, ssl_transform) diff --git a/testsuite/pylintrc.conf b/testsuite/pylintrc.conf index 94904877b..b3340cb4f 100644 --- a/testsuite/pylintrc.conf +++ b/testsuite/pylintrc.conf @@ -19,7 +19,7 @@ persistent=no # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. -load-plugins=ext.exception_messages +load-plugins=ext.exception_messages,ext.ssl_protocols [MESSAGES CONTROL] -- cgit v1.2.3-1-g7c22 From cae39b746051ff5f3257342d0659340283b2d6ef Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 24 Feb 2015 16:29:07 -0600 Subject: Fix pylint errors This also pins pylint to <= 0.28 so we don't have to keep playing whack-a-mole with it. Also removes unnecessary suppression of apt warnings. This is no longer necessary in 12.04, so should be safe to remove. If you're on Ubuntu < 12.04, upgrade for heaven's sake. --- testsuite/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuite') diff --git a/testsuite/requirements.txt b/testsuite/requirements.txt index 48657acf7..0dd460b87 100644 --- a/testsuite/requirements.txt +++ b/testsuite/requirements.txt @@ -2,6 +2,6 @@ lxml nose mock sphinx -pylint<1.0 +pylint<0.29 pep8 python-daemon<2.0.0 -- cgit v1.2.3-1-g7c22