diff --git a/CHANGES.txt b/CHANGES.txt index 3b4624e..2f8749e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +v0.16.4 (2024-10-18) +-------------------- + +- Fixed a recently introduced bug that made Pandas required for the library to work. + v0.16.3 (2024-10-18) -------------------- diff --git a/dwca/read.py b/dwca/read.py index edba130..f4a152e 100644 --- a/dwca/read.py +++ b/dwca/read.py @@ -10,8 +10,6 @@ from typing import List, Optional, Dict, Any, IO, Tuple from xml.etree.ElementTree import Element -from pandas.io.parsers import TextFileReader - import dwca.vendor from dwca.descriptors import ArchiveDescriptor, DataFileDescriptor, shorten_term from dwca.exceptions import ( @@ -229,6 +227,7 @@ def pd_read(self, relative_path, **kwargs): raise ImportError("Pandas is missing.") from pandas import read_csv + from pandas.io.parsers import TextFileReader kwargs["delimiter"] = datafile_descriptor.fields_terminated_by kwargs["skiprows"] = datafile_descriptor.lines_to_ignore diff --git a/dwca/version.py b/dwca/version.py index 755df90..abd732c 100644 --- a/dwca/version.py +++ b/dwca/version.py @@ -1 +1 @@ -__version__ = "0.16.3" +__version__ = "0.16.4"