use io.BytesIO instead of cStringIO in formparser
introduce werkzeug._compat starting with urlparse
xrange->range