Skip to content

Scheduled weekly dependency update for week 20#282

Open
pyup-bot wants to merge 247 commits into
masterfrom
pyup-scheduled-update-2026-05-18
Open

Scheduled weekly dependency update for week 20#282
pyup-bot wants to merge 247 commits into
masterfrom
pyup-scheduled-update-2026-05-18

Conversation

@pyup-bot
Copy link
Copy Markdown
Collaborator

Update anyio from 4.6.2.post1 to 4.13.0.

Changelog

4.13.0

- Dropped support for Python 3.9
- Added a ``ttl`` parameter to the ``anyio.functools.lru_cache`` wrapper
(`1073 <https://github.com/agronholm/anyio/pull/1073>`_; PR by Graeme22)
- Widened the type annotations of file I/O streams to accept ``IO[bytes]``
instead of just ``BinaryIO``
(`1078 <https://github.com/agronholm/anyio/issues/1078>`_)
- Fixed ``anyio.Path`` not being compatible with Python 3.15 due to the removal of
``pathlib.Path.is_reserved()`` and the addition of ``pathlib.Path.__vfspath__()``
(`1061 <https://github.com/agronholm/anyio/issues/1061>`_; PR by veeceey)
- Fixed the ``BrokenResourceError`` raised by the asyncio ``SocketStream`` not having
the original exception as its cause
(`1055 <https://github.com/agronholm/anyio/issues/1055>`_; PR by veeceey)
- Fixed the ``TypeError`` raised when using "func" as a parameter name in
``pytest.mark.parametrize`` when using the pytest plugin
(`1068 <https://github.com/agronholm/anyio/pull/1068>`_; PR by JohnnyDeuss)
- Fixed the pytest plugin not running tests that had the ``anyio`` marker added
programmatically via ``pytest_collection_modifyitems``
(`422 <https://github.com/agronholm/anyio/issues/422>`_; PR by chbndrhnns)
- Fixed cancellation exceptions leaking from a ``CancelScope`` on asyncio when they are
contained in an exception group alongside non-cancellation exceptions (`1091
<https://github.com/agronholm/anyio/issues/1091>`_; PR by gschaffner)
- Fixed ``Condition.wait()`` not passing on a notification when the task is cancelled
but already received a notification
- Fixed inverted condition in the process pool shutdown phase which would cause
still-running pooled processes not to be terminated
(`1074 <https://github.com/agronholm/anyio/pull/1074>`_; PR by bysiber)

4.12.1

- Changed all functions currently raising the private ``NoCurrentAsyncBackend``
exception (since v4.12.0) to instead raise the public ``NoEventLoopError`` exception
(`1048 <https://github.com/agronholm/anyio/issues/1048>`_)
- Fixed ``anyio.functools.lru_cache`` not working with instance methods
(`1042 <https://github.com/agronholm/anyio/issues/1042>`_)

4.12.0

- Added support for asyncio's `task call graphs`_ on Python 3.14 and later when using
AnyIO's task groups
(`1025 <https://github.com/agronholm/anyio/pull/1025>`_)
- Added an asynchronous implementation of the ``functools`` module
(`1001 <https://github.com/agronholm/anyio/pull/1001>`_)
- Added support for ``uvloop=True`` on Windows via the winloop_ implementation
(`960 <https://github.com/agronholm/anyio/pull/960>`_; PR by Vizonex)
- Added support for use as a context manager to ``anyio.lowlevel.RunVar``
(`1003 <https://github.com/agronholm/anyio/pull/1003>`_)
- Added ``__all__`` declarations to public submodules (``anyio.lowlevel`` etc.)
(`1009 <https://github.com/agronholm/anyio/pull/1009>`_)
- Added the ability to set the token count of a ``CapacityLimiter`` to zero
(`1019 <https://github.com/agronholm/anyio/pull/1019>`_; requires Python 3.10 or
later when using Trio)
- Added parameters ``case_sensitive`` and ``recurse_symlinks`` along with support for
path-like objects to ``anyio.Path.glob()`` and ``anyio.Path.rglob()``
(`1033 <https://github.com/agronholm/anyio/pull/1033>`_; PR by northisup)
- Dropped ``sniffio`` as a direct dependency and added the ``get_available_backends()``
function (`1021 <https://github.com/agronholm/anyio/pull/1021>`_)
- Fixed ``Process.stdin.send()`` not raising ``ClosedResourceError`` and
``BrokenResourceError`` on asyncio. Previously, a non-AnyIO exception was raised in
such cases (`671 <https://github.com/agronholm/anyio/issues/671>`_; PR by
gschaffner)
- Fixed ``Process.stdin.send()`` not checkpointing before writing data on asyncio
(`1002 <https://github.com/agronholm/anyio/issues/1002>`_; PR by gschaffner)
- Fixed a race condition where cancelling a ``Future`` from
``BlockingPortal.start_task_soon()`` would sometimes not cancel the async function
(`1011 <https://github.com/agronholm/anyio/issues/1011>`_; PR by gschaffner)
- Fixed the presence of the pytest plugin causing breakage with older versions of
pytest (<= 6.1.2)
(`1028 <https://github.com/agronholm/anyio/issues/1028>`_; PR by saper)
- Fixed a rarely occurring ``RuntimeError: Set changed size during iteration`` while
shutting down the process pool when using the asyncio backend
(`985 <https://github.com/agronholm/anyio/issues/985>`_)

.. _task call graphs: https://docs.python.org/3/library/asyncio-graph.html
.. _winloop: https://github.com/Vizonex/Winloop

4.11.0

- Added support for cancellation reasons (the ``reason`` parameter to
``CancelScope.cancel()``)
(`975 <https://github.com/agronholm/anyio/pull/975>`_)
- Bumped the minimum version of Trio to v0.31.0
- Added the ability to enter the event loop from foreign (non-worker) threads by
passing the return value of ``anyio.lowlevel.current_token()`` to
``anyio.from_thread.run()`` and ``anyio.from_thread.run_sync()`` as the ``token``
keyword argument (`256 <https://github.com/agronholm/anyio/issues/256>`_)
- Added pytest option (``anyio_mode = "auto"``) to make the pytest plugin automatically
handle all async tests
(`971 <https://github.com/agronholm/anyio/pull/971>`_)
- Added the ``anyio.Condition.wait_for()`` method for feature parity with asyncio
(`974 <https://github.com/agronholm/anyio/pull/974>`_)
- Changed the default type argument of ``anyio.abc.TaskStatus`` from ``Any`` to ``None``
(`964 <https://github.com/agronholm/anyio/pull/964>`_)
- Fixed TCP listener behavior to guarantee the same ephemeral port is used for all
socket listeners when ``local_port=0``
(`857 <https://github.com/agronholm/anyio/issues/857>`_; PR by 11kkw and agronholm)
- Fixed inconsistency between Trio and asyncio where a TCP stream that previously
raised a ``BrokenResourceError`` on ``send()`` would still raise
``BrokenResourceError`` after the stream was closed on asyncio, but
``ClosedResourceError`` on Trio. They now both raise a ``ClosedResourceError`` in this
scenario. (`671 <https://github.com/agronholm/anyio/issues/671>`_)

