Skip to content

Commit e72a319

Browse files
authored
Merge pull request #175 from python-astrodynamics/feature/prepare-2.1.0
Prepare 2.1.0
2 parents a4dc48f + 19211f4 commit e72a319

19 files changed

Lines changed: 37 additions & 24 deletions

docs/changelog.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,41 @@ Change Log
77

88
.. towncrier release notes start
99
10+
`2.1.0 <https://github.com/python-astrodynamics/spacetrack/releases/tag/2.1.0>`_ - 2026-08-23
11+
---------------------------------------------------------------------------------------------
12+
13+
Changed
14+
~~~~~~~
15+
16+
- Predicate caching for keyword validation now works when using :class:`~spacetrack.aio.AsyncSpaceTrackClient` with trio.
17+
Previously, the on-disk cache was skipped because the file locking implementation only supported asyncio. (`#160 <https://github.com/python-astrodynamics/spacetrack/issues/160>`_)
18+
- :class:`~spacetrack.aio.AsyncSpaceTrackClient` no longer performs blocking cache file reads and writes on the event loop; they now run in a worker thread. (`#160 <https://github.com/python-astrodynamics/spacetrack/issues/160>`_)
19+
- Rate limit waits now guarantee that the ``callback`` has finished before the request is retried, in all clients.
20+
As a result, an exception raised by the callback now propagates instead of being silently discarded: directly in :class:`~spacetrack.base.SpaceTrackClient`, and as an :class:`ExceptionGroup` on asyncio, matching the existing trio behaviour. (`#160 <https://github.com/python-astrodynamics/spacetrack/issues/160>`_)
21+
- When the Space-Track session expires (after two hours without requests), the client now logs in again and retries the request transparently instead of failing every subsequent request. (`#164 <https://github.com/python-astrodynamics/spacetrack/issues/164>`_)
22+
- Sets and frozensets are now accepted as predicate values and joined with commas like sequences.
23+
Bytes-like values now raise :class:`TypeError` instead of being sent as comma-separated integers. (`#169 <https://github.com/python-astrodynamics/spacetrack/issues/169>`_)
24+
25+
26+
Fixed
27+
~~~~~
28+
29+
- :class:`~spacetrack.aio.AsyncSpaceTrackClient` now accepts a plain function as the rate limit ``callback``, as shown in the documentation, in addition to a coroutine function. (`#160 <https://github.com/python-astrodynamics/spacetrack/issues/160>`_)
30+
- Concurrent first requests on a fresh client now share a single login request instead of each sending their own. (`#161 <https://github.com/python-astrodynamics/spacetrack/issues/161>`_)
31+
- Model definition requests are now rate limited like all other requests. (`#163 <https://github.com/python-astrodynamics/spacetrack/issues/163>`_)
32+
- Requests sent after a rate limit wait are now counted against the rate limit.
33+
Previously they were not, so sustained use could exceed Space-Track's limits and trigger server-side rate limit errors. (`#163 <https://github.com/python-astrodynamics/spacetrack/issues/163>`_)
34+
- :meth:`SpaceTrackClient.close() <spacetrack.base.SpaceTrackClient.close>` and :meth:`AsyncSpaceTrackClient.close() <spacetrack.aio.AsyncSpaceTrackClient.close>` now close the underlying HTTPX client even if logging out fails. (`#166 <https://github.com/python-astrodynamics/spacetrack/issues/166>`_)
35+
- Setting ``base_url`` now resets the authentication state and the cached predicates, which are specific to the previous host. (`#166 <https://github.com/python-astrodynamics/spacetrack/issues/166>`_)
36+
- Fixed a :class:`ReferenceError` when chaining a request off a temporary client, e.g. ``SpaceTrackClient(...).basicspacedata.gp(...)``. (`#167 <https://github.com/python-astrodynamics/spacetrack/issues/167>`_)
37+
- :meth:`~spacetrack.base.SpaceTrackClient.get_predicates` now returns the known predicates for request classes without a model definition on Space-Track (such as ``fileshare/download`` and ``publicfiles/dirs``) instead of failing.
38+
The returned :class:`~spacetrack.base.Predicate` objects have a ``type_`` of ``None``, since no model definition exists to provide it. (`#168 <https://github.com/python-astrodynamics/spacetrack/issues/168>`_)
39+
- ``parse_types=True`` now works together with ``metadata=True`` in :meth:`~spacetrack.base.SpaceTrackClient.generic_request` and the request class methods; previously the metadata-wrapped response made it fail after the request had succeeded. (`#170 <https://github.com/python-astrodynamics/spacetrack/issues/170>`_)
40+
- Fixed a :class:`TypeError` when passing positional arguments to request class methods such as ``client.gp_history(...)``.
41+
The request class was bound as a keyword argument internally, so any positional argument clashed with it. (`#171 <https://github.com/python-astrodynamics/spacetrack/issues/171>`_)
42+
- Error responses whose JSON ``error`` value is not a string no longer raise :class:`TypeError` instead of ``httpx2.HTTPStatusError``. (`#172 <https://github.com/python-astrodynamics/spacetrack/issues/172>`_)
43+
44+
1045
`2.0.0 <https://github.com/python-astrodynamics/spacetrack/releases/tag/2.0.0>`_ - 2026-08-10
1146
---------------------------------------------------------------------------------------------
1247

newsfragments/160.changed.2.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

newsfragments/160.changed.3.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/160.changed.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

newsfragments/160.fixed.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/161.fixed.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/163.fixed.2.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/163.fixed.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

newsfragments/164.changed.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/166.fixed.2.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)