Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to import UndefinedVariableError from the new location #6701

Merged
merged 3 commits into from
Jun 22, 2022
Merged
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: 7 additions & 1 deletion xarray/tests/test_dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import pandas as pd
import pytest
from packaging.version import Version
from pandas.core.computation.ops import UndefinedVariableError

import xarray as xr
from xarray import (
Expand Down Expand Up @@ -52,6 +51,13 @@
source_ndarray,
)

try:
from pandas.errors import UndefinedVariableError
except ImportError:
# TODO: remove once we stop supporting pandas<1.4.3
from pandas.core.computation.ops import UndefinedVariableError


pytestmark = [
pytest.mark.filterwarnings("error:Mean of empty slice"),
pytest.mark.filterwarnings("error:All-NaN (slice|axis) encountered"),
Expand Down
8 changes: 7 additions & 1 deletion xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import numpy as np
import pandas as pd
import pytest
from pandas.core.computation.ops import UndefinedVariableError
from pandas.core.indexes.datetimes import DatetimeIndex

import xarray as xr
Expand Down Expand Up @@ -57,6 +56,13 @@
source_ndarray,
)

try:
from pandas.errors import UndefinedVariableError
except ImportError:
# TODO: remove once we stop supporting pandas<1.4.3
from pandas.core.computation.ops import UndefinedVariableError


try:
import dask.array as da
except ImportError:
Expand Down