4.10.0

- Added the ``feed_data()`` method to the ``BufferedByteReceiveStream`` class, allowing
users to inject data directly into the buffer
- Added various class methods to wrap existing sockets as listeners or socket streams:

* ``SocketListener.from_socket()``
* ``SocketStream.from_socket()``
* ``UNIXSocketStream.from_socket()``
* ``UDPSocket.from_socket()``
* ``ConnectedUDPSocket.from_socket()``
* ``UNIXDatagramSocket.from_socket()``
* ``ConnectedUNIXDatagramSocket.from_socket()``
- Added a hierarchy of connectable stream classes for transparently connecting to
various remote or local endpoints for exchanging bytes or objects
- Added ``BufferedByteStream``, a full-duplex variant of ``BufferedByteReceiveStream``
- Added context manager mix-in classes (``anyio.ContextManagerMixin`` and
``anyio.AsyncContextManagerMixin``) to help write classes that embed other context
managers, particularly cancel scopes or task groups
(`905 <https://github.com/agronholm/anyio/pull/905>`_; PR by agronholm and
tapetersen)
- Added the ability to specify the thread name in ``start_blocking_portal()``
(`818 <https://github.com/agronholm/anyio/issues/818>`_; PR by davidbrochart)
- Added ``anyio.notify_closing`` to allow waking ``anyio.wait_readable``
and ``anyio.wait_writable`` before closing a socket. Among other things,
this prevents an OSError on the ``ProactorEventLoop``.
(`896 <https://github.com/agronholm/anyio/pull/896>`_; PR by graingert)
- Incorporated several documentation improvements from the EuroPython 2025 sprint
(special thanks to the sprinters: Emmanuel Okedele, Jan Murre, Euxenia Miruna Goia and
Christoffer Fjord)
- Added a documentation page explaining why one might want to use AnyIO's APIs instead
of asyncio's
- Updated the ``to_interpreters`` module to use the public ``concurrent.interpreters``
API on Python 3.14 or later
- Fixed ``anyio.Path.copy()`` and ``anyio.Path.copy_into()`` failing on Python 3.14.0a7
- Fixed return annotation of ``__aexit__`` on async context managers. CMs which can
suppress exceptions should return ``bool``, or ``None`` otherwise.
(`913 <https://github.com/agronholm/anyio/pull/913>`_; PR by Enegg)
- Fixed rollover boundary check in ``SpooledTemporaryFile`` so that rollover
only occurs when the buffer size exceeds ``max_size``
(`915 <https://github.com/agronholm/anyio/pull/915>`_; PR by 11kkw)
- Migrated testing and documentation dependencies from extras to dependency groups
- Fixed compatibility of ``anyio.to_interpreter`` with Python 3.14.0b2
(`926 <https://github.com/agronholm/anyio/issues/926>`_; PR by hroncok)
- Fixed ``SyntaxWarning`` on Python 3.14 about ``return`` in ``finally``
(`816 <https://github.com/agronholm/anyio/issues/816>`_)
- Fixed RunVar name conflicts. RunVar instances with the same name should not share
storage (`880 <https://github.com/agronholm/anyio/issues/880>`_; PR by vimfu)
- Renamed the ``BrokenWorkerIntepreter`` exception to ``BrokenWorkerInterpreter``.
The old name is available as a deprecated alias.
(`938 <https://github.com/agronholm/anyio/pull/938>`_; PR by ayussh-verma)
- Fixed an edge case in ``CapacityLimiter`` on asyncio where a task, waiting to acquire
a limiter gets cancelled and is subsequently granted a token from the limiter, but
before the cancellation is delivered, and then fails to notify the next waiting task
(`947 <https://github.com/agronholm/anyio/issues/947>`_)

4.9.0

- Added async support for temporary file handling
(`344 <https://github.com/agronholm/anyio/issues/344>`_; PR by 11kkw)
- Added 4 new fixtures for the AnyIO ``pytest`` plugin:

* ``free_tcp_port_factory``: session scoped fixture returning a callable that
 generates unused TCP port numbers
* ``free_udp_port_factory``: session scoped fixture returning a callable that
 generates unused UDP port numbers
* ``free_tcp_port``: function scoped fixture that invokes the
 ``free_tcp_port_factory`` fixture to generate a free TCP port number
* ``free_udp_port``: function scoped fixture that invokes the
 ``free_udp_port_factory`` fixture to generate a free UDP port number
- Added ``stdin`` argument to ``anyio.run_process()`` akin to what
``anyio.open_process()``, ``asyncio.create_subprocess_…()``, ``trio.run_process()``,
and ``subprocess.run()`` already accept (PR by jmehnle)
- Added the ``info`` property to ``anyio.Path`` on Python 3.14
- Changed ``anyio.getaddrinfo()`` to ignore (invalid) IPv6 name resolution results when
IPv6 support is disabled in Python
- Changed ``EndOfStream`` raised from ``MemoryObjectReceiveStream.receive()`` to leave
out the ``AttributeError`` from the exception chain which was merely an implementation
detail and caused some confusion
- Fixed traceback formatting growing quadratically with level of ``TaskGroup``
nesting on asyncio due to exception chaining when raising ``ExceptionGroups``
in ``TaskGroup.__aexit__``
(`863 <https://github.com/agronholm/anyio/issues/863>`_; PR by tapetersen)
- Fixed ``anyio.Path.iterdir()`` making a blocking call in Python 3.13
(`873 <https://github.com/agronholm/anyio/issues/873>`_; PR by cbornet and
agronholm)
- Fixed ``connect_tcp()`` producing cyclic references in tracebacks when raising
exceptions (`809 <https://github.com/agronholm/anyio/pull/809>`_; PR by graingert)
- Fixed ``anyio.to_thread.run_sync()`` needlessly holding on to references of the
context, function, arguments and others until the next work item on asyncio
(PR by Wankupi)

4.8.0

- Added **experimental** support for running functions in subinterpreters on Python
3.13 and later
- Added support for the ``copy()``, ``copy_into()``, ``move()`` and ``move_into()``
methods in ``anyio.Path``, available in Python 3.14
- Changed ``TaskGroup`` on asyncio to always spawn tasks non-eagerly, even if using a
task factory created via ``asyncio.create_eager_task_factory()``, to preserve expected
Trio-like task scheduling semantics (PR by agronholm and graingert)
- Configure ``SO_RCVBUF``, ``SO_SNDBUF`` and ``TCP_NODELAY`` on the selector
thread waker socket pair (this should improve the performance of ``wait_readable()``)
and ``wait_writable()`` when using the ``ProactorEventLoop``
(`836 <https://github.com/agronholm/anyio/pull/836>`_; PR by graingert)
- Fixed ``AssertionError`` when using ``nest-asyncio``
(`840 <https://github.com/agronholm/anyio/issues/840>`_)
- Fixed return type annotation of various context managers' ``__exit__`` method
(`847 <https://github.com/agronholm/anyio/issues/847>`_; PR by Enegg)

