Skip to content

import astropy;astropy.test() hangs under macOS #10667

Closed

Description

@Schamschula

I recently took over as MacPorts maintainer of py-astropy, and was reminded of an open ticket regrading astropy.test():

https://trac.macports.org/ticket/58332

I re-ran this test under Python 3.8, with the current pytest-astropy, and it's dependencies, and ran into the same issue as in comment:16 - using Python 3.7, nine months ago.

/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/compat.py:340: PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
See https://docs.pytest.org/en/stable/deprecations.html#terminalreporter-writer for more information.
return getattr(object, name, default)
==================================================================================================================================================== test session starts =====================================================================================================================================================
platform darwin -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1

Running tests with Astropy version 4.0.1.post1.
Running tests in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy.

Date: 2020-08-11T19:05:22

Platform: macOS-10.14.6-x86_64-i386-64bit

Executable: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8

Full Python Version:
3.8.5 (default, Jul 21 2020, 18:31:53)
[Clang 10.0.1 (clang-1001.0.46.4)]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions:
Numpy: 1.19.1
Scipy: 1.5.2
Matplotlib: 3.3.0
h5py: not available
Pandas: 1.1.0
Cython: 0.29.21
Scikit-image: 0.17.2
asdf: not available
astropy-helpers: 4.0.1

Using Astropy options: remote_data: none.

rootdir: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy
plugins: cov-2.10.0, arraydiff-0.3, astropy-header-0.1.2, mock-3.2.0, hypothesis-5.23.8, remotedata-0.3.2, openfiles-0.5.0, filter-subpackage-0.1.1, xonsh-0.9.19, doctestplus-0.8.0
collected 14025 items / 14 skipped / 14011 selected

