Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

29 lignes
536B

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