Opened 17 months ago
Closed 17 months ago
#67684 closed defect (fixed)
py38-astropy@5.3 fails to import
Reported by: | odysseus9672 (Sean Lake) | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | py-astropy |
Description
I have py38-astropy@5.3 installed and when I try to import the cosmology sub-package, it fails. Here's the code and output:
Seans-Work-Macbook-Pro:~ sean$ python3.8 Python 3.8.17 (default, Jun 10 2023, 11:16:23) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import astropy.cosmology as cosm Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/cosmology/__init__.py", line 11, in <module> from . import core, flrw, funcs, parameter, units, utils File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/cosmology/funcs/__init__.py", line 5, in <module> from .comparison import cosmology_equal File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/cosmology/funcs/comparison.py", line 29, in <module> _FormatsT = Union[_FormatType, tuple[_FormatType, ...]] TypeError: 'type' object is not subscriptable >>>
Judging by this commit to the affected file, astropy 5.3 drops support for python 3.8. Using pip to force install astropy version 5.2.2 in my user directory solves the problem. So py38-astropy should probably be pinned to version 5.2.2, unless this is an unintentional bug in astropy.
Change History (3)
comment:1 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to Schamschula |
---|---|
Port: | py-astropy added |
Status: | new → assigned |
comment:2 Changed 17 months ago by Schamschula (Marius Schamschula)
comment:3 Changed 17 months ago by Marius Schamschula <mschamschula@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I didn't catch that in the update notes. It was hidden in the full notes.
Will fix!