4.7.0

- Updated ``TaskGroup`` to work with asyncio's eager task factories
(`764 <https://github.com/agronholm/anyio/issues/764>`_)
- Added the ``wait_readable()`` and ``wait_writable()`` functions which will accept
an object with a ``.fileno()`` method or an integer handle, and deprecated
their now obsolete versions (``wait_socket_readable()`` and
``wait_socket_writable()``) (PR by davidbrochart)
- Changed ``EventAdapter`` (an ``Event`` with no bound async backend) to allow ``set()``
to work even before an async backend is bound to it
(`819 <https://github.com/agronholm/anyio/issues/819>`_)
- Added support for ``wait_readable()`` and ``wait_writable()`` on ``ProactorEventLoop``
(used on asyncio + Windows by default)
- Fixed a misleading ``ValueError`` in the context of DNS failures
(`815 <https://github.com/agronholm/anyio/issues/815>`_; PR by graingert)
- Fixed the return type annotations of ``readinto()`` and ``readinto1()`` methods in the
``anyio.AsyncFile`` class
(`825 <https://github.com/agronholm/anyio/issues/825>`_)
- Fixed ``TaskInfo.has_pending_cancellation()`` on asyncio returning false positives in
cleanup code on Python >= 3.11
(`832 <https://github.com/agronholm/anyio/issues/832>`_; PR by gschaffner)
- Fixed cancelled cancel scopes on asyncio calling ``asyncio.Task.uncancel`` when
propagating a ``CancelledError`` on exit to a cancelled parent scope
(`790 <https://github.com/agronholm/anyio/pull/790>`_; PR by gschaffner)
Links

Update argon2-cffi from 23.1.0 to 25.1.0.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update arrow from 1.3.0 to 1.4.0.

Changelog

1.4.0

------------------

- [ADDED] Added ``week_start`` parameter to ``floor()`` and ``ceil()`` methods. `PR 1222 <https://github.com/arrow-py/arrow/pull/1222>`_
- [ADDED] Added ``FORMAT_RFC3339_STRICT`` with a T separator. `PR 1201 <https://github.com/arrow-py/arrow/pull/1201>`_
- [ADDED] Added Macedonian in Latin locale support. `PR 1200 <https://github.com/arrow-py/arrow/pull/1200>`_
- [ADDED] Added Persian/Farsi locale support. `PR 1190 <https://github.com/arrow-py/arrow/pull/1190>`_
- [ADDED] Added week and weeks to Thai locale timeframes. `PR 1218 <https://github.com/arrow-py/arrow/pull/1218>`_
- [ADDED] Added weeks to Catalan locale. `PR 1189 <https://github.com/arrow-py/arrow/pull/1189>`_
- [ADDED] Added Persian names of months, month-abbreviations and day-abbreviations in Gregorian calendar. `PR 1172 <https://github.com/arrow-py/arrow/pull/1172>`_
- [CHANGED] Migrated Arrow to use ZoneInfo for timezones instead of pytz. `PR 1217 <https://github.com/arrow-py/arrow/pull/1217>`_
- [FIXED] Fixed humanize month limits. `PR 1224 <https://github.com/arrow-py/arrow/pull/1224>`_
- [FIXED] Fixed type hint of ``Arrow.__getattr__``. `PR 1171 <https://github.com/arrow-py/arrow/pull/1171>`_
- [FIXED] Fixed spelling and removed poorly used expressions in Korean locale. `PR 1181 <https://github.com/arrow-py/arrow/pull/1181>`_
- [FIXED] Updated ``shift()`` method for issue 1145. `PR 1194 <https://github.com/arrow-py/arrow/pull/1194>`_
- [FIXED] Improved Greek locale translations (seconds, days, "ago", and month typo). `PR 1184 <https://github.com/arrow-py/arrow/pull/1184>`_, `PR #1186 <https://github.com/arrow-py/arrow/pull/1186>`_
- [FIXED] Addressed ``datetime.utcnow`` deprecation warning. `PR 1182 <https://github.com/arrow-py/arrow/pull/1182>`_
- [INTERNAL] Added codecov test results. `PR 1223 <https://github.com/arrow-py/arrow/pull/1223>`_
- [INTERNAL] Updated CI dependencies (actions/setup-python, actions/checkout, codecov/codecov-action, actions/cache).
- [INTERNAL] Added docstrings to parser.py. `PR 1010 <https://github.com/arrow-py/arrow/pull/1010>`_
- [INTERNAL] Updated Python versions support and bumped CI dependencies. `PR 1177 <https://github.com/arrow-py/arrow/pull/1177>`_
- [INTERNAL] Added dependabot for GitHub actions. `PR 1193 <https://github.com/arrow-py/arrow/pull/1193>`_
- [INTERNAL] Moved dateutil types to test requirements. `PR 1183 <https://github.com/arrow-py/arrow/pull/1183>`_
- [INTERNAL] Added documentation link for ``arrow.format``. `PR 1180 <https://github.com/arrow-py/arrow/pull/1180>`_
Links

Update asgiref from 3.8.1 to 3.11.1.

Changelog

3.11.1

-------------------

* SECURITY FIX CVE-2025-14550: There was a potential DoS vector for users of
the ``asgiref.wsgi.WsgiToAsgi`` adapter. Malicious requests, including an unreasonably
large number of values for the same header, could lead to resource exhaustion
when building the WSGI environment.

To mitigate this, the algorithm is changed to be more efficient, and
``WsgiToAsgi`` gains a new optional ``duplicate_header_limit`` parameter,
which defaults to 100. This specifies the number of times a single header may
be repeated before the request is rejected as malformed.

You may override ``duplicate_header_limit`` when configuring your application::

   application = WsgiToAsgi(wsgi_app, duplicate_header_limit=200)

Set ``duplicate_header_limit=None`` if you wish to disable this check.

* Fixed a regression in 3.11.0 in ``sync_to_async`` when wrapping a callable
with an attribute named ``context``. (537)

3.11.0

-------------------

* ``sync_to_async`` gains a ``context`` parameter, similar to those for
``asyncio.create_task``, ``TaskGroup`` &co, that can be used on Python 3.11+ to
control the context used by the underlying task.

The parent context is already propagated by default but the additional
control is useful if multiple ``sync_to_async`` calls need to share the same
context, e.g. when used with ``asyncio.gather()``.

3.10.0

-------------------

* Added AsyncSingleThreadContext context manager to ensure multiple AsyncToSync
invocations use the same thread. (511)

3.9.2

------------------

* Adds support for Python 3.14.

* Fixes wsgi.errors file descriptor in WsgiToAsgi adapter.

3.9.1

------------------

* Fixed deletion of Local values affecting other contexts. (523)

