diff --git a/.travis.yml b/.travis.yml index e31bd15..b979086 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: python # ===== Linux ====== dist: xenial python: - - 2.7 - 3.5 - 3.6 - 3.7 @@ -19,17 +18,6 @@ matrix: # - os: windows include: # ======= OSX ======== - - name: "Python 2.7.14 on macOS 10.13" - os: osx - osx_image: xcode9.3 # Python 2.7.14_2 running on macOS 10.13 - language: shell # 'language: python' errors on Travis CI macOS - before_install: - - python --version - - pip install pytest --user - - pip install codecov --user - install: pip install ".[test]" --user - script: python -m pytest # pytest command won't be found - after_success: python -m codecov # codecov command won't be found - name: "Python 3.6.5 on macOS 10.13" os: osx osx_image: xcode9.4 # Python 3.6.5 running on macOS 10.13 @@ -57,16 +45,6 @@ matrix: script: python3 -m pytest after_success: python3 -m codecov # ====== WINDOWS ========= - - name: "Python 2.7.16 on Windows" - os: windows # Windows 10.0.17134 N/A Build 17134 - language: shell # 'language: python' errors Travis CI Windows - before_install: - - choco install python2 - - python --version - - python -m pip install --upgrade pip - - pip install --upgrade pytest - - pip install codecov - env: PATH=/c/Python27:/c/Python27/Scripts:$PATH - name: "Python 3.5.4 on Windows" os: windows # Windows 10.0.17134 N/A Build 17134 language: shell # 'language: python' is an error on Travis CI Windows diff --git a/README.rst b/README.rst index 41bf6c8..876d31f 100644 --- a/README.rst +++ b/README.rst @@ -34,11 +34,17 @@ Install ``cachier`` with: pip install cachier +For the latest version supporting Python 2.7 please use: + +.. code-block:: python + + pip install 'cachier==1.2.8' + Features ======== * Pure Python. -* Compatible with Python 2.7+ and Python 3.5+. +* Compatible with Python 3.5+ (and Python 2.7 up until version 1.2.8). * Supported and `tested on Linux, OS X and Windows `_. * A simple interface. * Defining "shelf life" for cached values. diff --git a/cachier/pickle_core.py b/cachier/pickle_core.py index 062cb96..e6bdea0 100644 --- a/cachier/pickle_core.py +++ b/cachier/pickle_core.py @@ -20,11 +20,6 @@ from watchdog.events import PatternMatchingEventHandler from .base_core import _BaseCore -try: - FileNotFoundError -except NameError: # we're on python 2 - FileNotFoundError = IOError # skipcq: PYL-W0622 - DEF_CACHIER_DIR = '~/.cachier/' diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..09575d5 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,13 @@ +[pytest] +testpaths = + tests + cachier +norecursedirs=dist build .tox +addopts = + # --doctest-modules + --cov=cachier + --cov-report term + --cov-report xml:cov.xml + -r a + -v + -s diff --git a/setup.py b/setup.py index 9d4364b..c438286 100644 --- a/setup.py +++ b/setup.py @@ -40,10 +40,10 @@ setup( ''', install_requires=[ 'watchdog', 'portalocker', + 'pathtools', # for watchdog, who has dependency spec problem ], extras_require={ 'test': TEST_REQUIRES, - ':python_version == "2.7"': ['futures'], }, platforms=['linux', 'osx', 'windows'], keywords=['cache', 'persistence', 'mongo', 'memoization', 'decorator'], @@ -53,8 +53,6 @@ setup( 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 8eebf12..0000000 --- a/tox.ini +++ /dev/null @@ -1,36 +0,0 @@ -[tox] -envlist = - py27 - py35 - py36 -# recreate = True - -[testenv] -deps = - ; equivalent to pip -e .[test] - -e{toxinidir}[test] - ;-r{toxinidir}/tools/pip-requires - ;-r{toxinidir}/tools/test-require -commands=py.test # or 'nosetests' or ... -usedevelop = true - -# [testenv:doctesting] -# basepython = python -# usedevelop=True -# skipsdist=True -# commands= -# pytest --doctest-modules --pyargs _pytest - -[pytest] -testpaths = - tests - cachier -norecursedirs=dist build .tox -addopts = - # --doctest-modules - --cov=cachier - --cov-report term - --cov-report xml:cov.xml - -r a - -v - -s