24759053 Use repoze.lru instead of backports.functools-lru-cache in pylint
authorRich Burridge <rich.burridge@oracle.com>
Fri, 30 Sep 2016 07:50:02 -0700
changeset 7007 8aba3abf65e1
parent 7006 eb24eb49f7c4
child 7008 a33a24a8fc91
24759053 Use repoze.lru instead of backports.functools-lru-cache in pylint
components/python/pylint/patches/02-fix-2.7-deps.patch
components/python/pylint/patches/02-remove-2.7-deps.patch
components/python/pylint/patches/03-fix-lru_cache.patch
components/python/pylint/pylint-PYVER.p5m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/pylint/patches/02-fix-2.7-deps.patch	Fri Sep 30 07:50:02 2016 -0700
@@ -0,0 +1,30 @@
+Fix pylint 2.7 dependencies:
+- Change the references to backports.functools-lru-cache to repoze.lru
+- Remove references to configparser (this will be automatically handled
+  via the six module).
+
+These changes will not be sent upstream.
+
+--- pylint-1.6.4/pylint/__pkginfo__.py.orig	2016-09-29 16:37:29.087716647 +0000
++++ pylint-1.6.4/pylint/__pkginfo__.py	2016-09-29 16:38:08.944410368 +0000
+@@ -23,7 +23,7 @@
+ 
+ extras_require = {}
+ extras_require[':sys_platform=="win32"'] = ['colorama']
+-extras_require[':python_version=="2.7"'] = ['configparser', 'backports.functools_lru_cache']
++extras_require[':python_version=="2.7"'] = ['repoze.lru']
+ 
+ 
+ license = 'GPL'
+--- pylint-1.6.4/pylint.egg-info/requires.txt.orig	2016-09-29 16:38:53.808066151 +0000
++++ pylint-1.6.4/pylint.egg-info/requires.txt	2016-09-29 16:39:07.395150865 +0000
+@@ -3,8 +3,7 @@
+ isort >= 4.2.5
+ 
+ [:python_version=="2.7"]
+-configparser
+-backports.functools_lru_cache
++repoze.lru
+ 
+ [:sys_platform=="win32"]
+ colorama
--- a/components/python/pylint/patches/02-remove-2.7-deps.patch	Mon Sep 19 05:51:20 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-Remove the references to backports.functools-lru-cache and configparser
-in pylint 2.7, until the Python backports.functools-lru-cache module is
-available in Userland/Solaris.
-
-configparser will be automatically handled via the six module.
-
-These changes will not be sent upstream (and are only temporary).
-
---- pylint-1.6.4/pylint/__pkginfo__.py.orig	2016-09-29 13:31:06.105631780 +0000
-+++ pylint-1.6.4/pylint/__pkginfo__.py	2016-09-29 13:31:18.012770831 +0000
-@@ -23,7 +23,6 @@
- 
- extras_require = {}
- extras_require[':sys_platform=="win32"'] = ['colorama']
--extras_require[':python_version=="2.7"'] = ['configparser', 'backports.functools_lru_cache']
- 
- 
- license = 'GPL'
---- pylint-1.6.4/pylint.egg-info/requires.txt.orig	2016-09-29 13:31:54.332003719 +0000
-+++ pylint-1.6.4/pylint.egg-info/requires.txt	2016-09-29 13:32:04.774966160 +0000
-@@ -2,9 +2,5 @@
- six
- isort >= 4.2.5
- 
--[:python_version=="2.7"]
--configparser
--backports.functools_lru_cache
--
- [:sys_platform=="win32"]
- colorama
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/pylint/patches/03-fix-lru_cache.patch	Fri Sep 30 07:50:02 2016 -0700
@@ -0,0 +1,17 @@
+Substitute repoze.lru for backports.functools_lru_cache as we already
+have repoze.lru in Userland/Solaris and backports.functools_lru_cache
+has some 4th party dependencies.
+
+This change will not be sent upstream.
+
+--- pylint-1.6.4/pylint/checkers/variables.py.orig	2016-09-29 16:26:46.454143452 +0000
++++ pylint-1.6.4/pylint/checkers/variables.py	2016-09-29 16:29:51.776301211 +0000
+@@ -13,7 +13,7 @@
+ try:
+     from functools import lru_cache
+ except ImportError:
+-    from backports.functools_lru_cache import lru_cache
++    from repoze.lru import lru_cache
+ 
+ import six
+ 
--- a/components/python/pylint/pylint-PYVER.p5m	Mon Sep 19 05:51:20 2016 -0700
+++ b/components/python/pylint/pylint-PYVER.p5m	Fri Sep 30 07:50:02 2016 -0700
@@ -133,6 +133,9 @@
 # force a dependency on logilab-common-$(PYV) version 1.2.2
 depend type=require fmri=library/python/logilab-common-$(PYV)@1.2.2
 
+# force a dependency on repoze.lru-27 version 0.6 for Python 2.7 only.
+$(PYTHON_2.7_ONLY)depend type=require fmri=library/python/[email protected]
+
 # force a dependency on the six package
 depend type=require \
     fmri=library/python/six-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)