From f439d6b114efc4475d2e336955bba24eff86af44 Mon Sep 17 00:00:00 2001 From: "tim.reichard" Date: Mon, 13 Feb 2023 14:01:28 -0600 Subject: [PATCH] Update csv sniffer to read 8192 bytes instea of 4096 --- .pre-commit-config.yaml | 2 +- HISTORY.rst | 5 +++++ aioradio/file_ingestion.py | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 148d094..eb2fe1c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/PyCQA/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/myint/docformatter diff --git a/HISTORY.rst b/HISTORY.rst index 4681c6c..abcabfa 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ======= +v0.17.32 (2023-02-03) + +* Update csv sniffer to read 8192 bytes instea of 4096. + + v0.17.31 (2023-02-03) * Remove results from callback when error in LongRunningJobs. diff --git a/aioradio/file_ingestion.py b/aioradio/file_ingestion.py index d0cc294..0fb1ac9 100644 --- a/aioradio/file_ingestion.py +++ b/aioradio/file_ingestion.py @@ -1744,7 +1744,7 @@ def tsv_to_records(path: str, encoding: str, delimiter: str, header: str) -> tup records = [] with open(path, newline='', encoding=encoding) as csvfile: - dialect = csv.Sniffer().sniff(csvfile.read(4096)) + dialect = csv.Sniffer().sniff(csvfile.read(8192)) csvfile.seek(0) # remove any null characters in the file diff --git a/setup.py b/setup.py index f3eaa2c..0df14a9 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ long_description = fileobj.read() setup(name='aioradio', - version='0.17.31', + version='0.17.32', description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more', long_description=long_description, long_description_content_type="text/markdown",