Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions fiona/_vendor/snuggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

from pyparsing import ( # type: ignore
Keyword,
oneOf,
one_of,
Literal,
QuotedString,
ParseException,
Expand Down Expand Up @@ -158,7 +158,7 @@ def resolve_var(source, loc, toks):
string = QuotedString("'") | QuotedString('"')
lparen = Literal("(").suppress()
rparen = Literal(")").suppress()
op = oneOf(" ".join(op_map.keys())).set_parse_action(
op = one_of(" ".join(op_map.keys())).set_parse_action(
lambda source, loc, toks: op_map[toks[0]]
)

Expand All @@ -177,7 +177,7 @@ def resolve_func(source, loc, toks):
# variables.
func = Regex(r"(?<=\()[{}]+".format(alphanums + "_")).set_parse_action(resolve_func)

higher_func = oneOf(" ".join(higher_func_map.keys())).set_parse_action(
higher_func = one_of(" ".join(higher_func_map.keys())).set_parse_action(
lambda source, loc, toks: higher_func_map[toks[0]]
)

Expand Down Expand Up @@ -262,7 +262,7 @@ def processList(lst):

def handleLine(line):
try:
result = expr.parseString(line)
result = expr.parse_string(line)
return processList(result[0])
except ParseException as exc:
text = str(exc)
Expand Down
2 changes: 1 addition & 1 deletion fiona/fio/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def filter_cmd(ctx, pipeline, use_rs, snuggs_only):

if not pipeline.startswith("("):
test_string = f"({pipeline})"
expr.parseString(test_string)
expr.parse_string(test_string)
except ExpressionError:
# It's a snuggs expression.
log.info("Detected a snuggs expression.")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies = [

[project.optional-dependencies]
all = ["fiona[calc,s3,test]"]
calc = ["pyparsing", "shapely"]
calc = ["pyparsing>=3.0", "shapely"]
s3 = ["boto3>=1.3.1"]
test = [
"aiohttp",
Expand Down
Loading