Update dependency astropy to <=7.2.0#101
Merged
renovate[bot] merged 1 commit intomainfrom Nov 26, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
<=7.1.1-><=7.2.0Release Notes
astropy/astropy (astropy)
v7.2.0Compare Source
==========================
New Features
astropy.constants
^^^^^^^^^^^^^^^^^
Added CODATA 2022 support in
astropy.constants.This update affects the following constants while the rest are unchanged from CODATA 2018:
m_p(Proton mass)m_n(Neutron mass)m_e(Electron mass)u(Atomic mass)eps0(Vacuum electric permittivity)Ryd(Rydberg constant)a0(Bohr radius)muB(Bohr magneton)alpha(Fine-structure constant)mu0(Vacuum magnetic permeability)sigma_T(Thomson scattering cross-section) [#18118]astropy.coordinates
^^^^^^^^^^^^^^^^^^^
Allow
np.concatenate,np.stackand similar numpy functions tobe applied on representations and differentials.
They can also be applied to coordinate frames and
SkyCoord, thoughwith the same limitation as for setting elements of frames and
coordinates: all frame attributes have to be scalars (or arrays with
only identical elements). [#18193]
The results of
match_coordinates_3d(),match_coordinates_sky(),search_around_3d()andsearch_around_sky()and the correspondingSkyCoordmethods now have named attributes. [#18459]astropy.cosmology
^^^^^^^^^^^^^^^^^
The trait
astropy.cosmology.traits.CurvatureComponenthas been added to work withobjects that have attributes and methods related to the global curvature. [#18232]
The trait
astropy.cosmology.traits.HubbleParameterhas been added to work with objects that have attributes and methods related to the Hubble parameter. [#18271]The trait
astropy.cosmology.traits.DarkEnergyComponenthas been added to work with objects that have attributes and methods related to the Dark Energy component. [#18447]Cosmology methods now exclusively return arrays, not floats or other scalars. [#18632]
The trait
astropy.cosmology.traits.DarkMatterComponenthas been added to work withobjects that have attributes and methods related to dark matter. [#18760]
The trait
astropy.cosmology.traits.MatterComponenthas been added to work withobjects that have attributes and methods related to matter density.
The trait
astropy.cosmology.traits.BaryonComponenthas been added to work withobjects that have attributes and methods related to baryonic matter.
The trait
astropy.cosmology.traits.CriticalDensityhas been added to work withobjects that have attributes and methods related to the critical density. [#18769]
The trait
astropy.cosmology.traits.PhotonComponenthas been added to work with objects that have attributes and methods related to photons. [#18787]The trait
astropy.cosmology.traits.TotalComponenthas been added to work with objects that have attributes and methods related to the total density component of the universe. [#18794]astropy.io.ascii
^^^^^^^^^^^^^^^^
astropy.io.fits
^^^^^^^^^^^^^^^
Enable color and suggestion-on-typos in all
argparseCLIs for Python 3.14(
fitscheck,fitsdiff,fitsheaderandfitsinfo). [#18151]Allow reading a FITS file hosted on a cloud resource like Amazon S3 via
Table.read(). This is done with a newfsspec_kwargsdict argumentthat gets passed through to
fsspecto access cloud resources. [#18379]It is now possible to check the existence of
ColumnsinColDefsby using the membership operator. [#18717]astropy.io.misc
^^^^^^^^^^^^^^^
Added a new ECSV table reading module that supports different backend engines for the
CSV data parsing. In addition to the default "io.ascii" engine, this includes engines
that use the PyArrow and Pandas CSV readers. These can be up to 16 times faster and are
more memory efficient than the native astropy ECSV reader. To get help with this
interface run
Table.read.help(format="ecsv"). [#18267]Improve support for compressed file formats in the ECSV and the pyarrow CSV
Table readers. All formats supported by
astropy.utils.data.get_readable_fileobj()(currently gzip, bzip2, lzma (xz) or lzw (Z)) will now work with these readers. [#18712]
astropy.io.registry
^^^^^^^^^^^^^^^^^^^
Tableto a FITS file, e.g.tbl.write("filename.fits", name="CAT", append=True). [#18470]astropy.io.votable
^^^^^^^^^^^^^^^^^^
Enable color and suggestion-on-typos in
volintCLI for Python 3.14 [#18151]Modified the constructor for
astropy.io.votable.tree.TableElementto use the version configuration information from the parentVOTableFileinstance. This allows for better handling of version-specific features and ensures that the table element is created with the correct context regarding the VOTable version. [#18366]astropy.modeling
^^^^^^^^^^^^^^^^
|(model composition) operator,using either
~astropy.modeling.compose_models_with_unitsor by setting theunit_change_compositionattribute on the model after composition. [#17304]astropy.nddata
^^^^^^^^^^^^^^
interpret_bit_flagsfunction now strips whitespace from flag names. [#18205]astropy.samp
^^^^^^^^^^^^
samp_hubCLI for Python 3.14 [#18151]astropy.table
^^^^^^^^^^^^^
Enable color and suggestion-on-typos in
showtableCLI for Python 3.14 [#18151]Added generic
from_dfandto_dfmethods toastropy.Tableusingnarwhals. These methods provide a unified interface for converting betweenAstropy Tables and various DataFrame formats (pandas, polars, pyarrow, etc.)
through the narwhals library. The
to_dfmethod converts an Astropy Tableto any supported DataFrame format, while
from_dfcreates an Astropy Tablefrom any narwhals-compatible DataFrame. Narwhals is a lightweight compatibility
layer that provides a unified API across different DataFrame libraries, allowing
seamless interoperability without requiring all DataFrame libraries as dependencies. [#18435]
Setting the
unitsordescriptionsofQTableandTablehas been made more flexible for tables with optional columns that may
or may not appear in the data. This applies to directly creating a table
as well as reading formatted data with the
read()method.In both cases you can supply
unitsanddescriptionarguments as adictthat specifies the units and descriptions for column names inthe table. Previously, if the input table did not contain a column that
was specified in the
unitsordescriptiondict, aValueErrorwas raised. Now, such columns are simply ignored. [#18641]
A new method has been added for accessing a table index for tables with multiple
indices. You can now select the index with the
with_index(index_id)method of the.loc,.iloc, and.loc_indicesproperties. For example, for a tabletwhich has two indices on columns
"a"and"b"respectively,t.loc.with_index("b")[2]will use index"b"to find all the table rows wheret["b"] == 2. Doing this query using the previous syntaxt.loc["b", 2]isdeprecated and this functionality is planned for removal in astropy 9.0.
In addition, support has been added for using
.loc,.iloc, and.loc_indiceswith an index based on two or more key columns. Previously this raised a
ValueError. [#18680]astropy.time
^^^^^^^^^^^^
Allow
np.concatenate,np.stackand similar numpy functions tobe applied on
TimeandTimeDeltainstances. [#18193]Add a new time format
galexfor the GALEX satellite.In GALEX data, due to uncertainty in the spacecraft clock, the absolute time is only accurate to
about 1-10 seconds while the relative time within an observation is better than 0.005 s or so,
except on days with leap seconds, where relative times can be wrong by up to 1 s.
See question 101.2 in https://www.galex.caltech.edu/researcher/faq.html [#18330]
astropy.units
^^^^^^^^^^^^^
emits a warning.
The new
deprecationsparameter of the unitto_string()methods allowsautomatically converting deprecated units (if possible), silencing the warnings
or raising them as errors instead. [#18586]
astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
Enable color and suggestion-on-typos in
fits2bitmapCLI for Python 3.14 [#18151]Added
show_decimal_unittoset_major_formatterto control whetheror not units are shown in decimal mode. [#18312]
Added the methods
set_visible()andset_position()to control the visibility and position of ticks, tick labels, and axis labels in a single call.Also added
get_ticks_visible(),get_ticklabel_visible(), andget_axislabel_visible()methods to get the visibility state of each coordinate element. [#18443]Added an image interval option (
SymmetricInterval) for specifying asymmetric extent about a midpoint, and the extent that contains both the image
minimum and maximum can be automatically determined. [#18602]
astropy.wcs
^^^^^^^^^^^
Enable color and suggestion-on-typos in all
wcslintCLI for Python 3.14 [#18151]Added a
perserve_unitskeyword argument toWCSto optionally requestthat units are not converted to SI (the default behavior is for celestial axes
to have units converted to degrees, and spectral axes to m or Hz). [#18338]
API Changes
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
The functionality of
astropy.coordinates.concatenateandastropy.coordinates.concatenate_representationsis now available usingnp.concatenate. Hence, these functions are being deprecated, emitting anAstropyPendingDeprecationWarningstarting with astropy 7.2. This will befollowed by a regular deprecation warning in astropy 8.0, and removal in 9.0. [#18193]
The
matrix_utilitiesmodule was not included in theastropyAPIdocumentation, but it was nonetheless explicitly referred to in some of the
other documentation.
This made it unclear if the functions in the module are public or private.
The public matrix utilities
is_rotation_or_reflection()androtation_matrix()have been made available from theastropy.coordinatesnamespace and should be imported from there.
Functions not available from the
astropy.coordinatenamespace are privateand may be changed or removed without warning.
However, three functions have been explicitly deprecated, despite being
private, as a courtesy to existing users.
matrix_utilites.angle_axis()andmatrix_utilites.is_rotation()aredeprecated without replacement.
matrix_utilities.is_O3()is deprecated and the publicis_rotation_or_reflection()function can be used as a replacement. [#18418]The undocumented
earth_orientationmodule has been removed. [#18638]astropyprefers reading data required forEarthLocation.of_site()froma local cache and tries downloading (and caching) the data from the Internet if
the cache is empty.
As a last resort
astropyhas so far read a small bundled data file thatprovided data for Greenwich as the single entry, but now
astropywill raisean error. [#18649]
astropy.io.registry
^^^^^^^^^^^^^^^^^^^
UnifiedInputRegistryandUnifiedOutputRegistry'sdelay_doc_updatesmethod's effect is disabled under Python's optimized mode (
-OOflag). [#17572]astropy.io.votable
^^^^^^^^^^^^^^^^^^
configproperty toastropy.io.votable.tree.VOTableFile.This property can be passed to the
configparameter of constructors that need to know the associated VOTable version, such asTimeSysandCooSys. [#18366]astropy.table
^^^^^^^^^^^^^
Add additional detail to the text of the
ValueErrorthat is raised whenpprintcannot parse a column format string. [#17631]Selecting a table index in the
.loc,.iloc, or.loc_indicesproperties bypassing the index identifier as the first element of the item is deprecated and is
planned for removal in astropy 9.0. For example, if a table
thas two indices oncolumns
"a"and"b"respectively, thent.loc["b", 2](to find table rowswhere
t["b"] == 2) is deprecated. This is replaced byt.loc.with_index("b")[2]. [#18680]astropy.tests
^^^^^^^^^^^^^
API changes towards a future deprecation of astropy test runner:
astropy.tests.runner.keywordis removed from public API.It is used internally as a decorator within astropy test runner and
its exposure as public API was a mistake. In the future, it will be
removed without any deprecation.
astropy.test,astropy.tests.runner.TestRunnerBase, andastropy.tests.runner.TestRunnerare now pending deprecation (
AstropyPendingDeprecationWarning).This will also affect downstream
packagename.testgenerated usingTestRunner.They may start to emit
AstropyDeprecationWarningin v8.0 (but no earlier). [#17874]astropy.utils
^^^^^^^^^^^^^
The
isiterable()utility is deprecated.numpy.iterable()can be used as a drop-in replacement. [#18053]astropy.utils.metadata.MergeStrategyno longer modifies themerge()methods of its subclasses at runtime to re-raise all exceptions as
MergeConflictError.This does not affect the functionality of
MergeStrategysubclasses withinthe
astropymetadata merging machinery. [#18518]astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
A warning is now emitted for each axis name which is
invalid in
set_ticklabel_position,set_axislabel_position,and
set_ticks_position. This is a deprecation warning,and in future invalid axis names will result in an error. [#18324]
A warning is now emitted if arguments are given to the getter method
get_axislabel_visibility_rule. This is a deprecation warning, and infuture, giving arguments to this method will result in an error. [#18792]
Bug Fixes
astropy.config
^^^^^^^^^^^^^^
get_config_dir()andget_cache_dir()now emit warnings in all caseswhere the
XDG_CACHE_HOME(XDG_CONFIG_HOME, respectively) environmentvariable doesn't meet internal assumptions and is ignored as a result. [#17934]
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
angleargument of therotation_matrix()function can now be anyangle-like value, like its docstring states.
Previously some angle-like values (e.g. angle-like strings) were erroneously
rejected. [#18504]
astropy.io.fits
^^^^^^^^^^^^^^^
Fix bug with heap which was not updated after a VLA column is modified. [#18487]
Make
fitscheckverify all HDUs before listing errors. [#18574]Fix calculation of DATASUM/CHECKSUM for heap data in
BinTableHDU. [#18681]Fixed a bug in
fitsdiffscript where failing to read a single file couldcrash the entire program. A warning is now printed instead, and such files
are simply ignored. [#18882]
astropy.io.misc
^^^^^^^^^^^^^^^
contains a value that is a numpy string. [#18677]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
Updated IVOA UCD1+ controlled vocabulary from version 1.5 to 1.6. This adds
support for new atmospheric observation terms including
obs.atmos.wind,obs.atmos.humidity,obs.atmos.rain,obs.atmos.turbulence,obs.atmos.turbulence.isoplanatic,obs.atmos.water, andphys.temperature.dewwhich are now recognized when parsing UCDs withcheck_controlled_vocabulary=True. [#18483]Fixed a bug in
add_data_origin_info()wherecontentis ignored for some INFO names. [#18771]astropy.modeling
^^^^^^^^^^^^^^^^
modeling.tabularmodels when thelookup_tableis a Quantity, where the result might lose its unit in some cases. [#18958]astropy.nddata
^^^^^^^^^^^^^^
Fixed unexpected upcasting to 64 bits when doing arithmetic with Python scalars
on
numpy2.Don't upcast
NDDataunnecessarily when doing arithmetic involving a singleunit (consistent with the behaviour when there are no units). Upcasting still
occurs if an operand's unit gets converted to match the other, or where
required by the other operand's dtype. [#18392]
astropy.samp
^^^^^^^^^^^^
SAMPHubServer._call_and_waitraises a newSAMPProxyTimeoutError(derived fromSAMPProxyError) exception on timeout.This allows client code to more easily distinguish timeouts from other kind of exceptions. [#18169]
astropy.stats
^^^^^^^^^^^^^
poisson_conf_intervalkraft-burrows-nousekno longer fails for large N. [#18676]astropy.table
^^^^^^^^^^^^^
Fix a bug when slicing a table that has a multi-column index. Previously, after slicing
the table then
tbl.indiceswould show duplicates of the multi-column index, one foreach column in the index. The underlying indices on the index columns were incorrectly
distinct objects instead of the expected reference to a single index object. [#18694]
Fix bugs when indexing a
QTablewith aQuantitycolumn. Previously, after addingthe index then indexed item access via with a
Quantityor slicing was failing. [#18725]Fix a bug where the ECSV writer was not correctly quoting column names if the first name
starts with the "#" character or any names contain leading/trailing whitespace. In this
situation, all column names are now surrounded by double quotes per the ECSV standard.
Likewise the ECSV reader was incorrectly stripping surrounding whitespace from column
names, leading to a consistency check failure when reading. [#18752]
Fixed a bug when writing
Tableto FITS files, if the table contained masked arrays of integers. [#18818]astropy.units
^^^^^^^^^^^^^
The string representations of the liter with the different
astropyunitformatters are now more consistent with each other.
This change only affects converting units to strings, it has no effect on
parsing strings to units. [#18500]
So far only the
"cds"unit format has been capable of parsing the string"as"as the attosecond, but now the other unit formats recognize thatstring too. [#18723]
The
"ogip"unit formatter can now parse strings that include signedfractions in the exponent, e.g.
u.Unit("m**(-1/2)", format="ogip"). [#18776]astropy.utils
^^^^^^^^^^^^^
If
numpy.msort()is called with aMaskedarray thenastropynolonger erroneously hides the deprecation warning (with
numpyversions1.24-1.26). [#18173]
For
numpy < 2.0, applyingnp.atleast_*dto iterables of most astropyclasses will now return a list of instances instead of a tuple, to match the
behaviour for arrays. For numpy >= 2.0, tuples continue to be returned. [#18193]
astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
ImageNormalizeinstance could be ignored when plotting. [#18590]
astropy.wcs
^^^^^^^^^^^
Other Changes and Additions
The minimum required NumPy version is now 1.24. [#18160]
The minimum required Matplotlib version is now 3.8.0. [#18164]
Bundled
expatis updated to version 2.7.3. [#18657]Updated the bundled CFITSIO library to 4.6.3. [#18689]
Wheels are now provided for Windows arm64. [#18786]
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.