jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.58k stars 589 forks source link

doubled sample size passed to csv.Sniffer() in _csv.detect() #503

Closed julianebeli closed 2 years ago

julianebeli commented 2 years ago

Doubling the stream read sample in detect() from 1024 to 2048 to make csv.Sniffer().sniff() more reliable. Closes #502

hugovk commented 2 years ago

Thanks for the PR!

The failing tests are unrelated, we need to merge https://github.com/jazzband/tablib/pull/501 first.

@julianebeli Looks good, please could you edit the PR title to something a little more descriptive?

Normally we'd need tests for fixes, but we may be fine skipping them here (but of course check they still pass once #501 is merged). @claudep, what do you think?

claudep commented 2 years ago

Agreed, a test isn't absolutely required in this case.