Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[s3] Fix newlines test for python 3.11 and above (#1400)
SpooledTemporaryFile introduced new changes in 3.11 (https://docs.python.org/3/library/tempfile.html) It now fully implements the io.BufferedIOBase and io.TextIOBase abstract base classes allowing the file to be readable in the mode that it was specified (without accessing the underlying ._file object). It seems like wrapping the underlying ._file is forbidden for versions 3.11 and higher (results in the ValueError) Having two have separate methods for different versions isn't the prettiest fix but should suffice.
- Loading branch information