xarray-contrib / xwrf

A lightweight interface for working with the Weather Research and Forecasting (WRF) model output in Xarray.
https://xwrf.readthedocs.io/
Apache License 2.0
56 stars 16 forks source link

SyntaxError encountered upon import #114

Closed isaacWpark closed 1 year ago

isaacWpark commented 1 year ago

What happened?

after installing the most recent version of xwrf using pip, it failed to import.

Minimal Complete Verifiable Example

import xwrf

Relevant log output

Traceback (most recent call last):

  File "C:\Users\isaac\anaconda3\envs\pydaymet\lib\site-packages\IPython\core\interactiveshell.py", line 3457, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "C:\Users\isaac\AppData\Local\Temp/ipykernel_31480/3638888779.py", line 1, in <module>
    import xwrf

  File "C:\Users\isaac\anaconda3\envs\pydaymet\lib\site-packages\xwrf\__init__.py", line 8, in <module>
    from .accessors import WRFDataArrayAccessor, WRFDatasetAccessor

  File "C:\Users\isaac\anaconda3\envs\pydaymet\lib\site-packages\xwrf\accessors.py", line 177
    if this_staggered_dims := set(var_data.dims).intersection(staggered_dims):
                            ^
SyntaxError: invalid syntax

Environment

unable to import

Anything else we need to know?

No response

jthielen commented 1 year ago

Is there a chance that you are using a version of Python older than 3.8? The := operator was added in Python 3.8, which is the minimum version supported by xwrf (and much of the present Scientific Python stack).

lpilz commented 1 year ago

Closing this issue due to inactivity and the probable cause being a wontfix.