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
On all supported Pythons, the io.BytesIO is always a stream
implementation using an in-memory bytes buffer. Makes code slightly more
forward compatible by reducing use of the six module.
* Rename BuildDirectory to TempDirectory
Because that's what it is.
* Use TempDirectory in more places (take 2)
* Fix indentation...
* 🎨
* Dumb mistake.
* Defer creation of temporary directory
* Misc
* Oops!
* Use better name
* Fix mistakes made in rebasing
* Remove unnecessary wrapping
* 📰
* Misc change to trigger a new CI build
* Make TempDirectory more robust
Update test accordingly
* 🎨 Remove unused import
* 🔧 Fix mistake made during merge
* Move kind to prefix
* Move delete initalization to __init__
* Remove unrelated message
* Improve existing test
* Oops.
* Add a test to verify that readonly files are also deleted
* 🎨
* Increase places where TempDirectory is used
* Remove unused import
* Improve tests, fix bug
* 🎨
* Update test for new behaviour
* Missed no_clean argument
* Make temp_dir private
* Delete the temporary directory based on no_clean
* Give TemporaryDirectory use a unique name
* 🎨
* 📝 Add basic documentation
Some systems have /tmp symlinked which confuses custom builds, such as
numpy. This ensures that real path is passed and that such builds
resolve their paths correctly during build and install.
Added test for the change and also for the previous related fix: #707
---
*This was migrated from pypa/pip#3079 to reparent it to the ``master``
branch. Please see original pull request for any previous discussion.*