* Skip CPython specific garbage collection test on pypy. (521)

3.9.0

------------------

* Adds support for Python 3.13.

* Drops support for (end-of-life) Python 3.8.

* Fixes an error with conflicting kwargs between AsyncToSync and the wrapped
function. (471)

* Fixes Local isolation between asyncio Tasks. (478)

* Fixes a reference cycle in Local (508)

* Fixes a deadlock in CurrentThreadExecutor with nested async_to_sync →
sync_to_async → async_to_sync → create_task calls. (494)

* The ApplicationCommunicator testing utility will now return the task result
if it's already completed on send_input and receive_nothing. You may need to
catch (e.g.) the asyncio.exceptions.CancelledError if sending messages to
already finished consumers in your tests. (505)
Links

Update astroid from 3.3.5 to 4.1.2.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update astropy from 6.1.6 to 7.2.0.

Changelog

7.2.0

==========================


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.stack`` and similar numpy functions to
be applied on representations and differentials.

They can also be applied to coordinate frames and ``SkyCoord``, though
with 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()`` and ``search_around_sky()`` and the corresponding
``SkyCoord`` methods now have named attributes. [18459]

astropy.cosmology
^^^^^^^^^^^^^^^^^

- The trait ``astropy.cosmology.traits.CurvatureComponent`` has been added to work with
objects that have attributes and methods related to the global curvature. [18232]

- The trait ``astropy.cosmology.traits.HubbleParameter`` has been added to work with objects that have attributes and methods related to the Hubble parameter. [18271]

- The trait ``astropy.cosmology.traits.DarkEnergyComponent`` has 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.DarkMatterComponent`` has been added to work with
objects that have attributes and methods related to dark matter. [18760]

- The trait ``astropy.cosmology.traits.MatterComponent`` has been added to work with
objects that have attributes and methods related to matter density.
The trait ``astropy.cosmology.traits.BaryonComponent`` has been added to work with
objects that have attributes and methods related to baryonic matter.
The trait ``astropy.cosmology.traits.CriticalDensity`` has been added to work with
objects that have attributes and methods related to the critical density. [18769]

- The trait ``astropy.cosmology.traits.PhotonComponent`` has been added to work with objects that have attributes and methods related to photons. [18787]

- The trait ``astropy.cosmology.traits.TotalComponent`` has been added to work with objects that have attributes and methods related to the total density component of the universe. [18794]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- CDS table reader will find the metadata for gzipped tables in the accompanying ReadMe file. [18506]

astropy.io.fits
^^^^^^^^^^^^^^^

- Enable color and suggestion-on-typos in all ``argparse`` CLIs for Python 3.14
(``fitscheck``, ``fitsdiff``, ``fitsheader`` and ``fitsinfo``). [18151]

- Allow reading a FITS file hosted on a cloud resource like Amazon S3 via
``Table.read()``. This is done with a new ``fsspec_kwargs`` dict argument
that gets passed through to ``fsspec`` to access cloud resources. [18379]

- It is now possible to check the existence of ``Columns`` in ``ColDefs`` by 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
^^^^^^^^^^^^^^^^^^^

- Allow setting EXTNAME when writing a ``Table`` to a FITS file, e.g.
``tbl.write("filename.fits", name="CAT", append=True)``. [18470]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- Enable color and suggestion-on-typos in ``volint`` CLI for Python 3.14 [18151]

- Modified the constructor for ``astropy.io.votable.tree.TableElement`` to use the version configuration information from the parent ``VOTableFile`` instance. 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
^^^^^^^^^^^^^^^^

- Add support for unit change propagation through the ``|`` (model composition) operator,
using either `~astropy.modeling.compose_models_with_units` or by setting the
``unit_change_composition`` attribute on the model after composition. [17304]

astropy.nddata
^^^^^^^^^^^^^^

- The ``interpret_bit_flags`` function now strips whitespace from flag names. [18205]

astropy.samp
^^^^^^^^^^^^

- Enable color and suggestion-on-typos in ``samp_hub`` CLI for Python 3.14 [18151]

astropy.table
^^^^^^^^^^^^^

- Enable color and suggestion-on-typos in ``showtable`` CLI for Python 3.14 [18151]

- Added generic ``from_df`` and ``to_df`` methods to ``astropy.Table`` using
``narwhals``. These methods provide a unified interface for converting between
Astropy Tables and various DataFrame formats (pandas, polars, pyarrow, etc.)
through the narwhals library. The ``to_df`` method converts an Astropy Table
to any supported DataFrame format, while ``from_df`` creates an Astropy Table
from 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 ``units`` or ``descriptions`` of ``QTable`` and ``Table``
has 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 ``units`` and ``description`` arguments as a
``dict`` that specifies the units and descriptions for column names in
the table. Previously, if the input table did not contain a column that
was specified in the ``units`` or ``description`` dict, a ``ValueError``
was 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_indices`` properties. For example, for a table ``t``
which 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 where
``t["b"] == 2``. Doing this query using the previous syntax ``t.loc["b", 2]`` is
deprecated and this functionality is planned for removal in astropy 9.0.

In addition, support has been added for using ``.loc``, ``.iloc``, and ``.loc_indices``
with an index based on two or more key columns. Previously this raised a ``ValueError``. [18680]

astropy.time
^^^^^^^^^^^^

- Allow ``np.concatenate``, ``np.stack`` and similar numpy functions to
be applied on ``Time`` and ``TimeDelta`` instances. [18193]

- Add a new time format ``galex`` for 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
^^^^^^^^^^^^^

- Some unit formats have deprecated units and converting such units to strings
emits a warning.
The new ``deprecations`` parameter of the unit ``to_string()`` methods allows
automatically converting deprecated units (if possible), silencing the warnings
or raising them as errors instead. [18586]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Enable color and suggestion-on-typos in ``fits2bitmap`` CLI for Python 3.14 [18151]

- Added ``show_decimal_unit`` to ``set_major_formatter`` to control whether
or not units are shown in decimal mode. [18312]

- Added the methods ``set_visible()`` and ``set_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()``, and ``get_axislabel_visible()`` methods to get the visibility state of each coordinate element. [18443]

- Added an image interval option (``SymmetricInterval``) for specifying a
symmetric 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 ``wcslint`` CLI for Python 3.14 [18151]

- Added a ``perserve_units`` keyword argument to ``WCS`` to optionally request
that 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.concatenate`` and
``astropy.coordinates.concatenate_representations`` is now available using
``np.concatenate``. Hence, these functions are being deprecated, emitting an
``AstropyPendingDeprecationWarning`` starting with astropy 7.2. This will be
followed by a regular deprecation warning in astropy 8.0, and removal in 9.0. [18193]

- The ``matrix_utilities`` module was not included in the ``astropy`` API
documentation, 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()`` and
``rotation_matrix()`` have been made available from the ``astropy.coordinates``
namespace and should be imported from there.
Functions not available from the ``astropy.coordinate`` namespace are private
and 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()`` and ``matrix_utilites.is_rotation()`` are
deprecated without replacement.
``matrix_utilities.is_O3()`` is deprecated and the public
``is_rotation_or_reflection()`` function can be used as a replacement. [18418]

