diff options
| author | Philip Thiem <ptthiem@gmail.com> | 2013-09-28 12:33:19 -0500 |
|---|---|---|
| committer | Philip Thiem <ptthiem@gmail.com> | 2013-09-28 12:33:19 -0500 |
| commit | 78f01306a08285e9f2abe6ad749f6ce884e12555 (patch) | |
| tree | c4769869539d5ae9101a7e8e76a46e9e292b9b97 /setuptools/py26compat.py | |
| parent | 30bb58f069cf1624f35cfbdb725e8e443ff64330 (diff) | |
| parent | 49ce80613b7fcffd1882f7fb082e5bcc30e976f0 (diff) | |
| download | python-setuptools-git-78f01306a08285e9f2abe6ad749f6ce884e12555.tar.gz | |
Merge with default
--HG--
extra : rebase_source : d9c70d5bebd4290f568c828c5bc3a9b93a817ff2
Diffstat (limited to 'setuptools/py26compat.py')
| -rw-r--r-- | setuptools/py26compat.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py new file mode 100644 index 00000000..738b0cc4 --- /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 |
