fix(deps): update dependency astropy to v6 (v0.8.x) #128
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:
^5.0
->^5.0 || ^6.0.0
Release Notes
astropy/astropy (astropy)
v6.0.0
Compare Source
==========================
New Features
astropy.config
^^^^^^^^^^^^^^
ConfigNamespace.help()
method provides a convenient way to getinformation about configuration items. [#13499]
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
Support has been added to create geodetic representations not just for existing ellipsoids
from ERFA, but also with explicitly provided values, by defining a subclass of
BaseGeodeticRepresentation
with the equatorial radius and flattening assigned to_equatorial_radius
and_flattening
attributes. [#14763]Add
BaseBodycentricRepresentation
, a new spheroidal representation for bodycentriclatitudes and longitudes. [#14851]
Support Numpy broadcasting over frame data and attributes. [#15121]
astropy.cosmology
^^^^^^^^^^^^^^^^^
Registered a
latex
writer for exporting a Cosmology object to a LaTex table. [#14701]Added argument
rename
to Cosmology's I/O, allowing for input and output symbols tobe renamed. [#14780]
All non-abstract Cosmology subclasses are now automatically registered to work with
Astropy's YAML serialization. [#14979]
Cosmology I/O now auto-identifies the '.tex' suffix with the 'ascii.latex' format. [#15088]
The
Cosmology
class now has a new property to access the parameters of thecosmology:
.parameters
. This property return a read-only dictionary of all thenon-derived parameter values on the cosmology object. When accessed from the class (not
an instance) the dictionary contains
Parameter
instances, not the values. [#15168]The field
default
has been added toParameter
. This can be used to introspectthe default value of a parameter on a cosmology class e.g.
LambdaCDM.H0.default
. [#15400]astropy.io.fits
^^^^^^^^^^^^^^^
decompress_in_memory
tofits.open
, to decompress thewhole file in memory at once, instead of decompressing the file progressively
as data is needed. Default behavior is better for memory usage but sometimes
slow, especially for files with many small HDUs. [#15501]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
Add support for Parquet serialization of VOTables. Writing of this
serialization is available with using the new
'votable.parquet'
format. [#15281]Added MIVOT feature through the
MivotBlock
classthat allows model annotations reading and writing in VOTable. [#15390]
astropy.modeling
^^^^^^^^^^^^^^^^
GeneralSersic2D
model that can have "boxy" or "disky"isophotes. [#15545]
astropy.nddata
^^^^^^^^^^^^^^
NDData
objects which visually indicates masked entries, and provides forbetter for dask array support. [#14438]
astropy.table
^^^^^^^^^^^^^
Row.get()
method, analogous todict.get()
, returns the value ofthe specified column from the row if the column present, otherwise it returns a
fallback value, which by default is
None
. [#14878]astropy.time
^^^^^^^^^^^^
Masked
Time
instances now use astropy's ownMasked
class internally.This means that
Masked
input is now properly recognized, and that masksget propagated also to
Quantity
output (such as from aTimeDelta
converted to a unit of time), creating
MaskedQuantity
instances. [#15231]Added a
TimeDelta
formatquantity_str
that represents the time delta as a stringwith one or more
Quantity
components. This format provides a human-readablemulti-scale string representation of a time delta. The default output sub-format is not
considered stable in this release, plehttps://github.com/astropy/astropy/issues/15485es/15485
for more information. [#15264]
astropy.uncertainty
^^^^^^^^^^^^^^^^^^^
Uncertainty
Distribution
now support structured data types, and asa result it now works also with
EarthLocation
. [#15304]Uncertainty
Distribution
can now be used inside representations, whichalso allows basic support in
SkyCoord
. While most calculations work, thereare remaining issues. For instance, the
repr
does not show that thecoordinates are distributions. [#15395]
astropy.units
^^^^^^^^^^^^^
using equatorial radius and flattening. [#14729]
astropy.utils
^^^^^^^^^^^^^
The
astropy.utils.metadata.MetaData
default dictionary can now beset with the
default_factory
keyword argument. [#15265]astropy.utils.decorators.deprecated
now adds the__deprecated__
attribute tothe objects it wraps, following the practice in https://peps.python.org/pep-0702/. [#15310]
astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
WCSAxes.text_coord
method to print text usingSkyCoord
objectsparallel to plotting data points with
WCSAxes.plot_coord
. [#14661]astropy.wcs
^^^^^^^^^^^
Support WCS descriptions of basic planetary coordinate frames. [#14820]
Updated bundled WCSLIB version to 8.1. This update adds support planetary keywords
A_RADIUS
,B_RADIUS
,C_RADIUS
,BLON_OBS
,BLAT_OBS
, andBDIS_OBS
inauxprm
and addswcsprm::time
to thewcsprm
struct to record theTIME
axis. This update also includes several bug fixes. For a full list of changes - see http://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES [#15035]API Changes
astropy.config
^^^^^^^^^^^^^^
ConfigurationMissingWarning
class andupdate_default_config
function;There are no replacements as they should no be used anymore. [#15466]
astropy.convolution
^^^^^^^^^^^^^^^^^^^
Invalid kernel arithmetic operations now raise a
KernelArithmeticError
instead of abare
Exception
. [#14728]Added base
KernelError
error class and removedDiscretizationError
error class (aValueError
will be raised instead). [#14732]discretize_model
will now raise aValueError
ifmode='oversample'
andfactor
does not have an integer value. [#14794]astropy.coordinates
^^^^^^^^^^^^^^^^^^^
Removed deprecated angle parsing and formatting utilities from
angle_utilities
.Use the functions from
angle_formats
instead. [#14675]The deprecated functionality of initializing
Angle
orLongitude
from atuple
is no longer supported. [#15205]Angle-related classes and functions have been moved within
astropy.coordinates
.There is no change to public API as everything moved should still be imported from
astropy.coordinates
, not a sub-module. If you are using private API, try importingfrom
astropy.coordinates
instead. If you need something that has been moved and isnot available in
astropy.coordinates
, please open an issue on the Astropy issuetracker. [#15220]
It is no longer possible to pass frame classes to the
transform_to()
methodof a low-level coordinate-frame class. It is still possible to pass frame
instances. The
transform_to()
method of the high-levelSkyCoord
classis unaffected. [#15500]
astropy.cosmology
^^^^^^^^^^^^^^^^^
Removed support of importing private constants and functions from
astropy.cosmology.flrw
. [#14672]Removed deprecated Cosmology Parameter argument
fmt
. [#14673]Removed deprecated
vectorize_if_needed
andinf_like
fromcosmology.utils
. [#14677]Removed deprecated import paths from
astropy.cosmology.core
. [#14782]Cosmology
Parameter
is now adataclass
, and can work with all of Python's dataclassesmachinery, like field introspection and type conversion. [#14874]
A new property --
scale_factor0
-- has been added to Cosmology objects.This is the scale factor at redshift 0, and is defined to be 1.0. [#14931]
Added registration label
ascii.latex
to Cosmology IO. [#14938]The private module
astropy.cosmology.utils
has been deprecated. [#14980]Removed deprecated
get_cosmology_from_string
class method indefault_cosmology
; useget
instead. [#15467]astropy.io.ascii
^^^^^^^^^^^^^^^^
Several arguments in functions within
astropy.io.ascii
have been deprecated andare either renamed or scheduled to be removed.
read()
:Reader
will be removed. Instead supply the equivalentformat
argument.Inputter
has been renamed toinputter_cls
.Outputter
has been renamed tooutputter_cls
.get_reader()
:Reader
has been renamed toreader_cls
.Inputter
has been renamed toinputter_cls
.Outputter
has been renamed tooutputter_cls
.write()
:Writer
will be removed. Instead supply the equivalentformat
argument.get_writer()
:Writer
has been renamed towriter_cls
. [#14914]Removed deprecated
astropy.io.ascii.tests.common.raises
test helper; usepytest.raises
instead. [#15470]astropy.io.fits
^^^^^^^^^^^^^^^
Deprecate
_ExtensionHDU
and_NonstandardExtHDU
(useExtensionHDU
orNonstandardExtHDU
instead). [#15396]Remove special handling of TCTYP TCUNI TCRPX TCRVL TCDLT TRPOS (#7157). [#15396]
Rename and deprecate
TableHDU.update
toTableHDU.update_header
, forconsistency with
ImageHDU
. [#15396]astropy.io.misc
^^^^^^^^^^^^^^^
Removed deprecated
astropy.io.misc.asdf
subpackage. Useasdf-astropy
package instead. [#14668]fnunpickle
andfnpickle
are deprecated because they are not used anywhere withinastropy
.If you must, use the module from Python standard library but be advised that pickle is insecure
so you should only unpickle data that you trust. [#15418]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
Removed deprecated
pedantic
option from theastropy.io.votable.table.parse()
function and the corresponding configurationsetting. Use the
verify
option instead. [#14669]Class
astropy.io.votable.tree.Table
has been renamed toTableElement
to avoid sharing the name with
astropy.table.Table
. [#15372]Fully removed support for version = '1.0' on
VOTableFile__init__()
and changed its tests to check correctly.It was raising a
DeprecationWarning
and now is raising aValueError
. [#15490]astropy.modeling
^^^^^^^^^^^^^^^^
Removed the
AliasDict
class frommodeling.utils
. [#12943]Creating a model instance with parameters that have incompatible shapes will
now raise a
ValueError
rather than anIncompatibleShapeError
. [#15209]Removal of deprecated code
_model_to_fit_params
and_fitter_to_model_params
fromfitting.py
. [#15461]astropy.stats
^^^^^^^^^^^^^
BoxLeastSquares
,BoxLeastSquaresResults
andLombScargle
classesare not available from
astropy.stats
anymore, they are now available onlyfrom
astropy.timeseries
. [#15530]astropy.tests
^^^^^^^^^^^^^
Removed deprecated deprecation, warning, and exception handling functionality provided by
astropy.tests.helper
. [#14670]astropy.tests.command.FixRemoteDataOption
andastropy.tests.command.AstropyTest
are deprecated.They are no longer necessary after sunsetting
astropy-helpers
. [#15204]astropy.time
^^^^^^^^^^^^
Time
has switched to useMasked
arrays internally, instead ofindicating masked values using NaN in the internal
jd2
attribute. As aresult, any output from instances, such as one gets with, say, the
.isot
format, will also use
Masked
by default.For backwards compatibility, a new configuration item,
astropy.time.conf.masked_array_type
is introduced which is set to"astropy" by default (which indicates one wants to use
Masked
), but canalso be set to "numpy", in which case
numpy.ma.MaskedArray
will be usedwhere possible (essentially, for all but
Quantity
). [#15231]Changed the
TimeDelta
init signature to be consistent with that ofTime
.Previously the argument order was
val, val2, format, scale, copy
. Now the order isval, val2, format, scale, *, precision, in_subfmt, out_subfmt, copy
, where thearguments after the
*
must be specified by keyword. [#15264]astropy.timeseries
^^^^^^^^^^^^^^^^^^
midpoint_epoch
infold
function; useepoch_time
instead. [#15462]astropy.uncertainty
^^^^^^^^^^^^^^^^^^^
The
.dtype
attribute exposed byDistribution
is now that ofthe samples, rather than one that has a "samples" entry. This makes
quantities with structured data types and units easier to support, and
generally makes the
Distribution
appear more similar to regulararrays. It should have little effect on code. For instance,
distribution["samples"]
still will return the actual distribution.As a consequence of this refactoring, most arrays that are not
C-contiguous can now be viewed and will thus not be copied on input
any more. The only exceptions are arrays for which the strides are
negative.
Note that the true data type is considered an implementation detail.
But for reference, it now is a structured data type with a single
field, "samples", which itself is an array of "sample" fields, which
contain the actual data. [#15304]
astropy.units
^^^^^^^^^^^^^
Like
np.ndarray
, under numpy 2.0Quantity
and all its subclasses(
Angle
,Masked
, etc.) will no longer support the.ptp()
method.Use
np.ptp(...)
instead.Similarly, support for the much less frequently used
.newbyteorder()
and.itemset()
methods has been removed. [#15378]The following deprecated functionality has been removed:
littleh
unit andwith_H0
equivalency. They are still available fromcosmology.units
.brightness_temperature
equivalency no longer automatically swaps theorder of its arguments if it does not match the expectation.
PhysicalType
no longer supportsstr
methods and attributes. [#15514]astropy.utils
^^^^^^^^^^^^^
Removed deprecated
OrderedDescriptor
,OrderedDescriptorContainer
, andset_locale
inastropy.utils.misc
. [#14679]is_path_hidden()
andwalk_skip_hidden()
are deprecated. [#14759]The structure of
utils.metadata
has been refactored, but all the availablefunctions and classes are still present and should be imported as before. [#15166]
The
astropy.utils.metadata.MetaData
class, which is used throughout astropyto carry metadata on tables, columns, etc., can now also be used on dataclasses.
When accessing the meta attribute on a class
astropy.utils.metadata.MetaData
now returns None instead of itself. [#15237]
The
astropy.utils.metadata.MetaData
class, which is used throughout astropyto carry metadata on tables, columns, etc., can now also be used on frozen dataclasses. [#15404]
Removed deprecated
version_path
inminversion
function; it is no longer used. [#15468]astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
The
bboxes
,ticklabels_bbox
, andtick_out_size
arguments toastropy.visualization.wcaxes.ticklabels.TickLabels.draw()
now have no effect and are deprecated.This is to allow rasterized ticks to be drawn correctly on WCSAxes. [#14760]
It is now not possible to pass any keyword arguments to
astropy.visualization.wcsaxes.WCSAxes.draw()
.Previously passing any keyword arguments would have errored anyway, as
matplotlib.axes.Axes.draw()
does not accept keyword arguments. [#14772]Deprecated the
exp
attribute in theLogStretch
,InvertedLogStretch
,PowerDistStretch
, andInvertedPowerDistStretch
stretch classes, and thepower
attribute in the
PowerStretch
. Instead, use thea
attribute,which matches the input keyword. [#15538]
Removed the maximum value of the
a
parameter in theAsinhStretch
and
SinhStretch
stretch classes. [#15539]astropy.wcs
^^^^^^^^^^^
Removed deprecated
accuracy
fromall_world2pix
method inWCS
; usetolerance
instead. [#15464]NoConvergence
no longer accepts arbitrary keyword arguments. [#15504]Bug Fixes
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
astropy.cosmology
^^^^^^^^^^^^^^^^^
The exponent in
w0wzCDM.de_density_scale
has been corrected to 3, from -3.This correction has also been made to the scalar
inv_efunc
cpython functions. [#14991]pandas.Series
are now uniformly converted to their underlying data type when givenas an argument to a Cosmology method. [#15600]
astropy.io.fits
^^^^^^^^^^^^^^^
Reading a table from FITS now respects the TNULL property of a column, passing
it into the column's
fill_value
. [#14723]Fix crash when a PrimaryHDU has a GROUPS keyword with a non-boolean value (i.e.
not a random-groups HDU). [#14998]
Fixed a bug that caused
Cutout2D
to not work correctly withCompImageHDU.section
[#14999]Fixed a bug that caused compressed images with TFORM missing the optional '1' prefix to not be readable. [#15001]
Ensure that tables written to FITS with both masked and unmasked columns
roundtrip properly (previously, all integer columns would become masked
if any column was masked). [#15473]
Fix segfault with error report in tile decompression. [#15489]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
repr
for VOTable instance now clearly shows it is a VOTable and not generic astropy Table. [#14702]astropy.modeling
^^^^^^^^^^^^^^^^
astropy.nddata
^^^^^^^^^^^^^^
NDData.mask
, plus a fixfor arithmetic between masked and unmasked
NDData
objects. [#14995]astropy.table
^^^^^^^^^^^^^
Table.as_array
now respects thefill_value
property of masked columns. [#14723]Fix a bug where table indexes were not using a stable sort order. This was causing the
order of rows within groups to not match the original table order when an indexed table
was grouped. [#14907]
Fixed issue #14964 that when grouping a Table on a mixin column such as
Quantity
orTime
, the grouped table keys did not reflect the original column values. ForQuantity
this meant that the key values were pure float values without the unit,while for
Time
the key values were the pair ofjd1
andjd2
float values. [#14966]astropy.time
^^^^^^^^^^^^
Time
caches of formats and scales do not get outof sync with the actual data, even if another instance, holding a view
of the data is written to. E.g., if one does
t01 = t[:2]
, andsets
t[0]
after, it is now guaranteed thatt01.value
willcorrectly reflect that change in value. [#15453]
astropy.units
^^^^^^^^^^^^^
astropy.utils
^^^^^^^^^^^^^
Ufuncs with more than 2 operands (such as
erfa.dtf2d
) now workalso if all inputs are scalars and more than two inputs have masks. [#15450]
Ensured that
str(masked_array)
looks likestr(unmasked_array)
also forarray scalars. Thus, like regular array scalars, the precision is ignored for
float, and strings do not include extra quoting. [#15451]
astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
The location of ticklabels on a WCSAxes is now correctly calculated when the figure is rasterized. [#14760]
Fixed a bug where a
ValueError
would be raised in theAsinhStretch
andSinhStretch
classes for valida
parametervalues. [#15539]
astropy.wcs
^^^^^^^^^^^
wcs.validate(filename)
now properly closes the file handler. [#15054]Fix a regression in custom WCS mapping due to the recent introduction of
Solar System frames. [#15630]
Other Changes and Additions
The minimum supported version of NumPy is now 1.22. [#15006]
Moved International Earth Rotation and Reference Systems (IERS) and Leap Second
files out into standalone astropy-iers-data package, maintaining full
backward-compatibility in the
astropy.utils.iers
API. Deprecationwarnings may be issued when certain files are accessed directly. [#14819]
Switch from using
setup.cfg
for project configuration to usingpyproject.toml
. [#15247]Update bundled expat to 2.5.0. [#15585]
v5.3.4
Compare Source
==========================
Bug Fixes
astropy.io.misc
^^^^^^^^^^^^^^^
astropy.io.misc.yaml
sodump()` with a numpy object array or
load()with YAML representing a Numpy object array both raise
TypeError``. This prevents problems like a segmentation fault. [#15373]astropy.io.votable
^^^^^^^^^^^^^^^^^^
convert_to_writable_filelike
whereGzipFile
was notclosed properly. [#15359]
astropy.units
^^^^^^^^^^^^^
In VOUnit, the spaces around the slash were removed in the formatting of
fractions, and fractional powers now also use the "**" operator. [#15282]
We now ensure that the unit
u.cgs.cm
is just an alias ofu.si.cm
,instead of a redefinition. This ensures that
u.Unit("cm") / u.cm
will reliably cancel to dimensionless (instead of some "cm / cm"). [#15368]
astropy.utils
^^^^^^^^^^^^^
Masked
,np.ptp
and the.ptp()
method now properly account forthe mask, ensuring the result is identical to subtracting the maximum and
minimum (with the same arguments). [#15380]
Other Changes and Additions
Compatibility with Python 3.12. [#14784]
Replaced the URL of
IETF_LEAP_SECOND_URL
because the original is nowdefunct and IETF now defers to IANA for such look-up. [#15421]
v5.3.3
Compare Source
===========================
Bug Fixes
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
TransformGraph.to_dot_graph()
now throws an exception for invalidsavelayout
.astropy.cosmology
^^^^^^^^^^^^^^^^^
w0wzCDM
functions ininv_efunc
has been corrected to 3, from -3. [#15224]astropy.modeling
^^^^^^^^^^^^^^^^
filter_non_finite
keyword argument in a fitter call. Now when
filter_non_finite
is True,non-finite weights will also be filtered to prevent crashes in
LevMarLSQFitter
. [#15215]astropy.units
^^^^^^^^^^^^^
astropy.units.Quantity
's implementation ofnumpy.nanmedian()
,where for Numpy >= 1.25 an exception was raised for some array shapes and axis
combinations. [#15228]
Other Changes and Additions
v5.3.2
Compare Source
==========================
Bug Fixes
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
-OO
flag. [#15037]astropy.nddata
^^^^^^^^^^^^^^
NDData
without masks or units. [#15082]astropy.units
^^^^^^^^^^^^^
np.power()
for instances ofQuantity
toallow any array as the second operand if all its elements have the same value. [#15101]
v5.3.1
Compare Source
==========================
Bug Fixes
astropy.cosmology
^^^^^^^^^^^^^^^^^
wowzCDM.de_density_scale
has been corrected to 3, from -3. [#14991]astropy.io.fits
^^^^^^^^^^^^^^^
Fix crash when a PrimaryHDU has a GROUPS keyword with a non-boolean value (i.e.
not a random-groups HDU). [#14998]
Fixed a bug that caused
Cutout2D
to not work correctly withCompImageHDU.section
[#14999]Fixed a bug that caused compressed images with TFORM missing the optional '1' prefix to not be readable. [#15001]
astropy.modeling
^^^^^^^^^^^^^^^^
astropy.nddata
^^^^^^^^^^^^^^
NDData.mask
, plus a fixfor arithmetic between masked and unmasked
NDData
objects. [#14995]astropy.table
^^^^^^^^^^^^^
order of rows within groups to not match the original table order when an indexed table
was grouped. [#14907]
astropy.units
^^^^^^^^^^^^^
v5.3
Compare Source
==========================
Bug Fixes
astropy.io.misc
^^^^^^^^^^^^^^^
astropy.io.misc.yaml
sodump()` with a numpy object array or
load()with YAML representing a Numpy object array both raise
TypeError``. This prevents problems like a segmentation fault. [#15373]astropy.io.votable
^^^^^^^^^^^^^^^^^^
convert_to_writable_filelike
whereGzipFile
was notclosed properly. [#15359]
astropy.units
^^^^^^^^^^^^^
In VOUnit, the spaces around the slash were removed in the formatting of
fractions, and fractional powers now also use the "**" operator. [#15282]
We now ensure that the unit
u.cgs.cm
is just an alias ofu.si.cm
,instead of a redefinition. This ensures that
u.Unit("cm") / u.cm
will reliably cancel to dimensionless (instead of some "cm / cm"). [#15368]
astropy.utils
^^^^^^^^^^^^^
Masked
,np.ptp
and the.ptp()
method now properly account forthe mask, ensuring the result is identical to subtracting the maximum and
minimum (with the same arguments). [#15380]
Other Changes and Additions
Compatibility with Python 3.12. [#14784]
Replaced the URL of
IETF_LEAP_SECOND_URL
because the original is nowdefunct and IETF now defers to IANA for such look-up. [#15421]
Configuration
📅 Schedule: Branch creation - "every 4th week on Thursday before 10am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.