[Python-ideas] Displaying DeprecationWarnings in the interactive interpreter, second try

Brett Cannon brett at python.org
Thu May 28 16:45:01 CEST 2015


On Thu, May 28, 2015 at 10:28 AM Gregory P. Smith <greg at krypto.org> wrote:

>
>
> On Thu, May 28, 2015, 1:26 AM M.-A. Lemburg <mal at egenix.com> wrote:
>
>> On 28.05.2015 02:29, Nathaniel Smith wrote:
>> > Hi all,
>> >
>> > I'm tired of getting bug reports like this one:
>> >
>> >   https://github.com/numpy/numpy/issues/5919
>>
>> Well, in that particular case, I think numpy should raise a TypeError
>> instead of a DeprecationWarning :-)
>>
>> > where the issue is just that the user didn't see deprecation warnings,
>> > so I just filed a bug report requesting that the interactive Python
>> > REPL start printing DeprecationWarnings when users use deprecated
>> > functionality:
>> >
>> >   https://bugs.python.org/issue24294
>>
>> +1 on the general idea, but I think this needs some more thought
>> on the topic of how you detect an interactive session that's being
>> used by a user.
>>
>> You wouldn't want these warning to show up when piping in commands
>> to a Python interpreter.
>>
>> In eGenix PyRun we use sys.stdin.isatty() to check whether we
>> want an interactive prompt or not. I guess the same could be done
>> here.
>>
>> --
>> Marc-Andre Lemburg
>> eGenix.com
>>
>> Professional Python Services directly from the Source  (#1, May 28 2015)
>> >>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>> >>> mxODBC Plone/Zope Database Adapter ...       http://zope.egenix.com/
>> >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
>> ________________________________________________________________________
>>
>> ::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::
>>
>>    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
>>     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>>            Registered at Amtsgericht Duesseldorf: HRB 46611
>>                http://www.egenix.com/company/contact/
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> +1
>

+1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150528/8be5b29a/attachment.html>


More information about the Python-ideas mailing list