Bug 2159621

Summary: Importing xarray.tests.test_dataset fails
Product: [Fedora] Fedora Reporter: david08741
Component: python-xarrayAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: epel-packagers-sig, jonathan, python-packagers-sig, quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-19 02:29:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2131120    
Bug Blocks: 2159504    

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.