Remove unnecessary docstring warnings?

40 views
Skip to first unread message

John H Palmieri

unread,
Sep 21, 2023, 4:57:01 PMSep 21
to sage-devel
When running Sage, if I look at some docststrings by doing foo.bar?, I see at the top

WARNING: the enclosing module is marked 'needs sage.graphs', so doctests may not pass.

Of course my copy of Sage has (as far as I know!) a working copy of sage.graphs. Should this warning only be printed conditionally when the module is missing? I took a quick look and didn't see a relevant ticket, but I might very well have missed it.

--
John

Nils Bruin

unread,
Sep 22, 2023, 11:41:29 AMSep 22
to sage-devel
I think that warning is not formulated optimally, regardless of when it gets shown. Aren't the docstrings meant as user documentation? The average user probably doesn't care about whether "doctests pass" and may not even know what that means. Presumably, the marker is there because the module needs sage.graphs to function properly. So a warning about a missing stated prerequisite is more in order, possibly with a pointer to documentation how to get it.

It seems a strange warning to me anyway, since sage.graphs is a standard module. Sage is seriously defective if it's missing.
Reply all
Reply to author
Forward
0 new messages