aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/py26compat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-09-06 09:34:32 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-09-06 09:34:32 -0400
commit7c6fcc08e5960234e99ba2e764766b5a0358038c (patch)
treed992536a7ec67e070dab50df421726c4db63b9c3 /setuptools/py26compat.py
parentbb6bcc421feb339c8cb876edc1f3eb18159aa6a0 (diff)
parent705e6255fca83f5ff2b194e6529968017cefaaa3 (diff)
downloadexternal_python_setuptools-7c6fcc08e5960234e99ba2e764766b5a0358038c.tar.gz
external_python_setuptools-7c6fcc08e5960234e99ba2e764766b5a0358038c.tar.bz2
external_python_setuptools-7c6fcc08e5960234e99ba2e764766b5a0358038c.zip
Merge
Diffstat (limited to 'setuptools/py26compat.py')
-rw-r--r--setuptools/py26compat.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py
new file mode 100644
index 00000000..6fc00883
--- /dev/null
+++ b/setuptools/py26compat.py
@@ -0,0 +1,19 @@
+"""
+Compatibility Support for Python 2.6 and earlier
+"""
+
+import sys
+
+from setuptools.compat import splittag
+
+def strip_fragment(url):
+ """
+ In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
+ later was patched to disregard the fragment when making URL requests.
+ Do the same for Python 2.6 and earlier.
+ """
+ url, fragment = splittag(url)
+ return url
+
+if sys.version_info < (2,7):
+ strip_fragment = lambda x: x