- The undocumented ``earth_orientation`` module has been removed. [18638]

- ``astropy`` prefers reading data required for ``EarthLocation.of_site()`` from
a local cache and tries downloading (and caching) the data from the Internet if
the cache is empty.
As a last resort ``astropy`` has so far read a small bundled data file that
provided data for Greenwich as the single entry, but now ``astropy`` will raise
an error. [18649]

astropy.io.registry
^^^^^^^^^^^^^^^^^^^

- ``UnifiedInputRegistry`` and ``UnifiedOutputRegistry``'s ``delay_doc_updates``
method's effect is disabled under Python's optimized mode (``-OO`` flag). [17572]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- Added a ``config`` property to ``astropy.io.votable.tree.VOTableFile``.
This property can be passed to the ``config`` parameter of constructors that need to know the associated VOTable version, such as ``TimeSys`` and ``CooSys``. [18366]

astropy.table
^^^^^^^^^^^^^

- Add additional detail to the text of the ``ValueError`` that is raised when
``pprint`` cannot parse a column format string. [17631]

- Selecting a table index in the ``.loc``, ``.iloc``, or ``.loc_indices`` properties by
passing 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 ``t`` has two indices on
columns ``"a"`` and ``"b"`` respectively, then ``t.loc["b", 2]`` (to find table rows
where ``t["b"] == 2``) is deprecated. This is replaced by ``t.loc.with_index("b")[2]``. [18680]

astropy.tests
^^^^^^^^^^^^^

- API changes towards a future deprecation of astropy test runner:

* ``astropy.tests.runner.keyword`` is 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``, and ``astropy.tests.runner.TestRunner``
 are now pending deprecation (``AstropyPendingDeprecationWarning``).
 This will also affect downstream ``packagename.test`` generated using ``TestRunner``.
 They may start to emit ``AstropyDeprecationWarning`` in 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.MergeStrategy`` no longer modifies the ``merge()``
methods of its subclasses at runtime to re-raise all exceptions as
``MergeConflictError``.
This does not affect the functionality of ``MergeStrategy`` subclasses within
the ``astropy`` metadata 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 in
future, giving arguments to this method will result in an error. [18792]


Bug Fixes
---------

astropy.config
^^^^^^^^^^^^^^

- ``get_config_dir()`` and ``get_cache_dir()`` now emit warnings in all cases
where the ``XDG_CACHE_HOME`` (``XDG_CONFIG_HOME``, respectively) environment
variable doesn't meet internal assumptions and is ignored as a result. [17934]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- The ``angle`` argument of the ``rotation_matrix()`` function can now be any
angle-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 ``fitscheck`` verify all HDUs before listing errors. [18574]

- Fix calculation of DATASUM/CHECKSUM for heap data in ``BinTableHDU``. [18681]

- Fixed a bug in ``fitsdiff`` script where failing to read a single file could
crash the entire program. A warning is now printed instead, and such files
are simply ignored. [18882]

astropy.io.misc
^^^^^^^^^^^^^^^

- Fixed a bug where writing a table to ECSV fails if meta
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``, and
``phys.temperature.dew`` which are now recognized when parsing UCDs with
``check_controlled_vocabulary=True``. [18483]

- Fixed a bug in ``add_data_origin_info()`` where ``content`` is ignored for some INFO names. [18771]

astropy.modeling
^^^^^^^^^^^^^^^^

- Fixed a bug in ``modeling.tabular`` models when the ``lookup_table`` is 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 ``numpy`` 2.

Don't upcast ``NDData`` unnecessarily when doing arithmetic involving a single
unit (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_wait`` raises a new ``SAMPProxyTimeoutError`` (derived from ``SAMPProxyError``) exception on timeout.
This allows client code to more easily distinguish timeouts from other kind of exceptions. [18169]

astropy.stats
^^^^^^^^^^^^^

- ``poisson_conf_interval`` ``kraft-burrows-nousek`` no 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.indices`` would show duplicates of the multi-column index, one for
each 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 ``QTable`` with a ``Quantity`` column. Previously, after adding
the index then indexed item access via with a ``Quantity`` or 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 ``Table`` to FITS files, if the table contained masked arrays of integers. [18818]

astropy.units
^^^^^^^^^^^^^

- The string representations of the liter with the different ``astropy`` unit
formatters 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 that
string too. [18723]

- The ``"ogip"`` unit formatter can now parse strings that include signed
fractions in the exponent, e.g. ``u.Unit("m**(-1/2)", format="ogip")``. [18776]

astropy.utils
^^^^^^^^^^^^^

- If ``numpy.msort()`` is called with a ``Masked`` array then ``astropy`` no
longer erroneously hides the deprecation warning (with ``numpy`` versions
1.24-1.26). [18173]

- For ``numpy < 2.0``, applying ``np.atleast_*d`` to iterables of most astropy
classes 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
^^^^^^^^^^^^^^^^^^^^^

- Fixed an image-normalization bug where the interval on a ``ImageNormalize``
instance could be ignored when plotting. [18590]

astropy.wcs
^^^^^^^^^^^

- Fixed a bug that caused world_to_array_index to return lists instead of Numpy arrays. [18730]

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 ``expat`` is 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]

7.1.1

==========================

Bug Fixes
---------

astropy.io.fits
^^^^^^^^^^^^^^^

- Writing zero-row BinTableHDU with string columns no longer raises a broadcast error in _ascii_encode() [18230]

- Compute maximum absolute and relative differences reported by ``ImageDataDiff``
on the full arrays instead of only a few values. [18451]

- Fix slicing FITS compressed file with ``.section`` when data is scaled. [18640]

astropy.io.misc
^^^^^^^^^^^^^^^

- Fixed a bug where coordinate frame objects could not be serialized to YAML. This caused
an exception when saving a ``SkyCoord`` object in particular frames like
``galactocentric`` in which frame attributes are themselves a frame. [18526]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- Fix handling of bounded variable-length char arrays in BINARY2 format which were previously treated as fixed length. [18105]

astropy.nddata
^^^^^^^^^^^^^^

- Fixed key error with numpy functions ``np.min``, ``np.max``, ``np.mean``, and ``np.sum``. [18424]

- Fix partial cutouts with FITS compressed file and scaled data. [18640]

astropy.table
^^^^^^^^^^^^^

- Fixed a bug in ``table.table_helpers.ArrayWrapper`` where byteorder of the
underlying data was not necessarily preserved through roundtrips. [18139]

- Fix bug 10732 where removing rows on an indexed table that was subsequently sliced
(e.g. ``t.add_index("a"); ts = t[1:5]; ts.remove_row(2)``) was giving incorrect results
or failing. [18511]

astropy.time
^^^^^^^^^^^^

