8000 Use backports.functools_lru_cache instead of functools32 by felixonmars · Pull Request #7871 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Use backports.functools_lru_cache instead of functools32 #7871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Required Dependencies
Dependencies for python 2
^^^^^^^^^^^^^^^^^^^^^^^^^

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

`subprocess32 <https://pypi.python.org/pypi/subprocess32/>`_
Expand Down
2 changes: 1 addition & 1 deletion README.win.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ conda install pyqt
# this package is only available in the conda-forge channel
conda install -c conda-forge msinttypes
# for python 2.7
conda install -c conda-forge functools32
conda install -c conda-forge backports.functools_lru_cache

# copy the libs which have "wrong" names
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ install:
nose mock sphinx
- activate test-environment
- cmd: echo %PYTHON_VERSION% %TARGET_ARCH%
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q functools32
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
- if x%USE_PYTEST% == xyes conda install -q pytest "pytest-cov>=2.3.1" pytest-timeout #pytest-xdist

Expand Down
2 changes: 1 addition & 1 deletion build_alllocal.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:: # this package is only available in the conda-forge channel
:: conda install -c conda-forge msinttypes
:: if you build on py2.7:
:: conda install -c conda-forge functools32
:: conda install -c conda-forge backports.functools_lru_cache

set TARGET=bdist_wheel
IF [%1]==[] (
Expand Down
4 changes: 2 additions & 2 deletions ci/conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ requirements:
- zlib 1.2* # [win]
- pyqt # [not osx]
- tk 8.5* # [linux]
- functools32 # [py2k]
- backports.functools_lru_cache # [py2k]

run:
- python
Expand All @@ -54,7 +54,7 @@ requirements:
- libpng >=1.6.21,<1.7
- pyqt # [not osx]
- tk 8.5* # [linux and win]
- functools32 # [py2k]
- backports.functools_lru_cache # [py2k]

test:
imports:
Expand Down
4 changes: 4 additions & 0 deletions doc/api/api_changes/2017-01-19-BFLC.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Use backports.functools_lru_cache instead of functools32
````````````````````````````````````````````````````````

It's better maintained and more widely used (by pylint, jaraco, etc).
2 changes: 1 addition & 1 deletion lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
try:
from functools import lru_cache
except ImportError:
from functools32 import lru_cache
from backports.functools_lru_cache import lru_cache


USE_FONTCONFIG = False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
setupext.Numpy(),
setupext.Six(),
setupext.Dateutil(),
setupext.FuncTools32(),
setupext.BackportsFuncToolsLRUCache(),
setupext.Subprocess32(),
setupext.Pytz(),
setupext.Cycler(),
Expand Down
12 changes: 6 additions & 6 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,25 +1523,25 @@ def get_install_requires(self):
return [dateutil]


class FuncTools32(SetupPackage):
name = "functools32"
class BackportsFuncToolsLRUCache(SetupPackage):
name = "backports.functools_lru_cache"

def check(self):
if not PY3min:
try:
import functools32
import backports.functools_lru_cache
except ImportError:
return (
"functools32 was not found. It is required for"
"backports.functools_lru_cache was not found. It is required for"
"Python versions prior to 3.2")

return "using functools32"
return "using backports.functools_lru_cache"
else:
return "Not required"

def get_install_requires(self):
if not PY3min:
return ['functools32']
return ['backports.functools_lru_cache']
else:
return []

Expand Down
0