Skip to content

Commit 30a4ecb

Browse files
committed
Change the message of the DALOverflowWarning when overflow is encountered
1 parent 447cade commit 30a4ecb

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Enhancements and Fixes
88

99
- Fix job result handling to prioritize standard URL structure [#684]
1010

11+
- Fix DALOverflowWarning error message to only indicate the cause as limits from user or server. [#689]
12+
1113
Deprecations and Removals
1214
-------------------------
1315

docs/dal/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ you reach the ``maxrec`` limit:
354354
.. doctest-remote-data::
355355

356356
>>> tap_results = tap_service.search("SELECT * FROM arihip.main", maxrec=5) # doctest: +SHOW_WARNINGS
357-
DALOverflowWarning: Partial result set. Potential causes MAXREC, async storage space, etc.
357+
DALOverflowWarning: Result set limited by user- or server-supplied MAXREC parameter.
358358

359359
Services will not let you raise maxrec beyond the hard match limit:
360360

pyvo/dal/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def __init__(self, votable, *, url=None, session=None):
338338
raise DALQueryError(self._status[1], self._status[0], url)
339339

340340
if self._status[0].lower() == "overflow":
341-
warn("Partial result set. Potential causes MAXREC, async storage space, etc.",
341+
warn("Result set limited by user- or server-supplied MAXREC parameter.",
342342
category=DALOverflowWarning)
343343

344344
self._resultstable = self._findresultstable(votable)

pyvo/registry/tests/test_regtap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def test_maxrec():
712712
with pytest.warns(DALOverflowWarning) as w:
713713
_ = regsearch(servicetype="tap", maxrec=1)
714714
assert len(w) == 1
715-
assert str(w[0].message).startswith("Partial result set.")
715+
assert str(w[0].message).startswith("Result set limited")
716716

717717

718718
@pytest.mark.remote_data

0 commit comments

Comments
 (0)