- Ensure that the fast C parser for ``Time`` works also with numpy 2.3.0, fixing
a bug in our implementation which had no effect in previous numpy versions. [18265]

astropy.timeseries
^^^^^^^^^^^^^^^^^^

- Fixed the ``aggregate_downsample`` performance degradation when
non-default ``aggregate_func`` is used. [18188]

astropy.units
^^^^^^^^^^^^^

- Fixed the LaTeX representation of ``DexUnit`` in ``astropy.units``,
and thus also how it is represented in, e.g., jupyter notebooks. [18627]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Fix a bug that caused ``WCSAxes.get_transform`` to not return the correct
transform when using WCS instances with celestial axes that were not in
degrees. [18311]

- Fixed a bug that under certain conditions could lead to ticks being incorrectly
labelled with a single "$" dollar sign in WCSAxes. [18313]

- Fixed WCSAxes.get_transform() in the case of 1D WCS [18327]

- Fixed a bug that caused the default format unit to be incorrect for RA/Dec WCSes with non-degree units [18346]

- Fix a bug where the units of the ``values=`` keyword argument to ``set_ticks`` was not respected. [18577]

astropy.wcs
^^^^^^^^^^^

- Fixed an issue which caused calls to WCS coordinate conversion routines to not be thread-safe due to calls to WCS.wcs.set() from multiple threads. [16411]

- Fix a bug that caused the output of ``WCS.wcs.print_contents()`` to be truncated
and to then cause the output of subsequent ``print_contents()`` calls (on
``WCS.wcs`` or other wcs objects such as ``WCS.wcs.wtb``) to be corrupted. [18350]

- Fixed a bug in ``WCS.pixel_to_world`` for spectral WCS where ``restfrq`` was
defined but CTYPE was ``VOPT``, and likewise where ``restwav`` was defined but
CTYPE was ``VRAD``. [18352]

- Fixed a bug where world->pixel conversions did not work correctly on a 1D WCS
sliced via ``SlicedLowLevelWCS``. [18394]

- Fixed a bug that caused slicing of WCS objects with an ellipsis to not return a WCS
object but instead a SlicedLowLevelWCS object. [18417]

- Fixed a bug in ``wcs.py`` that caused the WCS object to not properly initialize
the `_naxis` attribute when the header was empty or did not contain any WCS
information. This could lead to crashes when attempting to take a slice of a 3D
WCS object or it could lead unexpected behavior when accessing pixel shape
or other properties that depend on the number of axes. [18419]

- Fixed a race condition when using the APE-14 API for the ``WCS`` class in a multi-threaded environment. [18692]


Performance Improvements
------------------------

astropy.modeling
^^^^^^^^^^^^^^^^

- Improved performance of ``modeling.rotations.spherical2cartesian()`` by 11-18% depending on the size of the input data arrays. [18238]


Other Changes and Additions
---------------------------

- Fixed errors with building the package from source on Windows via
``python -m build`` and similar commands. [18253]

- Pre-built binaries (wheels) for Linux are now built using the ``manylinux_2_28``
image (previously, ``manylinux2014`` was used). [18374]

7.1.0

==========================


New Features
------------

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- ``search_around_sky`` and ``search_around_3D`` now accept separations/distlimits
broadcastable to the same shape as ``coords1``. [17824]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- Add functionality to read and write to a Table from the TDAT format as part of
the Unified File Read/Write Interface. [16780]

- ``io.ascii`` now supports on-the-fly decompression of LZW-compressed files
(typically ".Z" extension) via the optional package uncompresspy. [17960]

astropy.io.fits
^^^^^^^^^^^^^^^

- Astropy can now not only read but also write headers that have ``HIERARCH``
keys with long values, by allowing the use of ``CONTINUE`` cards for those
(as was already the case for regular FITS keys). [17748]

- Add ``strip_spaces`` option to ``Table.read`` to strip trailing whitespaces in
string columns.  This will be activated by default in the next major release. [17777]

- ``io.fits`` now supports on-the-fly decompression of LZW-compressed files
(typically ".Z" extension) via the optional package uncompresspy. [17960]

- ``io.fits`` now supports on-the-fly decompression of LZMA-compressed files
(typically ".xz" extension) if the lzma module is provided by the Python
installation. [17968]

astropy.io.misc
^^^^^^^^^^^^^^^

- Add a fast ``Table`` CSV reader that uses the PyArrow ``read_csv()`` function. This can
be significantly faster and more memory-efficient than the ``astropy.io.ascii`` fast
reader. This new reader can be used with ``Table.read()`` by setting
``format="pyarrow.csv"``. [17706]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- New module ``astropy.io.votable.dataorigin`` to extract Data Origin information from INFO in VOTable. [17839]

- ``CooSys`` VOTable elements now have a method ``to_astropy_frame`` that returns the
corresponding astropy built-in frame, when possible. [17999]

astropy.modeling
^^^^^^^^^^^^^^^^

- Added a ``fit_info=`` keyword argument to ``parallel_fit_dask`` to allow users to preserve fit information from each individual fit. [17538]

astropy.nddata
^^^^^^^^^^^^^^

- Adds a utility class, ``astropy.nddata.Covariance``, used to construct, access,
and store covariance matrices.  The class depends on use of the ``scipy.sparse``
module. [16690]

- Add the ``limit_rounding_method`` parameter to `~astropy.nddata.Cutout2D`,
`~astropy.nddata.overlap_slices`, `~astropy.nddata.extract_array`, and
`~astropy.nddata.add_array` to allow users to specify the rounding method
used when calculating the pixel limits of the cutout. The default method
is to use `~numpy.ceil`. [17876]

astropy.table
^^^^^^^^^^^^^

- Document that ``Table.group_by``'s underlying sorting algorithm is guaranteed
to be stable. This reflects behavior that was already present but undocumented,
at least since astropy 6.0 . [17676]

astropy.timeseries
^^^^^^^^^^^^^^^^^^

- Downsampling now works correctly also on ``MaskedColumn`` and
``MaskedQuantity`` with possibly masked elements.  Furthermore, the type of
(Masked) column will now be properly preserved in downsampling. [18023]

astropy.units
^^^^^^^^^^^^^

- Units with the "micro" prefix can now be imported using ``"μ"`` in the name.
For example, the microgram can now be imported with
``from astropy.units import μg``. [17651]

- It is now possible to import angström, litre and ohm from ``astropy.units``
using the ``Å``, ``ℓ`` and ``Ω`` symbols. [17829]

- Unit conversions between kelvins and degrees Rankine no longer require the
``temperature`` equivalency. [17985]

astropy.utils
^^^^^^^^^^^^^

- Make commonly used Masked subclasses importable for ASDF support.

Registered types associated with ASDF converters must be importable by
their fully qualified name. Masked classes are dynamically created and have
apparent names like ``astropy.utils.masked.core.MaskedQuantity`` although
they aren't actually attributes of this module. Customize module attribute
lookup so that certain commonly used Masked classes are importable.

