-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[5.0RC1] utils.minversion("astropy", "5.0") doesn't work (and seems unneeded?) #12377
Comments
I am putting a v5.0 milestone here in case this will block actual release. Please remove it if that is not the case. Thanks! |
I don't understand why this is needed in the |
All this comes from https://docs.astropy.org/en/latest/cosmology/dev.html#astropy-cosmology-for-developers |
@pllim just to confirm, this is definitely a release blocker as it is causing issues with Debian packaging |
I'll push a fix that does try:
import astropy
from astropy.utils.introspection import minversion
except ImportError:
ASTROPY_GE_5 = False
else:
ASTROPY_GE_5 = minversion(astropy, "5.0") It used to do try:
from astropy.utils.introspection import minversion
except ImportError:
ASTROPY_GE_5 = False
else:
ASTROPY_GE_5 = minversion("astropy", "5.0") |
Thanks to @nstarman for the quick fix! |
Description
When building the Debian package, the tests are run on the built but not installed package. In this case, I get the following error:
Aside from the error itself, I am wondering why we need to check for the version here at all?
Expected behavior
Tests should pass; I would expect this even on a non-installed Astropy.
Actual behavior
See above
Steps to Reproduce
python3 setup.py build
python3.9 -m pytest
System Details
Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
Platform: Linux-5.14.0-2-amd64-x86_64-with-glibc2.32
Full Python Version:
3.9.7 (default, Sep 24 2021, 09:43:00)
[GCC 10.3.0]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Package versions:
Numpy: 1.19.5
Scipy: 1.7.1
Matplotlib: 3.3.4
h5py: not available
Pandas: not available
PyERFA: 2.0.0
Cython: 0.29.24
Scikit-image: not available
asdf: not available
pyarrow: not available
Using Astropy options: remote_data: none.
Matplotlib: 3.3.4
Freetype: 2.11.0
ARCH_ON_CI: undefined
IS_CRON: undefined
rootdir: /build/astropy-5.0~rc1, configfile: setup.cfg
plugins: astropy-header-0.1.2, hypothesis-5.43.3, arraydiff-0.3, mpl-0.11, filter-subpackage-0.1.1, cov-3.0.0, doctestplus-0.11.0, remotedata-0.3.2, mock-3.6.1, openfiles-0.5.0
The text was updated successfully, but these errors were encountered: