Skip to content

xarray 0.12.0 Fails To Import On Python 3.5.2 #2830

@ancantus

Description

@ancantus

Error Code Example

Problem was discovered when xarray was pulled in via a pip dependency.

import xarray

Problem description

xarray seems to now use typing.ClassVar which is unavailable in python 3.5.2

Output of import xarray

Traceback (most recent call last): File "", line 1, in File "$VENV_PATH/lib/python3.5/site-packages/xarray/__init__.py", line 26, in from .coding.cftime_offsets import cftime_range File "$VENV_PATH/lib/python3.5/site-packages/xarray/coding/cftime_offsets.py", line 46, in from typing import ClassVar, Optional ImportError: cannot import name 'ClassVar'

Suggested Solution

  • Remove typing.ClassVar from xarray
  • Updated setup.py for 0.12.0 to reflect new python version requirement for the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions