diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a48923f..41534b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1d96d3..401021f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,7 @@ Before submitting a bug, please do the following: Make sure your report gets the attention it deserves: bug reports with missing information may be ignored or punted back to you, delaying a fix. The below constitutes a bare minimum; more info is almost always better: -* __What version of Python are you using?__ For example, are you using Python 2.7, Python 3.7, PyPy 2.0? +* __What version of Python are you using?__ For example, are you using Python 3.8+, PyPy 2.0? * __What operating system are you using?__ Windows (7, 8, 10, 32-bit, 64-bit), Mac OS X, (10.7.4, 10.9.0), GNU/Linux (which distribution, which version?) Again, more detail is better. * __Which version or versions of the software are you using?__ Ideally, you've followed the advice above and are on the latest version, but please confirm this. * __How can the we recreate your problem?__ Imagine that we have never used pygeofilter before and have downloaded it for the first time. Exactly what steps do we need to take to reproduce your problem? diff --git a/pygeofilter/parsers/cql2_text/parser.py b/pygeofilter/parsers/cql2_text/parser.py index b61a6e5..ff1cd34 100644 --- a/pygeofilter/parsers/cql2_text/parser.py +++ b/pygeofilter/parsers/cql2_text/parser.py @@ -38,7 +38,7 @@ logger.setLevel(logging.DEBUG) -@v_args(inline=True) +@v_args(meta=False, inline=True) class CQLTransformer(WKTTransformer, ISO8601Transformer): def and_(self, *args): return ast.And.from_items(*args) @@ -202,6 +202,7 @@ def interval(self, start, end): rel_to=__file__, parser="lalr", debug=True, + maybe_placeholders=False, transformer=CQLTransformer(), import_paths=[os.path.dirname(os.path.dirname(__file__))], ) diff --git a/pygeofilter/parsers/ecql/parser.py b/pygeofilter/parsers/ecql/parser.py index 2a1c4f7..48a2b63 100644 --- a/pygeofilter/parsers/ecql/parser.py +++ b/pygeofilter/parsers/ecql/parser.py @@ -48,7 +48,7 @@ } -@v_args(inline=True) +@v_args(meta=False, inline=True) class ECQLTransformer(WKTTransformer, ISO8601Transformer): def and_(self, lhs, rhs): return ast.And(lhs, rhs) @@ -201,6 +201,7 @@ def envelope(self, x1, x2, y1, y2): rel_to=__file__, parser="lalr", debug=True, + maybe_placeholders=False, transformer=ECQLTransformer(), import_paths=[os.path.dirname(os.path.dirname(__file__))], ) diff --git a/pygeofilter/parsers/iso8601.py b/pygeofilter/parsers/iso8601.py index 30ab90a..0de92d3 100644 --- a/pygeofilter/parsers/iso8601.py +++ b/pygeofilter/parsers/iso8601.py @@ -30,7 +30,7 @@ from ..util import parse_datetime, parse_duration -@v_args(inline=True) +@v_args(meta=False, inline=True) class ISO8601Transformer(Transformer): def DATETIME(self, dt): return parse_datetime(dt) diff --git a/pygeofilter/parsers/wkt.py b/pygeofilter/parsers/wkt.py index 8416a78..bf9c530 100644 --- a/pygeofilter/parsers/wkt.py +++ b/pygeofilter/parsers/wkt.py @@ -28,7 +28,7 @@ from lark import Transformer, v_args -@v_args(inline=True) +@v_args(meta=False, inline=True) class WKTTransformer(Transformer): def wkt__geometry_with_srid(self, srid, geometry): print(srid, geometry) diff --git a/setup.py b/setup.py index ef4c772..a11620d 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ install_requires=( [ "dateparser", - "lark<1.0", + "lark", "pygeoif>=1.0.0", "dataclasses;python_version<'3.7'", ] @@ -76,10 +76,11 @@ "Intended Audience :: Developers", "Topic :: Scientific/Engineering :: GIS", "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], tests_require=["pytest"], )