Normalize percent-encoded bytes before comparison
diff --git a/.travis.yml b/.travis.yml
index efb75ddec2..436f545fa5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,5 +38,5 @@ jobs:
       dist: xenial
       sudo: true     
     - stage: coverage
-      python: 3.6
+      python: '3.6'
       script: codecov
diff --git a/Makefile b/Makefile
index 317a7c76fb..231ce35775 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 .PHONY: docs
 init:
 	pip install pipenv --upgrade
-	pipenv install --dev --skip-lock
+	pipenv install --dev
 test:
 	# This runs all of the tests, on both Python 2 and Python 3.
 	detox
diff --git a/Pipfile b/Pipfile
index 3e0fd729eb..b6705a6c68 100644
--- a/Pipfile
+++ b/Pipfile
@@ -4,7 +4,7 @@ verify_ssl = true
 name = "pypi"
 
 [dev-packages]
-pytest = ">=2.8.0"
+pytest = ">=2.8.0,<4.1"
 codecov = "*"
 pytest-httpbin = ">=0.0.7"
 pytest-mock = "*"
diff --git a/tests/test_requests.py b/tests/test_requests.py
index 4bc1924f03..89eff885a0 100644
--- a/tests/test_requests.py
+++ b/tests/test_requests.py
@@ -9,6 +9,7 @@
 import collections
 import contextlib
 import warnings
+import re
 
 import io
 import requests
@@ -2418,9 +2419,17 @@ class TestPreparingURLs(object):
         )
     )
     def test_preparing_url(self, url, expected):
+
+        def normalize_percent_encode(x):
+            # Helper function that normalizes equivalent 
+            # percent-encoded bytes before comparisons
+            for c in re.findall(r'%[a-fA-F0-9]{2}', x):
+                x = x.replace(c, c.upper())
+            return x
+        
         r = requests.Request('GET', url=url)
         p = r.prepare()
-        assert p.url == expected
+        assert normalize_percent_encode(p.url) == expected
 
     @pytest.mark.parametrize(
         'url',

urllib3 replaced it's URL parser with `rfc3986` for more compliant parsing (urllib3/urllib3#1487). We've also got an effort underway to run downstream tests before releases (urllib3/urllib3#1508) and during that process we've discovered that requests requires percent-encoded bytes to keep their casing.

Adding this to the unit tests would allow either version of pre- and post-rfc3986 urllib3 to pass requests unit tests. I don't know if the `Request.url` attribute needs to maintain it's casing in this situation or not, if it does this is not the solution. Just putting this together as a potential solution.