diff --git a/.circleci/config.yml b/.circleci/config.yml index 0252828..726efbb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,6 +62,37 @@ jobs: source venv/bin/activate tox -e py27 + oldest: + docker: + - image: circleci/python:3.6 + + steps: + - checkout + + - restore_cache: + keys: + - oldest-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "test-requirements.txt" }} + + - run: + name: install dependencies + command: | + python3 -m venv venv + source venv/bin/activate + pip3 install tox + tox -e oldest-requirements --notest + + - save_cache: + paths: + - ./venv + - .tox/py36 + key: oldest-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "test-requirements.txt" }} + + - run: + name: run tests + command: | + source venv/bin/activate + tox -e py36 + pypi: docker: - image: circleci/python:3.6 @@ -92,10 +123,16 @@ workflows: tags: only: /^\d+\.\d+\.\d+$/ + - oldest: + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + - pypi: requires: - py27 - py36 + - oldest filters: branches: ignore: /.*/ diff --git a/.tox.oldest.txt b/.tox.oldest.txt new file mode 100644 index 0000000..4c2ec2a --- /dev/null +++ b/.tox.oldest.txt @@ -0,0 +1 @@ +requests==2.0.0 diff --git a/releasenotes/notes/Bump-minimum-requests-2.3-70fd287f6ea1a12e.yaml b/releasenotes/notes/Bump-minimum-requests-2.3-70fd287f6ea1a12e.yaml new file mode 100644 index 0000000..cf82da4 --- /dev/null +++ b/releasenotes/notes/Bump-minimum-requests-2.3-70fd287f6ea1a12e.yaml @@ -0,0 +1,10 @@ +--- +prelude: > + Increase the minimum required requests version to 2.3 +critical: + - | + The minimum version of requests has been increase to 2.3. This simply + ensures that all documented features of requests-mock are actually + available. This version of requests is still quite old and if this is an + issue you should either pin requests-mock to <1.6 or preferably update + requests. diff --git a/requirements.txt b/requirements.txt index 289b82a..c79b909 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -requests>=1.1 +requests>=2.3 six diff --git a/tox.ini b/tox.ini index 4f887a2..352bcac 100644 --- a/tox.ini +++ b/tox.ini @@ -30,10 +30,14 @@ deps = coverage {[testenv]deps} -[testenv:requests123] +[testenv:oldest-requirements] +install_command = pip install -U {opts} -c {toxinidir}/.tox.oldest.txt {packages} commands = - {envbindir}/pip install "requests==1.2.3" python setup.py testr --testr-args='{posargs}' +deps = + -r{toxinidir}/test-requirements.txt + -c{toxinidir}/.tox.oldest.txt + pbr [testenv:doctest] # note this only works under python 3 because of unicode literals