Opened 6 years ago

Closed 5 years ago

#17566 closed defect (wontfix)

Allow verbosity levels larger than 2

Reported by: mmezzarobba Owned by:
Priority: trivial Milestone: sage-duplicate/invalid/wontfix
Component: documentation Keywords:
Cc: Merged in:
Authors: Marc Mezzarobba Reviewers: Nathann Cohen, Andrey Novoseltsev
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mmezzarobba)

The documentation of sage.misc.set_verbose states that verbosity levels should be between 0 and 2, but this is apparently not enforced, and higher levels could be useful.

Change History (10)

comment:1 Changed 6 years ago by mmezzarobba

  • Branch set to u/mmezzarobba/set_verbose
  • Commit set to 8a1153d3c2f28a2a1c12a32faab39142bfd24fcf
  • Status changed from new to needs_review
Last edited 6 years ago by mmezzarobba (previous) (diff)

comment:2 Changed 6 years ago by mmezzarobba

  • Authors set to Marc Mezzarobba
  • Description modified (diff)

comment:3 follow-up: Changed 6 years ago by ncohen

  • Branch changed from u/mmezzarobba/set_verbose to public/17566
  • Commit changed from 8a1153d3c2f28a2a1c12a32faab39142bfd24fcf to 519e30e4fbee295d26d9cf0b0c325d0c4682e7bb
  • Reviewers set to Nathann Cohen

Hello !

I modified the sentence a bit to mean that the lowest level of verbosity is 0, not 1. Is that okay for you ?

Nathann


New commits:

519e30etrac #17566: Review

comment:4 in reply to: ↑ 3 Changed 6 years ago by mmezzarobba

  • Status changed from needs_review to positive_review

Replying to ncohen:

I modified the sentence a bit to mean that the lowest level of verbosity is 0, not 1. Is that okay for you ?

Sure.

comment:5 follow-up: Changed 6 years ago by novoselt

  • Status changed from positive_review to needs_work

Actually, this is from the documentation of plot

   Sage currently ignores points that cannot be evaluated

      sage: set_verbose(-1)
      sage: plot(-x*log(x), (x,0,1))  # this works fine since the failed endpoint is just skipped.
      Graphics object consisting of 1 graphics primitive
      sage: set_verbose(0)

Note that verbosity is set to -1 and it DOES make a difference of suppressing annoying warnings. Perhaps it should be mentioned in this functions as well.

comment:6 in reply to: ↑ 5 Changed 6 years ago by mmezzarobba

Replying to novoselt:

Note that verbosity is set to -1 and it DOES make a difference of suppressing annoying warnings. Perhaps it should be mentioned in this functions as well.

Yes, apparently several sage modules call get_verbose() directly and interpret negative values. But at a quick glance the meaning of negative verbosity levels does not look very consistent. Sure, it would be nice to make it consistent and document it (and perhaps rewrite the whole verbosity system to make it more powerful), but that's more work than the minimal fix in this ticket and I don't have time for that right now. Please feel free to update the docstring yourself if you have a clear idea of what it should say, repurpose this ticket for clarifying the meaning of verbosity levels outside 0..2, or set it to wontfix depending what you think is appropriate!

comment:7 Changed 5 years ago by vdelecroix

  • Summary changed from Allow verbosity levels larger than 2 to Allow verbosity levels larger than 2

Just removing some nasty characters in the title (causes trouble to the patchbots). I was not able to fix the patchbot code.

comment:8 Changed 5 years ago by mmezzarobba

  • Milestone changed from sage-6.5 to sage-duplicate/invalid/wontfix
  • Status changed from needs_work to needs_review

As someone (Volker?) observed as part of another discussion, it would probably be better to simply get rid of sage.misc.verbose and use python's logging module instead.

comment:9 Changed 5 years ago by novoselt

  • Branch public/17566 deleted
  • Commit 519e30e4fbee295d26d9cf0b0c325d0c4682e7bb deleted
  • Reviewers changed from Nathann Cohen to Nathann Cohen, Andrey Novoseltsev
  • Status changed from needs_review to positive_review

Great point.

comment:10 Changed 5 years ago by vbraun

  • Resolution set to wontfix
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.