[prev in list] [next in list] [prev in thread] [next in thread]
List: python-ideas
Subject: Re: [Python-ideas] Displaying DeprecationWarnings in the interactive interpreter, second try
From: Brett Cannon <brett () python ! org>
Date: 2015-05-28 14:45:01
Message-ID: CAP1=2W6GjOS+i1rrACERzp5udO5mR=yeYkd=EO8Q5xKkosvmGQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Thu, May 28, 2015 at 10:28 AM Gregory P. Smith <greg@krypto.org> wrote:
>
>
> On Thu, May 28, 2015, 1:26 AM M.-A. Lemburg <mal@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@python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> +1
>
+1
[Attachment #5 (text/html)]
<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, May 28, 2015 \
at 10:28 AM Gregory P. Smith <<a \
href="mailto:greg@krypto.org">greg@krypto.org</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><p dir="ltr"><br> </p>
<br><div class="gmail_quote">On Thu, May 28, 2015, 1:26 AM M.-A. Lemburg <<a \
href="mailto:mal@egenix.com" target="_blank">mal@egenix.com</a>> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">On 28.05.2015 02:29, Nathaniel Smith wrote:<br> > Hi \
all,<br> ><br>
> I'm tired of getting bug reports like this one:<br>
><br>
> <a href="https://github.com/numpy/numpy/issues/5919" \
target="_blank">https://github.com/numpy/numpy/issues/5919</a><br> <br>
Well, in that particular case, I think numpy should raise a TypeError<br>
instead of a DeprecationWarning :-)<br>
<br>
> where the issue is just that the user didn't see deprecation warnings,<br>
> so I just filed a bug report requesting that the interactive Python<br>
> REPL start printing DeprecationWarnings when users use deprecated<br>
> functionality:<br>
><br>
> <a href="https://bugs.python.org/issue24294" \
target="_blank">https://bugs.python.org/issue24294</a><br> <br>
+1 on the general idea, but I think this needs some more thought<br>
on the topic of how you detect an interactive session that's being<br>
used by a user.<br>
<br>
You wouldn't want these warning to show up when piping in commands<br>
to a Python interpreter.<br>
<br>
In eGenix PyRun we use sys.stdin.isatty() to check whether we<br>
want an interactive prompt or not. I guess the same could be done<br>
here.<br>
<br>
--<br>
Marc-Andre Lemburg<br>
eGenix.com<br>
<br>
Professional Python Services directly from the Source (#1, May 28 2015)<br>
>>> Python Projects, Coaching and Consulting ... <a \
href="http://www.egenix.com/" target="_blank">http://www.egenix.com/</a><br> \
>>> mxODBC Plone/Zope Database Adapter ... <a \
href="http://zope.egenix.com/" target="_blank">http://zope.egenix.com/</a><br> \
>>> mxODBC, mxDateTime, mxTextTools ... <a \
href="http://python.egenix.com/" target="_blank">http://python.egenix.com/</a><br> \
________________________________________________________________________<br> <br>
> > > > > Try our mxODBC.Connect Python Database Interface for free ! ::::::<br>
<br>
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48<br>
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg<br>
Registered at Amtsgericht Duesseldorf: HRB 46611<br>
<a href="http://www.egenix.com/company/contact/" \
target="_blank">http://www.egenix.com/company/contact/</a><br> \
_______________________________________________<br> Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" \
target="_blank">Python-ideas@python.org</a><br> <a \
href="https://mail.python.org/mailman/listinfo/python-ideas" \
target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br> Code of \
Conduct: <a href="http://python.org/psf/codeofconduct/" \
target="_blank">http://python.org/psf/codeofconduct/</a><br> </blockquote></div><p \
dir="ltr">+1</p></blockquote><div><br></div><div>+1 </div></div></div>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic