Drop repoze.lru on Python 3
Starting with Python 3.2, the functools module grew a lru_cache function
which can replace our usage of repoze.lru.
| | |
| | | except ImportError: # pragma: no cover |
| | | import pickle |
| | | |
| | | try: |
| | | from functools import lru_cache |
| | | |
| | | except ImportError: |
| | | from repoze.lru import lru_cache |
| | | |
| | | # PY3 is left as bw-compat but PY2 should be used for most checks. |
| | | PY2 = sys.version_info[0] == 2 |
| | | PY3 = sys.version_info[0] == 3 |
| | |
| | | resource_isdir, |
| | | ) |
| | | |
| | | from repoze.lru import lru_cache |
| | | |
| | | from pyramid.asset import ( |
| | | abspath_from_asset_spec, |
| | | resolve_asset_spec, |
| | | ) |
| | | |
| | | from pyramid.compat import text_ |
| | | from pyramid.compat import ( |
| | | lru_cache, |
| | | text_, |
| | | ) |
| | | |
| | | from pyramid.httpexceptions import ( |
| | | HTTPNotFound, |
| | |
| | | from zope.interface import implementer |
| | | from zope.interface.interfaces import IInterface |
| | | |
| | | from repoze.lru import lru_cache |
| | | |
| | | from pyramid.interfaces import ( |
| | | IResourceURL, |
| | | IRequestFactory, |
| | |
| | | is_nonstr_iter, |
| | | decode_path_info, |
| | | unquote_bytes_to_wsgi, |
| | | lru_cache, |
| | | ) |
| | | |
| | | from pyramid.encode import url_quote |
| | |
| | | |
| | | import os |
| | | |
| | | from repoze.lru import lru_cache |
| | | |
| | | from pyramid.interfaces import ( |
| | | IResourceURL, |
| | | IRoutesMapper, |
| | |
| | | |
| | | from pyramid.compat import ( |
| | | bytes_, |
| | | lru_cache, |
| | | string_types, |
| | | ) |
| | | from pyramid.encode import ( |
| | |
| | | # |
| | | ############################################################################## |
| | | |
| | | import sys |
| | | |
| | | from setuptools import setup, find_packages |
| | | |
| | | def readfile(name): |
| | |
| | | install_requires = [ |
| | | 'setuptools', |
| | | 'WebOb >= 1.7.0rc2', # Response.has_body |
| | | 'repoze.lru >= 0.4', # py3 compat |
| | | 'zope.interface >= 3.8.0', # has zope.interface.registry |
| | | 'zope.deprecation >= 3.5.0', # py3 compat |
| | | 'venusian >= 1.0a3', # ``ignore`` |
| | |
| | | python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', |
| | | install_requires=install_requires, |
| | | extras_require={ |
| | | ':python_version<"3.2"': ['repoze.lru >= 0.4'], |
| | | 'testing': testing_extras, |
| | | 'docs': docs_extras, |
| | | }, |