Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cfbb2f

Browse files
authored
Merge pull request #7871 from felixonmars/backports.functools_lru_cache
Use backports.functools_lru_cache instead of functools32
2 parents 0cab7c6 + 460e19d commit 4cfbb2f

File tree

9 files changed

+18
-14
lines changed

9 files changed

+18
-14
lines changed

INSTALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Required Dependencies
222222
Dependencies for python 2
223223
^^^^^^^^^^^^^^^^^^^^^^^^^
224224

225-
`functools32 <https://pypi.python.org/pypi/functools32>`_
225+
`backports.functools_lru_cache <https://pypi.python.org/pypi/backports.functools_lru_cache>`_
226226
Required for compatibility if running on Python 2.7.
227227

228228
`subprocess32 <https://pypi.python.org/pypi/subprocess32/>`_

README.win.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ conda install pyqt
2727
# this package is only available in the conda-forge channel
2828
conda install -c conda-forge msinttypes
2929
# for python 2.7
30-
conda install -c conda-forge functools32
30+
conda install -c conda-forge backports.functools_lru_cache
3131

3232
# copy the libs which have "wrong" names
3333
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ install:
9494
mock sphinx
9595
- activate test-environment
9696
- cmd: echo %PYTHON_VERSION% %TARGET_ARCH%
97-
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q functools32
97+
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache
9898
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
9999
- conda install -q pytest "pytest-cov>=2.3.1" pytest-timeout pytest-xdist
100100

build_alllocal.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:: # this package is only available in the conda-forge channel
88
:: conda install -c conda-forge msinttypes
99
:: if you build on py2.7:
10-
:: conda install -c conda-forge functools32
10+
:: conda install -c conda-forge backports.functools_lru_cache
1111

1212
set TARGET=bdist_wheel
1313
IF [%1]==[] (

ci/conda_recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ requirements:
3939
- zlib 1.2* # [win]
4040
- pyqt # [not osx]
4141
- tk 8.5* # [linux]
42-
- functools32 # [py2k]
42+
- backports.functools_lru_cache # [py2k]
4343

4444
run:
4545
- python
@@ -54,7 +54,7 @@ requirements:
5454
- libpng >=1.6.21,<1.7
5555
- pyqt # [not osx]
5656
- tk 8.5* # [linux and win]
57-
- functools32 # [py2k]
57+
- backports.functools_lru_cache # [py2k]
5858

5959
test:
6060
imports:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Use backports.functools_lru_cache instead of functools32
2+
````````````````````````````````````````````````````````
3+
4+
It's better maintained and more widely used (by pylint, jaraco, etc).

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
try:
6565
from functools import lru_cache
6666
except ImportError:
67-
from functools32 import lru_cache
67+
from backports.functools_lru_cache import lru_cache
6868

6969

7070
USE_FONTCONFIG = False

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
setupext.Numpy(),
7070
setupext.Six(),
7171
setupext.Dateutil(),
72-
setupext.FuncTools32(),
72+
setupext.BackportsFuncToolsLRUCache(),
7373
setupext.Subprocess32(),
7474
setupext.Pytz(),
7575
setupext.Cycler(),

setupext.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,25 +1523,25 @@ def get_install_requires(self):
15231523
return [dateutil]
15241524

15251525

1526-
class FuncTools32(SetupPackage):
1527-
name = "functools32"
1526+
class BackportsFuncToolsLRUCache(SetupPackage):
1527+
name = "backports.functools_lru_cache"
15281528

15291529
def check(self):
15301530
if not PY3min:
15311531
try:
1532-
import functools32
1532+
import backports.functools_lru_cache
15331533
except ImportError:
15341534
return (
1535-
"functools32 was not found. It is required for"
1535+
"backports.functools_lru_cache was not found. It is required for"
15361536
"Python versions prior to 3.2")
15371537

1538-
return "using functools32"
1538+
return "using backports.functools_lru_cache"
15391539
else:
15401540
return "Not required"
15411541

15421542
def get_install_requires(self):
15431543
if not PY3min:
1544-
return ['functools32']
1544+
return ['backports.functools_lru_cache']
15451545
else:
15461546
return []
15471547

0 commit comments

Comments
 (0)