See:

- https://asdf.readthedocs.io/en/latest/asdf/extending/converters.html#entry-point-performance-considerations
- https://github.com/astropy/asdf-astropy/pull/253 [#17685]

- ``astropy.utils.data.download_file`` can now recover from a ``TimeoutError``
when given a list of alternative source URLs. Previously, only ``URLError``
exceptions were recoverable. An exception is still being raised after trying all
URLs provided if none of them could be reached. [17691]

- ``utils.data`` now supports on-the-fly decompression of LZW-compressed files
(typically ".Z" extension) via the optional package uncompresspy. [17960]


API Changes
-----------

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- On representations the method ``get_name`` has been deprecated in favor of the class-level
attribute ``name``. The method will be removed in a future release. [17503]

astropy.cosmology
^^^^^^^^^^^^^^^^^

- A new public module, ``astropy.cosmology.io``, has been added to provide support
for reading, writing, and converting cosmology instances.

The private modules ``astropy.cosmology.funcs``,
``astropy.cosmology.parameter``, ``astropy.cosmology.connect``,
``astropy.cosmology.core``, and ``astropy.cosmology.flrw`` have been deprecated.
Their functionality remains accessible in the `astropy.cosmology` module or in
the new ``astropy.cosmology.io`` module. [17543]

- Comoving distances now accept an optional 2nd argument, where the two-argument form is
the comoving distance between two redshifts. The one-argument form is the comoving
distance from redshift 0 to the input redshift. [17701]

- A new public module, ``astropy.cosmology.traits``, has been added to provide building
blocks for custom cosmologies. The currently available traits are:
- ``astropy.cosmology.traits.ScaleFactor``
- ``astropy.cosmology.traits.TemperatureCMB`` [17702]

astropy.extern
^^^^^^^^^^^^^^

- Astropy used to bundle the javascript libraries jQuery and DataTables for
interactive (e.g. sorting by column values) tables using the ``show_in_browser()``
method.
This bundling requires relatively large files in astropy itself, for a relatively minor feature.
Furthermore, the astropy developers are not experts in javascript development, and
javascript libraries many need updates to improve on security vulnerabilities.
This change removes the bundled versions of jQuery and DataTables from astropy,
updates the default version of the remote URLs to version 2.1.8 of DataTables, and
sets the default for ``show_in_browser(use_local_files=False)`` to use the remote versions
in all cases. If the method is called with ``use_local_files=True``, a warning is
displayed and remote version are used anyway.
This may break the use of the method when working offline, unless the javascript
files are cached by the browser from a previous online session. [17521]

astropy.table
^^^^^^^^^^^^^

- ``showtable`` CLI is now deprecated to avoid a name clash on Debian; use ``showtable-astropy`` instead. [18047]

- Fix issues in the handling of a call like ``tbl.loc[item]`` or ``tbl.loc_indices[item]``
and make the behavior consistent with pandas. Here ``tbl`` is a ``Table`` or ``QTable``
with an index defined.

If ``item`` is an empty list or zero-length ``np.ndarray`` or an empty slice, then
previously ``tbl.loc[item]`` would raise a ``KeyError`` exception. Now it returns the
zero-length table ``tbl[[]]``.

If ``item`` is a one-element list like ``["foo"]``, then previously
``tbl.loc[item]`` would return either a ``Row`` or a ``Table`` with multiple row,
depending on whether the index was unique. Now it always returns a ``Table``, consistent
with behavior for ``tbl.loc[[]]`` and ``tbl.loc[["foo", "bar"]]``.

See https://github.com/astropy/astropy/pull/18051 for more details. [#18051]

astropy.units
^^^^^^^^^^^^^

- Passing ``fraction='multiline'`` to ``unit.to_string()`` will no longer raise
an exception if the given format does not support multiline fractions, but
rather give a warning and use an inline fraction. [17374]

- Automatic conversion of a ``str`` or ``bytes`` instance to a unit when it is
multiplied or divided with an existing unit or quantity is deprecated. [17586]

- Accessing the contents of the ``units.deprecated`` module now emits deprecation
warnings.
The module may be removed in a future version. [17929]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- All arguments from ``simple_norm`` are marked as future keyword-only, with the
exception of the first two (``data`` and ``stretch``).
A warning is now displayed if any other arguments are passed positionally. [17489]


Bug Fixes
---------

astropy.io.fits
^^^^^^^^^^^^^^^

- Fix possible int overflow in the tile compression C code. [17995]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- In ``CooSys`` elements, the system was not checked for votable version 1.5 [17999]

astropy.samp
^^^^^^^^^^^^

- Fix setting logging level from the ``samp_hub`` command line.
Previously, ``samp_hub --log-level OFF`` was documented as supported but actually caused an exception to be raised.
The patch infers valid choices from the standard library's ``logging`` module.
A ``CRITICAL`` level will closely emulate the intended ``OFF`` setting. [17673]

astropy.table
^^^^^^^^^^^^^

- Initializing a Table with ``rows`` or ``data`` set to ``[]`` or a numpy array with
zero size (e.g., ``np.array([[], []])``) is now equivalent to
``Table(data=None, ...)`` and creates a table with no data values. This allows
defining the table names and/or dtype when creating the table, for instance:
``Table(rows=[], names=["a", "b"], dtype=[int, float])``. Previously this
raised an exception. [17717]

- Fix issues in the handling of a call like ``tbl.loc[item]`` or ``tbl.loc_indices[item]``
and make the behavior consistent with pandas. Here ``tbl`` is a ``Table`` or ``QTable``
with an index defined.

If ``item`` is an empty list or zero-length ``np.ndarray`` or an empty slice, then
previously ``tbl.loc[item]`` would raise a ``KeyError`` exception. Now it returns the
zero-length table ``tbl[[]]``.

If ``item`` is a one-element list like ``["foo"]``, then previously
``tbl.loc[item]`` would return either a ``Row`` or a ``Table`` with multiple row,
depending on whether the index was unique. Now it always returns a ``Table``, consistent
with behavior for ``tbl.loc[[]]`` and ``tbl.loc[["foo", "bar"]]``.

See https://github.com/astropy/astropy/pull/18051 for more details. [#18051]

astropy.timeseries
^^^^^^^^^^^^^^^^^^

- Made ``TimeSeries.from_pandas`` and ``BinnedTimeSeries.read`` more robust to
subclassing. [17351]

astropy.units
^^^^^^^^^^^^^

- For the Angstrom unit in the CDS module, ``u.cds.Angstrom``, the string
representation is now "Angstrom" (instead of "AA"), consistent with what was
always the case for ``u.Angstrom``, and conformant with the CDS standard. [17536]

- Previously the string representation of the ``solMass`` unit in the ``"cds"``
format depended on whether the unit was imported directly from ``units`` or
from ``units.cds``.
Although both representations were valid according to the CDS standard, the
inconsistency was nonetheless needlessly surprising.
The representation of ``units.cds.solMass`` has been changed to match the
representation of ``units.solMass``. [17560]

