1. 02 3月, 2019 1 次提交
    • M
      Fix utils.encoding.auto_decode() LookupError with invalid encodings · d48475d0
      Miro Hrončok 提交于
      utils.encoding.auto_decode() was broken when decoding Big Endian BOM
      byte-strings on Little Endian or vice versa.
      
      The TestEncoding.test_auto_decode_utf_16_le test was failing on Big Endian
      systems, such as Fedora's s390x builders. A similar test, but with BE BOM
      test_auto_decode_utf_16_be was added in order to reproduce this on a Little
      Endian system (which is much easier to come by).
      
      A regression test was added to check that all listed encodings in
      utils.encoding.BOMS are valid.
      
      Fixes https://github.com/pypa/pip/issues/6054
      d48475d0