Skip to content
Myr

Merge pull request #2412 from sigmavirus24/remove-cruft

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Remove entirely unnecessary and unused bits from requests.compat

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 3314eb9, f37fe55 · Browse files · 1 file+0 added−52 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−52 removed

  • other:+0 added−52 removed

1 file+0 added−52 removed

modified:requests/compat.py-52 removed
19 unmodified lines
2021#: Python 3.x?22is_py3 = (_ver[0] == 3)2324#: Python 3.0.x25is_py30 = (is_py3 and _ver[1] == 0)2627#: Python 3.1.x28is_py31 = (is_py3 and _ver[1] == 1)2930#: Python 3.2.x31is_py32 = (is_py3 and _ver[1] == 2)3233#: Python 3.3.x34is_py33 = (is_py3 and _ver[1] == 3)3536#: Python 3.4.x37is_py34 = (is_py3 and _ver[1] == 4)3839#: Python 2.7.x40is_py27 = (is_py2 and _ver[1] == 7)4142#: Python 2.6.x43is_py26 = (is_py2 and _ver[1] == 6)4445#: Python 2.5.x46is_py25 = (is_py2 and _ver[1] == 5)4748#: Python 2.4.x49is_py24 = (is_py2 and _ver[1] == 4) # I'm assuming this is not by choice.505152# ---------53# Platforms54# ---------555657# Syntax sugar.58_ver = sys.version.lower()5960is_pypy = ('pypy' in _ver)61is_jython = ('jython' in _ver)62is_ironpython = ('iron' in _ver)6364# Assume CPython, if nothing else.65is_cpython = not any((is_pypy, is_jython, is_ironpython))6667# Windows-based system.68is_windows = 'win32' in str(sys.platform).lower()6970# Standard Linux 2+ system.71is_linux = ('linux' in str(sys.platform).lower())72is_osx = ('darwin' in str(sys.platform).lower())73is_hpux = ('hpux' in str(sys.platform).lower()) # Complete guess.74is_solaris = ('solar==' in str(sys.platform).lower()) # Complete guess.7524try:25 import simplejson as json26except (ImportError, SyntaxError):27 # simplejson does not support Python 3.2, it throws a SyntaxError
35 unmodified lines