Bug 296582 - astro/py-astropy: Not fully compatible with numpy-2.x: maybe update to astropy-8.0.1 would help?
Summary: astro/py-astropy: Not fully compatible with numpy-2.x: maybe update to astrop...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-07 20:13 UTC by Yuri Victorovich
Modified: 2026-07-07 20:15 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (wen)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2026-07-07 20:13:56 UTC
The Python statement below causes failure with a missing symbol in numpy:

$ python3.12
Python 3.12.13 (main, Jun 26 2026, 01:28:44) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080 on freebsd15
Type "help", "copyright", "credits" or "license" for more information.
>>> from astropy.units.quantity import Quantity
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.12/site-packages/astropy/units/__init__.py", line 13, in <module>
    from . import (
  File "/usr/local/lib/python3.12/site-packages/astropy/units/astrophys.py", line 12, in <module>
    from astropy.constants import si as _si
  File "/usr/local/lib/python3.12/site-packages/astropy/constants/__init__.py", line 27, in <module>
    from . import cgs, si
  File "/usr/local/lib/python3.12/site-packages/astropy/constants/cgs.py", line 7, in <module>
    from .config import codata, iaudata
  File "/usr/local/lib/python3.12/site-packages/astropy/constants/config.py", line 15, in <module>
    codata = importlib.import_module(".constants." + phys_version, "astropy")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/astropy/constants/codata2018.py", line 9, in <module>
    from .constant import Constant, EMConstant
  File "/usr/local/lib/python3.12/site-packages/astropy/constants/constant.py", line 11, in <module>
    from astropy.units.quantity import Quantity
  File "/usr/local/lib/python3.12/site-packages/astropy/units/quantity.py", line 27, in <module>
    from .quantity_helper import can_have_arbitrary_unit, check_output, converters_and_unit
  File "/usr/local/lib/python3.12/site-packages/astropy/units/quantity_helper/__init__.py", line 16, in <module>
    from . import erfa, function_helpers, helpers, scipy_special
  File "/usr/local/lib/python3.12/site-packages/astropy/units/quantity_helper/function_helpers.py", line 1246, in <module>
    @function_helper  # np.in1d deprecated in not NUMPY_LT_2_0.
     ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/astropy/units/quantity_helper/function_helpers.py", line 205, in __call__
    helps = getattr(module, f.__name__)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/numpy/__init__.py", line 792, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
AttributeError: module 'numpy' has no attribute 'in1d'. Did you mean: 'int16'?


py312-astropy-7.1.1_2,2
py312-numpy-2.4.6_1,1
FreeBSD 15.1