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

2023.06.0: pytest is failing #7939

Closed
3 of 4 tasks
kloczek opened this issue Jun 23, 2023 · 2 comments
Closed
3 of 4 tasks

2023.06.0: pytest is failing #7939

kloczek opened this issue Jun 23, 2023 · 2 comments
Labels
bug needs triage Issue that has not been reviewed by xarray team member

Comments

@kloczek
Copy link

kloczek commented Jun 23, 2023

What happened?

Looks like pytest is failing on scanning units.

What did you expect to happen?

pytest should not fail.

Minimal Complete Verifiable Example

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-xarray-2023.05.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-xarray-2023.05.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --pyargs xarray
ImportError while loading conftest '/home/tkloczko/rpmbuild/BUILD/xarray-2023.05.0/xarray/tests/conftest.py'.
xarray/__init__.py:1: in <module>
    from xarray import testing, tutorial
xarray/testing.py:10: in <module>
    from xarray.core import duck_array_ops, formatting, utils
xarray/core/duck_array_ops.py:36: in <module>
    from xarray.core import dask_array_ops, dtypes, nputils
xarray/core/dask_array_ops.py:3: in <module>
    from xarray.core import dtypes, nputils
xarray/core/dtypes.py:7: in <module>
    from xarray.core import utils
xarray/core/utils.py:443: in <module>
    class Frozen(Mapping[K, V]):
E   TypeError: 'ABCMeta' object is not subscriptable

Anything else we need to know?

No response

Environment

Here is list of installed modules in build env

Package                       Version
----------------------------- -------
alabaster                     0.7.13
asttokens                     2.2.1
attrs                         23.1.0
autocommand                   2.2.1
Babel                         2.12.1
backcall                      0.2.0
build                         0.10.0
cffi                          1.15.1
charset-normalizer            3.1.0
coverage                      7.2.7
cryptography                  40.0.2
decorator                     5.1.1
distro                        1.8.0
docutils                      0.19
exceptiongroup                1.1.1
executing                     1.2.0
filelock                      3.12.2
flake8                        5.0.4
gpg                           1.20.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.6.0
importlib-resources           5.12.0
iniconfig                     2.0.0
installer                     0.7.0
ipython                       8.12.0
jaraco.classes                3.2.3
jaraco.context                4.3.0
jaraco.packaging              9.2.0
jaraco.tidelift               1.5.1
jedi                          0.18.2
jeepney                       0.8.0
Jinja2                        3.1.2
jsonref                       1.1.0
jsonschema                    4.17.3
keyring                       23.13.1
libcomps                      0.1.19
MarkupSafe                    2.1.2
matplotlib-inline             0.1.6
mccabe                        0.7.0
more-itertools                9.1.0
msgpack                       1.0.5
mypy                          1.3.0
mypy-extensions               1.0.0
packaging                     23.1
parso                         0.8.3
pexpect                       4.8.0
pickleshare                   0.7.5
pkgutil_resolve_name          1.3.10
pluggy                        1.0.0
ply                           3.11
prompt-toolkit                3.0.38
ptyprocess                    0.7.0
pure-eval                     0.2.2
pycodestyle                   2.9.1
pycparser                     2.21
pyflakes                      2.5.0
Pygments                      2.15.1
pyproject_hooks               1.0.0
pyrsistent                    0.19.3
pytest                        7.3.1
pytest-cov                    4.0.0
pytest-flake8                 1.1.1
pytest-mypy                   0.10.3
python-dateutil               2.8.2
pytz                          2023.2
PyYAML                        6.0
requests                      2.31.0
requests-toolbelt             1.0.0
rst.linker                    2.4.0
SecretStorage                 3.3.3
setuptools                    67.7.2
setuptools-scm                7.1.0
simplejson                    3.19.1
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        6.2.1
sphinx-rtd-theme              1.2.1
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jquery          4.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data                    0.6.2
swagger-spec-validator        3.0.3
tomli                         2.0.1
traitlets                     5.9.0
typing_extensions             4.5.0
urllib3                       1.26.15
wcwidth                       0.2.6
wheel                         0.40.0
zipp                          3.15.0
@kloczek kloczek added bug needs triage Issue that has not been reviewed by xarray team member labels Jun 23, 2023
@TomNicholas
Copy link
Member

Hi, this line suggests to me that you might be running with python 3.8?

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-xarray-2023.05.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-xarray-2023.05.0-2.fc35.x86_64/usr/lib/python3.8/site-packages

We haven't supported 3.8 since January. The error message you're seeing isn't really anything to do with xarray code, it's coming straight from a standard use of the collections.abc module. Maybe that's because of a different python version?

@kloczek
Copy link
Author

kloczek commented Jun 23, 2023

OK it it is only matter python 3.8 feel free to close this ticket because I'm going go move to 3.9 very soon,.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue that has not been reviewed by xarray team member
Projects
None yet
Development

No branches or pull requests

2 participants