Fix the Travis CI build to work on 3.5

pull/977/head
Travis Ralston 6 years ago
parent c65c6e2e70
commit 7ada960206

@ -8,13 +8,10 @@ sudo: false
git:
depth: 1
before_install:
install:
- sudo apt-get update
- sudo apt-get install python3.5
# test-and-build does the installation, so tell travis to skip the
# installation step
install: true
- sudo apt-get install python3.5 python3.5-dev
- sudo pip install --upgrade virtualenv
script:
- ./scripts/test-and-build.sh

@ -8,3 +8,4 @@ jsonschema >= 2.6.0
PyYAML >= 3.12
requests >= 2.18.4
towncrier == 18.6.0rc1
six >= 1.11.0

@ -29,9 +29,10 @@ import os.path
import re
import subprocess
import sys
import urllib.request, urllib.parse, urllib.error
import yaml
import requests.utils
from functools import reduce
from six.moves.urllib.parse import urlencode
matrix_doc_dir=reduce(lambda acc,_: os.path.dirname(acc),
list(range(1, 5)), os.path.abspath(__file__))
@ -524,7 +525,7 @@ class MatrixUnits(Units):
if param_loc == "path":
path_template = path_template.replace(
"{%s}" % param_name, urllib.parse.quote(example)
"{%s}" % param_name, requests.utils.requote_uri(example)
)
elif param_loc == "query":
if type(example) == list:
@ -564,7 +565,7 @@ class MatrixUnits(Units):
)
endpoint["res_headers"] = headers
query_string = "" if len(
example_query_params) == 0 else "?" + urllib.parse.urlencode(
example_query_params) == 0 else "?" + urlencode(
example_query_params)
if example_body:
endpoint["example"][

Loading…
Cancel
Save