From d1b298a1bfcf3adbd2b95f46895e0e38a4650592 Mon Sep 17 00:00:00 2001 From: Mikhail Andrenkov Date: Fri, 29 Oct 2021 17:31:56 -0400 Subject: [PATCH] Remove dependency on repoze.lru --- .github/CHANGELOG.md | 3 +++ docs/requirements.txt | 1 - requirements.txt | 1 - setup.py | 1 - thewalrus/_low_rank_haf.py | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 8fcd625ee..c1ee92a04 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -3,6 +3,7 @@ ### New features ### Improvements +* Python installation no longer requires [`repoze.lru`](https://pypi.org/project/repoze.lru/). [#293](https://github.com/XanaduAI/thewalrus/pull/293) ### Bug fixes @@ -12,6 +13,8 @@ This release contains contributions from (in alphabetical order): +Mikhail Andrenkov + --- # Version 0.16.2 diff --git a/docs/requirements.txt b/docs/requirements.txt index b9a37ea17..a1cf0d9b5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,7 +7,6 @@ cython>=0.20 numba>=0.49.1 numpy>=1.9 sympy>=1.5.1 -repoze.lru>=0.7 scipy>=1.2.1 breathe==4.29.0 Jinja2==2.11.3 diff --git a/requirements.txt b/requirements.txt index 4265bc7a4..b2e1aaab9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,5 @@ numba>=0.48.0 pytest>=5.4.1 flaky>=3.7.0 sympy>=1.5.1 -repoze.lru>=0.7 cython dask[delayed] diff --git a/setup.py b/setup.py index f4598e25a..dccb9eaf7 100644 --- a/setup.py +++ b/setup.py @@ -110,7 +110,6 @@ def get_version(): "numba>=0.49.1,<0.54", "scipy>=1.2.1", "sympy>=1.5.1", - "repoze.lru>=0.7", ], "setup_requires": ["cython", "numpy"], "ext_modules": build_extensions(), diff --git a/thewalrus/_low_rank_haf.py b/thewalrus/_low_rank_haf.py index 1d213fcf0..3c9242078 100644 --- a/thewalrus/_low_rank_haf.py +++ b/thewalrus/_low_rank_haf.py @@ -15,11 +15,11 @@ Algorithms for hafnians of low-rank matrices. """ +from functools import lru_cache from itertools import product import numpy as np from sympy import symbols, expand from scipy.special import factorial2 -from repoze.lru import lru_cache @lru_cache(maxsize=1000000)