Skip to content

Commit

Permalink
Update minimum requests version to 2.3
Browse files Browse the repository at this point in the history
There are a number of features and tests that don't pass with requests
versions older than 2.3. This version was released in May 2014, so I
think we should be safe by now.

Closes: #89
  • Loading branch information
Jamie Lennox authored and jamielennox committed Apr 28, 2019
1 parent 7314358 commit 3a7c98f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: /.*/
Expand Down
1 change: 1 addition & 0 deletions .tox.oldest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests==2.0.0
10 changes: 10 additions & 0 deletions releasenotes/notes/Bump-minimum-requests-2.3-70fd287f6ea1a12e.yaml
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
requests>=1.1
requests>=2.3
six
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a7c98f

Please sign in to comment.