1""" 2Compatibility Support for Python 2.7 and earlier 3""" 4 5import platform 6 7from setuptools.extern import six 8 9 10def get_all_headers(message, key): 11 """ 12 Given an HTTPMessage, return all headers matching a given key. 13 """ 14 return message.get_all(key) 15 16 17if six.PY2: 18 def get_all_headers(message, key): 19 return message.getheaders(key) 20 21 22linux_py2_ascii = ( 23 platform.system() == 'Linux' and 24 six.PY2 25) 26 27rmtree_safe = str if linux_py2_ascii else lambda x: x 28"""Workaround for http://bugs.python.org/issue24672""" 29