You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
Hm, @flying-sheep, the warnings module is deprecating warnings.warn over warnings.warning, that's why I changed a couple of the occurrences. I like the verbal .warn better, but it seems to go away in the future...
The reason will be displayed to describe this comment to others. Learn more.
Not at all. That's another module, and the other way around. logging.warning is going away, and warnings.warning doesn't even exist (and I think it never did)
The reason will be displayed to describe this comment to others. Learn more.
Just got the output again: I believe it's as I thought initially logging.warn goes away and logging.warning stays:
/home/ubuntu/miniconda3/lib/python3.6/site-packages/ipykernel_launcher.py:1: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
7b1077d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, @flying-sheep, the
warnings
module is deprecatingwarnings.warn
overwarnings.warning
, that's why I changed a couple of the occurrences. I like the verbal.warn
better, but it seems to go away in the future...7b1077d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all. That's another module, and the other way around.
logging.warning
is going away, andwarnings.warning
doesn't even exist (and I think it never did)7b1077d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was mixing up
logging
withwarnings
; that I'm also mixing up the way.warn
and.warning
, even better! :)7b1077d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, it’s specifically good because the fact that nobody encountered this before menas that people tend to not use the deprecated functions
7b1077d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just got the output again: I believe it's as I thought initially
logging.warn
goes away andlogging.warning
stays:7b1077d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh whoops! Sorry adding confusion here. So
logging.warning
orwarnings.warn
, got it.Added bonus: One could import both if one needs both functions in the same module.