DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

to avoid 0 padding in Py3.5+ do not truncate #488

Open jwhitehorn opened 4 years ago

jwhitehorn commented 4 years ago

I noticed this when testing out Cubes - specifically the the Slicer server.

I was running in Python 3.8.1 and noticed that CSVs had many null bytes - lots of them. This was causing all types of problems when loading and parsing these CSV. Upon tracking down the issue I noticed this was the result of calling `truncate on a StringIO stream.

Specifically the docs state:

"Changed in version 3.5: Windows will now zero-fill files when extending."