- The degrees Rankine is now represented as "$\mathrm{{}^{\circ}R}$" in the
``"latex"`` and ``"latex_inline"`` formats and as "°R" in the ``"unicode"``
format. [18049]

astropy.utils
^^^^^^^^^^^^^

- Properly detect invalid LZMA files in ``utils.data``. [17984]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Fixed an issue when using ``plot_coord`` after slicing the ``WCS`` object coordinates. [18005]


Performance Improvements
------------------------

astropy.timeseries
^^^^^^^^^^^^^^^^^^

- Improved the ``aggregate_downsample`` performance using a new default ``aggregate_func``. [17574]

astropy.units
^^^^^^^^^^^^^

- Converting strings to units with ``Unit()`` is now up to 225% faster. [17399]

- ``UnitBase.compose()`` is now 20% faster. [17425]


Other Changes and Additions
---------------------------

- After ``import astropy``, ``dir(astropy)`` will now list all subpackages,
including those that have not yet been loaded. This also means tab
completion will work as expected (e.g., ``from astropy.coo<TAB>`` will
expand to ``from astropy.coordinates``). [17598]

- Updated bundled WCSLIB version to 8.4, fixing issues in ``wcs_chksum``
and ``wcs_fletcher32``. For a full list of changes - see
``astropy/cextern/wcslib/CHANGES``. [17886]

7.0.2

==========================

Bug Fixes
---------

astropy.config
^^^^^^^^^^^^^^

- Fix a bug where config file generation did not parse nested subclasses of ``astropy.config.ConfigNamespace``. [18107]

astropy.io.fits
^^^^^^^^^^^^^^^

- Fix a bug in ``nddata.Cutout2D`` when creating partial cutouts of ``Section`` objects by adding a ``dtype`` property to the ``Section`` class. [17611]

- Fixed a bug so that now the scaling state from the source HDU to the new appended HDU is copied on the
destination file, when the HDU is read with ``do_not_scale_image_data=True``. [17642]

- Fix setting a slice on table rows (``FITS_record``). [17737]

- Fix checksum computation for tables with VLA columns, when table is loaded in
memory. [17806]

- Fix ``.fileinfo()`` for compressed HDUs. [17815]

- Fix FITS_rec repr when a column has scaling factors, leading to a crash with
numpy>=2.0. [17933]

- Fixed a bug that caused THEAP, ZBLANK, ZSCALE, and ZZERO to not be correctly
removed during decompression of tile-compressed FITS files. [18072]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- ``astropy`` v7.0.0 erroneously refused to write a VOTable if it contained units that
could not be represented in the CDS format.
Now ``astropy`` correctly chooses the unit format based on the VOTable version.
The bug in question did not cause any corruption in tables that were successfully
written because the newer VOUnit format is backwards compatible with the CDS format.
Furthermore, any unit that is in neither formats would still be written out
but would issue a warning. [17570]

- ``unicodeChar`` fields can now be of bounded variable size (``arraysize="10*``). [18075]

astropy.modeling
^^^^^^^^^^^^^^^^

- Fixed an issue where the ``filter_non_finite`` option was not working
for 2D models. An error is raised when the ``filter_non_finite`` option
is set to ``True`` and all values are non-finite. [17869]

astropy.stats
^^^^^^^^^^^^^

- Now ``bayesian_blocks(t, x, fitness="events")`` correctly handles the case
when the input data ``x`` contains zeros. [17800]

astropy.table
^^^^^^^^^^^^^

- Prevent corrupting a column by mutating its name to an invalid type.
A ``TypeError`` is now raised when a name is set to anything other than a
string. [17450]

- Fix a bug in creating a ``Table`` from a list of rows that dropped the units
of non-scalar Quantity, e.g., ``Table(rows=[([1] * u.m,), ([2] * u.m,)])``. [17936]

astropy.units
^^^^^^^^^^^^^

- Ensured that the units of ``yp``, ``refa`` and ``refb`` are properly
taken into account when calling ``erfa.apio`` (previously, the
conversion required for ``xp`` was applied to those inputs too). [17742]

- The machinery that injects units into a namespace (used e.g. by ``def_unit()``)
now applies NFKC normalization to unit names when checking for name collisions.
This prevents name collisions if the namespace belongs to a module and the unit
is accessed as an attribute of that module. [17853]

- The string representations of the prefixed versions of ``solLum``, ``solMass``
and ``solRad`` units can now be parsed by default.
Previously they could only be parsed if the ``required_by_vounit`` module had
been imported, possibly indirectly by using the ``"vounit"`` format. [17868]

astropy.utils
^^^^^^^^^^^^^

- Prevent corrupting a mixin column's ``info`` attribute by mutating its name to
an invalid type. A ``TypeError`` is now raised when a name is set to anything
other than a string. [17450]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Ensure that the ``astropy.visualization.wcsaxes.custom_ucd_coord_meta_mapping``
context manager performs a (correct) cleanup. [17749]

- Fixed interval classes for masked input (``MaskedArray`` and ``MaskedNDArray``). [17927]

- Fixed the limits of ``a`` parameter in the ``PowerDistStretch``
and ``InvertedPowerDistStretch`` classes so that a value of
0 in no longer allowed. That value gives infinity values in
``InvertedPowerDistStretch`` and it makes the ``PowerDistStretch``
results independent of the input data. [17941]

- Fixed an issue where LinearStretch values were not being clipped to
[0:1] when ``clip=True``. [17943]

astropy.wcs
^^^^^^^^^^^

- Fix UCD for air wavelengths, following the IVOA recommendation that ``'em.wl'``
be reserved for vacuum wavelengths. ``'em.wl;obs.atmos'`` is now used to
represent air wavelengths instead. [17769]


Other Changes and Additions
---------------------------

- Updated the bundled CFITSIO library to 4.6.0. [17904]

7.0.1

==========================

API Changes
-----------

astropy.table
^^^^^^^^^^^^^

- The use of the keyword ``use_local_files`` for the js viewer in
``astropy.table.Table.show_in_browser`` is now deprecated. Starting in Astropy
7.1 this keyword will be ignored and use of it will issue a warning. The
default behavior will be to use the remote versions of jQuery and DataTables
from a CDN. [17480]

Bug Fixes
---------

astropy.config
^^^^^^^^^^^^^^

- With ``astropy`` v7.0.0 the cache directory cannot be customized with the
``XDG_CACHE_HOME`` environment variable.
Instead, ``XDG_CONFIG_HOME`` erroneously controls both configuration and cache
directories.
The correct pre-v7.0.0 behaviour has been restored, but it is possible that
``astropy`` v7.0.0 has written cache files to surprising locations.
Concerned users can use the ``get_cache_dir_path()`` function to check where
the cache files are written.

The bug in question does not affect systems where the ``XDG_CACHE_HOME`` and
``XDG_CONFIG_HOME`` environment variables are unset. [17514]

as

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant