Bug 2159621 - Importing xarray.tests.test_dataset fails
Summary: Importing xarray.tests.test_dataset fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-xarray
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2131120
Blocks: 2159504
TreeView+ depends on / blocked
 
Reported: 2023-01-10 07:33 UTC by david08741
Modified: 2023-01-19 02:29 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-01-19 02:29:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description david08741 2023-01-10 07:33:27 UTC
Description of problem:
Running
from xarray.tests.test_dataset import create_test_data
fails with:
 missing pytest if only python3-xarray has been installed

Once python3-pytest is installed, the error is the following:

ImportError while importing test module '/builddir/build/BUILD/xbout-0.3.4/xbout/tests/test_plot.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
xbout/tests/test_plot.py:8: in <module>
    from xbout.tests.test_load import bout_xyt_example_files
xbout/tests/test_load.py:14: in <module>
    from xarray.tests.test_dataset import create_test_data
/usr/lib/python3.11/site-packages/xarray/tests/test_dataset.py:11: in <module>
    from pandas.core.computation.ops import UndefinedVariableError
E   ImportError: cannot import name 'UndefinedVariableError' from 'pandas.core.computation.ops' (/usr/lib64/python3.11/site-packages/pandas/core/computation/ops.py)
_________________ ERROR collecting xbout/tests/test_region.py __________________


Version-Release number of selected component (if applicable):
2022.03.0

How reproducible:
always

Steps to Reproduce:
1. python3 -c "import xarray.tests.test_dataset"

Alternatively try to build python-xbout 0.3.4 for rawhide:
https://koji.fedoraproject.org/koji/taskinfo?taskID=95936268

Actual results:
An ImportError is raised. Presumably that is due to a change in pandas.

Expected results:
Import works

Additional info:
This seems to be fixed in 2022.12

Comment 1 Elliott Sales de Andrade 2023-01-19 02:29:40 UTC
I pushed (and built) a skip for the issue in bug 2113663 so that Rawhide is up-to-date, and you will hopefully not be broken for the Mass Rebuild. I want to push to F37 as well, but will have to go through the breaking changes to be sure there is nothing that would be an issue there.


Note You need to log in before you can comment on or make changes to this bug.