diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..a926796 Binary files /dev/null and b/.DS_Store differ diff --git a/gtfparse/.DS_Store b/gtfparse/.DS_Store new file mode 100644 index 0000000..cf1f7d8 Binary files /dev/null and b/gtfparse/.DS_Store differ diff --git a/gtfparse/read_gtf.py b/gtfparse/read_gtf.py index 662521b..6617d51 100644 --- a/gtfparse/read_gtf.py +++ b/gtfparse/read_gtf.py @@ -13,7 +13,8 @@ import logging from os.path import exists -import polars +import polars +from polars.exceptions import ShapeError # change import path from .attribute_parsing import expand_attribute_strings from .parsing_error import ParsingError @@ -101,13 +102,13 @@ def parse_with_polars_lazy( separator="\t", comment_prefix="#", null_values=".", - dtypes=DEFAULT_COLUMN_DTYPES) + schema_overrides=DEFAULT_COLUMN_DTYPES) # parameter renamed try: df = polars.read_csv( filepath_or_buffer, new_columns=REQUIRED_COLUMNS, **kwargs).lazy() - except polars.ShapeError: + except ShapeError: # raise ParsingError("Wrong number of columns") df = df.with_columns([ diff --git a/requirements.txt b/requirements.txt index c4fcfc5..4661985 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -polars>=0.20.2,<0.21.0 -pyarrow>=14.0.2,<14.1.0 +polars>=0.20.2,<=1.24.0 +pyarrow>=14.0.2,<19.0.1 pandas>=2.1.0,<3.0.0 diff --git a/tests/.DS_Store b/tests/.DS_Store new file mode 100644 index 0000000..b37c197 Binary files /dev/null and b/tests/.DS_Store differ