[sage-support] Re: Question about a deprecation warning
On Saturday, July 11, 2020 at 3:31:15 AM UTC+9 John H Palmieri wrote: > Does IPython have a preparser? > I suspected Sage's preparser. I was wrong. You are right: (even out of Sage) Hera:~$ PYTHONWARNINGS=always ipython Python 3.8.3 (default, May 27 2020, 20:54:22) Type 'copyright', 'credits' or 'license' for more information IPython 7.15.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: '\i' :1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i <>:1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i '\i' Out[1]: '\\i' -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/001feb4e-8c7c-4c77-88ee-d727bd1bf2d9n%40googlegroups.com.
[sage-support] Re: Question about a deprecation warning
Does IPython have a preparser? On Thursday, July 9, 2020 at 11:43:36 PM UTC-7, Kwankyu wrote: > > Because of the preparser? > > On Thursday, July 2, 2020 at 9:19:58 AM UTC+9 John H Palmieri wrote: > >> >> >> On Wednesday, July 1, 2020 at 4:39:12 PM UTC-7, John H Palmieri wrote: >>> >>> >>> >>> On Wednesday, July 1, 2020 at 2:22:49 PM UTC-7, Antonio Rojas wrote: El miércoles, 1 de julio de 2020, 21:06:43 (UTC+2), John H Palmieri escribió: > > > Why so many deprecation warnings? I think they're coming from plain > Python; why doesn't Python print the warnings? > > > Because python ignores deprecation warnings, https://docs.python.org/3/library/warnings.html#default-warning-filter >>> >>> Thanks, that's helpful. But why does Sage print the warning so many >>> times? If I turn on Python's deprecation warnings, I just see one warning >>> message, not six of them. >>> >>> >> I guess this is in turn an IPython thing, although I don't know why >> IPython prints the warning 6 times, and also repeats my original command. >> With warnings enabled, I evaluated '\i' once: >> >> % PYTHONWARNINGS=always sage --ipython >> ... >> IPython 5.8.0 -- An enhanced Interactive Python. >> ? -> Introduction and overview of IPython's features. >> %quickref -> Quick reference. >> help -> Python's own help system. >> object? -> Details about 'object', use 'object??' for extra details. >> >> In [1]: '\i':1: DeprecationWarning: invalid escape sequence \i >> :1: DeprecationWarning: invalid escape sequence \i >> :1: DeprecationWarning: invalid escape sequence \i >> In [1]: '\i' >> >> :1: DeprecationWarning: invalid escape sequence \i >> :1: DeprecationWarning: invalid escape sequence \i >> :1: DeprecationWarning: invalid escape sequence \i >> :1: DeprecationWarning: invalid escape >> sequence \i >> '\i' >> Out[1]: '\\i' >> >> >> >> -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/81516c8f-1161-4507-b5a1-5c7198ffa49ao%40googlegroups.com.
[sage-support] Re: Question about a deprecation warning
Because of the preparser? On Thursday, July 2, 2020 at 9:19:58 AM UTC+9 John H Palmieri wrote: > > > On Wednesday, July 1, 2020 at 4:39:12 PM UTC-7, John H Palmieri wrote: >> >> >> >> On Wednesday, July 1, 2020 at 2:22:49 PM UTC-7, Antonio Rojas wrote: >>> >>> >>> >>> El miércoles, 1 de julio de 2020, 21:06:43 (UTC+2), John H Palmieri >>> escribió: Why so many deprecation warnings? I think they're coming from plain Python; why doesn't Python print the warnings? >>> Because python ignores deprecation warnings, >>> https://docs.python.org/3/library/warnings.html#default-warning-filter >>> >> >> Thanks, that's helpful. But why does Sage print the warning so many >> times? If I turn on Python's deprecation warnings, I just see one warning >> message, not six of them. >> >> > I guess this is in turn an IPython thing, although I don't know why > IPython prints the warning 6 times, and also repeats my original command. > With warnings enabled, I evaluated '\i' once: > > % PYTHONWARNINGS=always sage --ipython > ... > IPython 5.8.0 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object', use 'object??' for extra details. > > In [1]: '\i':1: DeprecationWarning: invalid escape sequence \i > :1: DeprecationWarning: invalid escape sequence \i > :1: DeprecationWarning: invalid escape sequence \i > In [1]: '\i' > > :1: DeprecationWarning: invalid escape sequence \i > :1: DeprecationWarning: invalid escape sequence \i > :1: DeprecationWarning: invalid escape sequence \i > :1: DeprecationWarning: invalid escape > sequence \i > '\i' > Out[1]: '\\i' > > > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/0534d604-38c6-4c47-8294-b07fa9835d42n%40googlegroups.com.
[sage-support] Re: Question about a deprecation warning
On Wednesday, July 1, 2020 at 4:39:12 PM UTC-7, John H Palmieri wrote: > > > > On Wednesday, July 1, 2020 at 2:22:49 PM UTC-7, Antonio Rojas wrote: >> >> >> >> El miércoles, 1 de julio de 2020, 21:06:43 (UTC+2), John H Palmieri >> escribió: >>> >>> >>> Why so many deprecation warnings? I think they're coming from plain >>> Python; why doesn't Python print the warnings? >>> >>> >>> >> Because python ignores deprecation warnings, >> https://docs.python.org/3/library/warnings.html#default-warning-filter >> > > Thanks, that's helpful. But why does Sage print the warning so many times? > If I turn on Python's deprecation warnings, I just see one warning message, > not six of them. > > I guess this is in turn an IPython thing, although I don't know why IPython prints the warning 6 times, and also repeats my original command. With warnings enabled, I evaluated '\i' once: % PYTHONWARNINGS=always sage --ipython ... IPython 5.8.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: '\i':1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i In [1]: '\i' :1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i :1: DeprecationWarning: invalid escape sequence \i '\i' Out[1]: '\\i' -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/15f4bfab-8605-4099-a3e6-c35f10f6942fo%40googlegroups.com.
[sage-support] Re: Question about a deprecation warning
On Wednesday, July 1, 2020 at 2:22:49 PM UTC-7, Antonio Rojas wrote: > > > > El miércoles, 1 de julio de 2020, 21:06:43 (UTC+2), John H Palmieri > escribió: >> >> >> Why so many deprecation warnings? I think they're coming from plain >> Python; why doesn't Python print the warnings? >> >> >> > Because python ignores deprecation warnings, > https://docs.python.org/3/library/warnings.html#default-warning-filter > Thanks, that's helpful. But why does Sage print the warning so many times? If I turn on Python's deprecation warnings, I just see one warning message, not six of them. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/b753e544-c3f5-4289-946f-4c2e63df007bo%40googlegroups.com.
[sage-support] Re: Question about a deprecation warning
El miércoles, 1 de julio de 2020, 21:06:43 (UTC+2), John H Palmieri escribió: > > > Why so many deprecation warnings? I think they're coming from plain > Python; why doesn't Python print the warnings? > > > Because python ignores deprecation warnings, https://docs.python.org/3/library/warnings.html#default-warning-filter -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/af97136d-eeea-4003-9175-23224915fb3bo%40googlegroups.com.