../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/_erfa/tests/test_erfa.py ...................... [ 0%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/config/tests/test_configs.py ................ [ 0%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/constants/tests/test_constant.py ........ [ 0%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/constants/tests/test_pickle.py ......... [ 0%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/constants/tests/test_prior_version.py .......... [ 0%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/constants/tests/test_sciencestate.py .. [ 0%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_convolve.py ..................................................................................................................................................................... [ 1%]
...........................................................................................................................................................................................x.x.x.x.x.x.x.x............................................................................................................ [ 3%]
......... [ 3%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_convolve_fft.py ................................................................................................................................................................. [ 5%]
...................................................................................................................................................................................................................................................................................................................... [ 7%]
..................... [ 7%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_convolve_kernels.py ................................................................................................................ [ 8%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_convolve_models.py ............ [ 8%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_convolve_nddata.py ... [ 8%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_discretize.py ...s...........s................... [ 8%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_kernel_class.py ................................................................................................................................................................. [ 9%]
.................... [ 9%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/convolution/tests/test_pickle.py .xx.xx.xx [ 9%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_angles.py ............................................ [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_angular_separation.py .... [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_api_ape5.py ....s [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_arrays.py ............. [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_atc_replacements.py .... [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_celestial_transformations.py ............ss.. [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_distance.py ........... [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_earth.py ..............s... [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_finite_difference_velocities.py ......s..xx [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_formatting.py .......... [ 10%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_frames.py ............................s................ [ 11%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_frames_with_velocity.py ................................................ [ 11%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_funcs.py ..... [ 11%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_iau_fullstack.py sssssssssssssssssssssssssssssssssssssssssssssssssss. [ 11%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_intermediate_transformations.py .....sssssssssssssssssssssssssssssss..........ssssssssss.ss [ 12%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_matching.py ............. [ 12%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_matrix_utilities.py .. [ 12%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_name_resolve.py s.ss [ 12%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_pickle.py ....xx.x...xx.x...xx.x. [ 12%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_regression.py .ss.s.....s.sss.s...s....s.... [ 12%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_representation.py ................................................................................s.................. [ 13%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_representation_arithmetic.py ......................................................................................... [ 14%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_representation_methods.py ............ [ 14%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_shape_manipulation.py sssssssss [ 14%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_sites.py .ss.s... [ 14%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_sky_coord.py .................................................................................................................................................................... [ 15%]
.........................................................................................................s.............................................................................................................x...............s............ [ 17%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_sky_coord_velocities.py .........x...........x.x........... [ 17%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_skyoffset_transformations.py ...........s................. [ 17%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_solar_system.py s....ssssssssssssss....ssssssss [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_transformations.py ..........................s...... [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_unit_representation.py s [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/test_velocity_corrs.py ssssssss [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/accuracy/test_altaz_icrs.py ssss [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/accuracy/test_ecliptic.py ......... [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py . [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk5.py . [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/accuracy/test_galactic_fk4.py . [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/coordinates/tests/accuracy/test_icrs_fk5.py . [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/cosmology/tests/test_cosmology.py .......................................... [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/cosmology/tests/test_pickle.py ... [ 18%]
../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py .....

Activity

  1. pllim commented on Aug 14, 2020

    @pllim
    Member

    Thanks for reporting this. Did you try the dev version of astropy?

  2. Schamschula commented on Aug 15, 2020

    @Schamschula
    Author

    No. We try to stay on the release version. Generally, if there is demand, we have -devel ports, currently 5 out of 1638 python ports...

  3. pllim commented on Aug 17, 2020

    @pllim
    Member

    Do we have a MacPorts person, @astropy/coordinators ?

  4. saimn commented on Aug 17, 2020

    @saimn
    Contributor

    Could you run pytest with -v to see which test is stuck ?

  5. dhomeier commented on Aug 17, 2020

    @dhomeier
    Contributor

    Seems Github is sometimes swallowing my comments as well...

    From the progress bar it looks like this it failing in test_no_header, but could you run with astropy.test(package='io.ascii', args='-vk c_reader') to confirm?

  6. Schamschula commented on Aug 17, 2020

    @Schamschula
    Author

    Indeed:

    astropy.test(package='io.ascii', args='-vk c_reader')
    ==================================================================================================================================================== test session starts =====================================================================================================================================================
    platform darwin -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8
    cachedir: .pytest_cache

    Running tests with Astropy version 4.0.1.post1.
    Running tests in /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii.

    Date: 2020-08-17T18:57:15

    Platform: macOS-10.14.6-x86_64-i386-64bit

    Executable: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8

    Full Python Version:
    3.8.5 (default, Jul 21 2020, 18:31:53)
    [Clang 10.0.1 (clang-1001.0.46.4)]

    encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
    byteorder: little
    float info: dig: 15, mant_dig: 15

    Package versions:
    Numpy: 1.19.1
    Scipy: 1.5.2
    Matplotlib: 3.3.0
    h5py: 2.10.0
    Pandas: 1.1.0
    Cython: 0.29.21
    Scikit-image: 0.17.2
    asdf: not available
    astropy-helpers: 4.0.1

    Using Astropy options: remote_data: none.

    hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/Users/marius/Development/MacPorts/ports/.hypothesis/examples')
    rootdir: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii
    plugins: cov-2.10.0, arraydiff-0.3, astropy-header-0.1.2, mock-3.2.0, hypothesis-5.23.8, remotedata-0.3.2, openfiles-0.5.0, filter-subpackage-0.1.1, xonsh-0.9.19, doctestplus-0.8.0
    collecting ... collected 532 items / 393 deselected / 139 selected

    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py::test_simple_data[True] PASSED [ 0%]
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py::test_simple_data[False] PASSED [ 1%]
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py::test_read_types PASSED [ 2%]
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py::test_supplied_names[True] PASSED [ 2%]
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py::test_supplied_names[False] PASSED [ 3%]
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/astropy/io/ascii/tests/test_c_reader.py::test_no_header[True]

  7. dhomeier commented on Aug 18, 2020

    @dhomeier
    Contributor

    Have you noticed any other problems with your pytest installation when running in parallel mode? Wondering since that test is the first to force a ValueError, and parallel=True has been observed to run into problems on some systems.
    You should be able to mark the parallel runs as xfail by launching the tests session with TRAVIS=1 set in your environment, although I am not sure if pytest.xfail will help in case of a hanging test.

  8. saimn commented on Aug 18, 2020

    @saimn
    Contributor

    I think this issue should be transfered to the main astropy repo. There were some issues with the parallel on Python 3.8 and MacOS, because Python 3.8 changed the default multiprocessing method on MacOS: #8851 #8853
    And there is still a performance issue: #9864
    However on Python 3.7 (https://trac.macports.org/ticket/58332) you should not have this issue, so there may be something else.

  9. dhomeier commented on Aug 18, 2020

    @dhomeier
    Contributor

    Agreed, though the exception the test is trying to trigger is a really basic check at the Python level in FastBasic.__init__ and has not changed in a long time, so I still suspect some pytest-specific problems may be involved.

  10. eerovaher commented on Sep 6, 2024

    @eerovaher
    Member

    Could any macOS users check if this issue is still relevant?

  11. Schamschula commented on Sep 6, 2024

    @Schamschula
    Author

    I haven't tested this in a while.

    Currently, MacPorts is stuck @ astropy 6.0.1, as updating numpy to version 2.0.x is not an option due the lack backwards compatibility. See: https://trac.macports.org/ticket/70251

  12. neutrinoceros commented on Sep 6, 2024

    @neutrinoceros
    Contributor

    @Schamschula FWIW Astropy 6.1.3 is still compatible with numpy 1.x

  13. Schamschula commented on Sep 6, 2024

    @Schamschula
    Author

    Well, I just installed py311-astropy 6.0.1 and the necessary test packages.

    The test hangs for a bit @

    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/ascii/tests/test_c_reader.py .............................................x...............................x.......x.x.................

    but continues. I now get a clean exit code:

    Python 3.11.9 (main, Apr  3 2024, 23:19:16) [Clang 15.0.0 (clang-1500.1.0.2.5)]
    Type 'copyright', 'credits' or 'license' for more information
    IPython 8.21.0 -- An enhanced Interactive Python. Type '?' for help.
    
    In [1]: import astropy;astropy.test()
    =========================================================================================================================================================================== test session starts ============================================================================================================================================================================
    platform darwin -- Python 3.11.9, pytest-7.4.3, pluggy-1.5.0
    
    Running tests with Astropy version 6.0.1.
    Running tests in /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy.
    
    Date: 2024-09-06T13:12:33
    
    Platform: macOS-14.6.1-arm64-arm-64bit
    
    Executable: /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
    
    Full Python Version: 
    3.11.9 (main, Apr  3 2024, 23:19:16) [Clang 15.0.0 (clang-1500.1.0.2.5)]
    
    encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
    byteorder: little
    float info: dig: 15, mant_dig: 15
    
    Package versions: 
    Numpy: 1.26.4
    Scipy: 1.11.4
    Matplotlib: 3.8.4
    h5py: 3.11.0
    Pandas: 2.2.2
    PyERFA: 2.0.1.4
    Cython: 3.0.11
    Scikit-image: 0.22.0
    asdf-astropy: 0.6.1
    
    Using Astropy options: remote_data: none.
    
    rootdir: /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy
    plugins: remotedata-0.4.1, doctestplus-1.2.1, hypothesis-6.103.2, astropy-header-0.2.2, anyio-4.4.0, asdf-3.4.0
    collected 28153 items / 4 skipped                                                                                                                                                                                                                                                                                                                                          
    
    ...
    Skipping the detailed test output
    ...
    
    ============================================================================================================================================================================= warnings summary =============================================================================================================================================================================
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_pytest/config/__init__.py:1204
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_pytest/config/__init__.py:1204: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: asdf
        self._mark_plugins_for_rewrite(hook)
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/convolution/tests/test_discretize.py:121
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/convolution/tests/test_discretize.py:121: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/coordinates/tests/test_spectral_coordinate.py:1057
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/coordinates/tests/test_spectral_coordinate.py:1057: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/ascii/tests/test_c_reader.py:1164
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/ascii/tests/test_c_reader.py:1164: PytestUnknownMarkWarning: Unknown pytest.mark.hugemem - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.hugemem
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/ascii/tests/test_c_reader.py:1198
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/ascii/tests/test_c_reader.py:1198: PytestUnknownMarkWarning: Unknown pytest.mark.hugemem - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.hugemem
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_table.py:2821
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_table.py:2821: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_table.py:3208
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_table.py:3208: PytestUnknownMarkWarning: Unknown pytest.mark.hugemem - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.hugemem
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_table.py:3234
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_table.py:3234: PytestUnknownMarkWarning: Unknown pytest.mark.hugemem - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.hugemem
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/hdu/compressed/tests/test_compressed.py:227
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/hdu/compressed/tests/test_compressed.py:227: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_fitsdiff.py:231
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/fits/tests/test_fitsdiff.py:231: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/samp/tests/test_hub.py:28
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/samp/tests/test_hub.py:28: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/samp/tests/test_hub_script.py:22
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/samp/tests/test_hub_script.py:22: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/units/tests/test_quantity_ufuncs.py:138
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/units/tests/test_quantity_ufuncs.py:138: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/utils/tests/test_data.py:778
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/utils/tests/test_data.py:778: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/utils/tests/test_decorators.py:611
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/utils/tests/test_decorators.py:611: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/utils/tests/test_decorators.py:639
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/utils/tests/test_decorators.py:639: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.slow
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/tests/figures/helpers.py:29
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/tests/figures/helpers.py:29
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/tests/figures/helpers.py:29: PytestUnknownMarkWarning: Unknown pytest.mark.mpl_image_compare - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.mpl_image_compare(
    
    io/ascii/tests/test_c_reader.py: 68 warnings
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/io/ascii/fastbasic.py:131: AstropyWarning: parallel reading does not currently work, so falling back to serial reading (see https://github.com/astropy/astropy/issues/8858 for more details)
        self.engine = cparser.CParser(
    
    io/ascii/tests/test_cds_header_from_readme.py::test_description
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/units/core.py:2126: UnitsWarning: 'stat.' did not parse as cds unit: At col 0, Unit 'stat' not supported by the CDS SAC standard.  If this is meant to be a custom unit, define it with 'u.def_unit'. To have it recognized inside a file reader or other code, enable it with 'u.add_enabled_units'. For details, see https://docs.astropy.org/en/latest/units/combining_and_defining.html
        warnings.warn(msg, UnitsWarning)
    
    nddata/tests/test_ccddata.py::test_read_wcs_not_creatable
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/wcs/wcs.py:539: FITSFixedWarning: RADECSYS= 'FK5 ' / The equatorial coordinate system 
      the RADECSYS keyword is deprecated, use RADESYSa.
        wcsprm = _wcs.Wcsprm(
    
    nddata/tests/test_ccddata.py::test_read_wcs_not_creatable
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/wcs/wcs.py:807: FITSFixedWarning: 'unitfix' made the change 'Changed units:
        'degree' -> 'deg'.
        warnings.warn(
    
    nddata/tests/test_ccddata.py::test_read_wcs_not_creatable
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/wcs/wcs.py:807: FITSFixedWarning: 'celfix' made the change 'Unmatched celestial axes'.
        warnings.warn(
    
    time/tests/test_comparisons.py::test_isclose_time_exceptions
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/time/core.py:2952: TimeDeltaMissingUnitWarning: Numerical value without unit or explicit format passed to TimeDelta, assuming days
        warn(
    
    time/tests/test_precision.py::test_datetime_difference_agrees_with_timedelta[utc]
    time/tests/test_precision.py::test_datetime_timedelta_sum[utc]
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/erfa/core.py:133: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)"
        warn(f'ERFA function "{func_name}" yielded {wmsg}', ErfaWarning)
    
    time/tests/test_precision.py::test_datetime_difference_agrees_with_timedelta[utc]
    time/tests/test_precision.py::test_datetime_timedelta_sum[utc]
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/erfa/core.py:133: ErfaWarning: ERFA function "utctai" yielded 1 of "dubious year (Note 3)"
        warn(f'ERFA function "{func_name}" yielded {wmsg}', ErfaWarning)
    
    time/tests/test_precision.py::test_datetime_timedelta_sum[utc]
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/erfa/core.py:133: ErfaWarning: ERFA function "taiutc" yielded 1 of "dubious year (Note 4)"
        warn(f'ERFA function "{func_name}" yielded {wmsg}', ErfaWarning)
    
    units/tests/test_quantity_ufuncs.py::TestQuantityMathFuncs::test_power_scalar_strarray
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/units/utils.py:255: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
        float(p)
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_pytest/cacheprovider.py:451
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_pytest/cacheprovider.py:451: PytestCacheWarning: could not create cache path /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/.pytest_cache/v/cache/nodeids: [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/.pytest_cache'
        config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
    
    ../../../../../opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_pytest/stepwise.py:56
      /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/_pytest/stepwise.py:56: PytestCacheWarning: could not create cache path /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/.pytest_cache/v/cache/stepwise: [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/.pytest_cache'
        session.config.cache.set(STEPWISE_CACHE_DIR, [])
    
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ================================================================================================================================================= 27656 passed, 258 skipped, 243 xfailed, 99 warnings in 373.45s (0:06:13) =================================================================================================================================================
    Out[1]: <ExitCode.OK: 0>
    
    
  14. Schamschula commented on Sep 6, 2024

    @Schamschula
    Author

    @Schamschula FWIW Astropy 6.1.3 is still compatible with numpy 1.x

    This is what I get when trying to install astropy 6.1.3 with py311-numpy @1.26.4_0+gfortran installed, i.e. w/o numpy 2.0.1:

    ports % sudo port -v install py311-astropy
    --->  Computing dependencies for py311-astropy.
    --->  Fetching distfiles for py311-astropy
    --->  Verifying checksums for py311-astropy
    --->  Checksumming astropy-6.1.3.tar.gz
    --->  Extracting py311-astropy
    --->  Extracting astropy-6.1.3.tar.gz
    Executing:  cd "/opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_python_py-astropy/py311-astropy/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/py-astropy/6.1.3/astropy-6.1.3.tar.gz' | /usr/bin/tar -xf - 
    --->  Configuring py311-astropy
    --->  Building py311-astropy
    Executing:  cd "/opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_python_py-astropy/py311-astropy/work/astropy-6.1.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_python_py-astropy/py311-astropy/work 
    * Getting build dependencies for wheel...
    running egg_info
    writing astropy.egg-info/PKG-INFO
    writing dependency_links to astropy.egg-info/dependency_links.txt
    writing entry points to astropy.egg-info/entry_points.txt
    writing requirements to astropy.egg-info/requires.txt
    writing top-level names to astropy.egg-info/top_level.txt
    [09/06/24 14:18:09] ERROR    listing git files failed - pretending there aren't any                                                                                                                                                                                                                                                                                git.py:26
    reading manifest file 'astropy.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'astropy/_dev'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'build'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.o' found anywhere in distribution
    adding license file 'LICENSE.rst'
    adding license file 'licenses/AURA_LICENSE.rst'
    adding license file 'licenses/CONFIGOBJ_LICENSE.rst'
    adding license file 'licenses/DATATABLES_LICENSE.rst'
    adding license file 'licenses/ERFA.rst'
    adding license file 'licenses/EXPAT_LICENSE.rst'
    adding license file 'licenses/GATSPY_LICENSE.rst'
    adding license file 'licenses/JQUERY_LICENSE.rst'
    adding license file 'licenses/NUMPY_LICENSE.rst'
    adding license file 'licenses/PLY_LICENSE.rst'
    adding license file 'licenses/PYFITS.rst'
    adding license file 'licenses/PYTHON.rst'
    adding license file 'licenses/README.rst'
    adding license file 'licenses/WCSLIB_LICENSE.rst'
    writing manifest file 'astropy.egg-info/SOURCES.txt'
    
    ERROR Missing dependencies:
    	numpy>=2.0.0
    Command failed:  cd "/opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_python_py-astropy/py311-astropy/work/astropy-6.1.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_python_py-astropy/py311-astropy/work 
    Exit code: 1
    Error: Failed to build py311-astropy: command execution failed
    Error: See /opt/local/var/macports/logs/_Users_marius_Development_MacPorts_ports_python_py-astropy/py311-astropy/main.log for details.
    Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
    Error: Processing of port py311-astropy failed
    
  15. neutrinoceros commented on Sep 6, 2024

    @neutrinoceros
    Contributor

    I'm not familiar with this tool chain but it looks like what's blocking you is the build time metadata in pyproject.toml; it is not an actual requirement for downstream packagers. We only require numpy>=2.0.0 at build time for artifacts that are published on PyPI, but you should be able to compile against numpy 1.26 as long as the resulting binary isn't meant to be used with numpy 2 at runtime (which is the case here, if I understand correctly). You may need to patch pyproject.toml, but anything beyond that would be considered a bug.

  16. Schamschula commented on Sep 6, 2024

    @Schamschula
    Author

    Sure enough! After patching the one instance of "numpy>=2.0.0" to "numpy", I got a successful install of py311-astropy 6.1.3.
    I also get a clean test output.

    It's all too common that pyproject.toml misleads packagers.

  17. neutrinoceros commented on Sep 6, 2024

    @neutrinoceros
    Contributor

    Awesome ! I guess we can close this now then ?

  18. added
    Close?Tell stale bot that this issue/PR is stale
    on Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions