On 25 February 2015 at 09:55, Steven D'Aprano firstname.lastname@example.org wrote:
I think there are three questions that should be asked:
(1) How does one easy and simply enable warnings in the interactive interpeter?
(2) If they are enabled by default, how does one easily and simply disable the again? E.g. from the command line itself, or from your PYTHONSTARTUP file.
(3) Should they be enabled?
I can't give an opinion on (3) until I know the answer to (1) and (2). I tried looking at the warnings module and the sys module but nothing stands out to me.
Agreed. Also, what about 3rd party REPLs like IPython? Will they be affected by the change, and will the enabling/disabling mechanism work for them? (e.g. I don't think IPython checks PYTHONSTARTUP).
Another question which should probably be answered, how many deprecation warnings are / would be active when this change is made? One of the reasons for the change is clearly that deprecation warnings aren't very easy to see at the moment, but that does mean it's difficult to assess the impact of this change.