Title: DeprecationWarnings should be visible by default in interactive usage · Issue #8478 · ipython/ipython · GitHub
Open Graph Title: DeprecationWarnings should be visible by default in interactive usage · Issue #8478 · ipython/ipython
X Title: DeprecationWarnings should be visible by default in interactive usage · Issue #8478 · ipython/ipython
Description: DeprecationWarning and PendingDeprecationWarning are invisible by default. The rationale for this is that they are only useful to people who are writing code, so they should not be shown to end-users who are merely running code. If someo...
Open Graph Description: DeprecationWarning and PendingDeprecationWarning are invisible by default. The rationale for this is that they are only useful to people who are writing code, so they should not be shown to end-use...
X Description: DeprecationWarning and PendingDeprecationWarning are invisible by default. The rationale for this is that they are only useful to people who are writing code, so they should not be shown to end-use...
Opengraph URL: https://github.com/ipython/ipython/issues/8478
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DeprecationWarnings should be visible by default in interactive usage","articleBody":"DeprecationWarning and PendingDeprecationWarning are invisible by default. The rationale for this is that they are only useful to people who are writing code, so they should not be shown to end-users who are merely running code.\n\nIf someone is typing stuff into the interactive REPL or a notebook, though, and the code they type uses some deprecated functionality, then we should actually show them this warning. We know that the author is sitting right there. And they're probably going to take whatever they tested interactively and move it into a more permanent form and ugh.\n\nThis problem is particularly acute for packages that are primarily used through the interactive prompt, like numpy. I'm really tired of getting bugs like this: numpy/numpy#5919\n\nThe solution is simple: when entering interactive mode, IPython should do something like:\n\n```\nwarnings.filterwarnings(\"default\", category=DeprecationWarning, module=\"__main__\")\nwarnings.filterwarnings(\"default\", category=PendingDeprecationWarning, module=\"__main__\")\n```\n\nThis means \"for any `DeprecationWarning` or `PendingDeprecation` warning which is caused by code running in the module with name `\"__main__\"`, use the `\"default\"` handler (which means: display once per line of code that triggered it). (Confusingly, the default handler for these warning messages is not `\"default\"`, but `\"ignore\"`. So overriding the default with `\"default\"` produces a non-default outcome.)\n","author":{"url":"https://github.com/njsmith","@type":"Person","name":"njsmith"},"datePublished":"2015-05-27T08:10:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":23},"url":"https://github.com/8478/ipython/issues/8478"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:64a9d51c-e978-51c3-944f-500c3f2ef69a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA26:622FF:ADA873:FA342A:6A4E4577 |
| html-safe-nonce | be25127e8072fb38c53f5cd81a4bdf3cc1d14b704556944cf2ac5dc580d3e10d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTI2OjYyMkZGOkFEQTg3MzpGQTM0MkE6NkE0RTQ1NzciLCJ2aXNpdG9yX2lkIjoiNjY2NzEzNzg4MjA4NjMyNzY3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4643ce0789041fcf0284878f249aa2d7e44558099d8837d588e04eaca0192f7a |
| hovercard-subject-tag | issue:81339587 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ipython/ipython/8478/issue_layout |
| twitter:image | https://opengraph.githubassets.com/296eb9369e2af1abb862bb84b8ef211ac2a028e75cea3108f1f445fb6aae121c/ipython/ipython/issues/8478 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/296eb9369e2af1abb862bb84b8ef211ac2a028e75cea3108f1f445fb6aae121c/ipython/ipython/issues/8478 |
| og:image:alt | DeprecationWarning and PendingDeprecationWarning are invisible by default. The rationale for this is that they are only useful to people who are writing code, so they should not be shown to end-use... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | njsmith |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/ipython/ipython git https://github.com/ipython/ipython.git |
| octolytics-dimension-user_id | 230453 |
| octolytics-dimension-user_login | ipython |
| octolytics-dimension-repository_id | 658518 |
| octolytics-dimension-repository_nwo | ipython/ipython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 658518 |
| octolytics-dimension-repository_network_root_nwo | ipython/ipython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9fabff9b8b127e686a3ec86f91422e818056ca2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width