{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/9167","labels_url":"https://api.github.com/repos/ipython/ipython/issues/9167/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/9167/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/9167/events","html_url":"https://github.com/ipython/ipython/pull/9167","id":128590021,"number":9167,"title":"Truncate tracebacks on recursion error","user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=3","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ipython/ipython/milestones/29","html_url":"https://github.com/ipython/ipython/milestones/4.1","labels_url":"https://api.github.com/repos/ipython/ipython/milestones/29/labels","id":1203455,"number":29,"title":"4.1","description":"Release 4.1\r\n","creator":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":168,"state":"open","created_at":"2015-07-11T16:40:52Z","updated_at":"2016-01-26T18:53:03Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-01-25T17:11:30Z","updated_at":"2016-01-26T19:02:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipython/ipython/pulls/9167","html_url":"https://github.com/ipython/ipython/pull/9167","diff_url":"https://github.com/ipython/ipython/pull/9167.diff","patch_url":"https://github.com/ipython/ipython/pull/9167.patch"},"body":"Identify repeated frames in a recursion error traceback and only show them once.\r\n\r\nCloses gh-7833\r\n\r\nThere's a certain amount of guesswork involved in deciding what to elide. I'm guessing that in most cases, the frames will fall into a cycle (e.g. A calls B calls C calls A), so the code tries to work out how long the cycle is. I've tried to err on the side of showing rather than hiding frames, but in some situations it could still obscure meaningful information.\r\n\r\nThis is what it looks like in the simplest possible case:\r\n\r\n```\r\nIn [1]: def f():\r\n   ...:     f()\r\n   ...:     \r\n\r\nIn [2]: f()\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n<ipython-input-2-0ec059b9bfe1> in <module>()\r\n----> 1 f()\r\n\r\n<ipython-input-1-3ce0ca94edec> in f()\r\n      1 def f():\r\n----> 2     f()\r\n      3 \r\n\r\nLast 1 frames repeated, from:\r\n\r\n<ipython-input-1-3ce0ca94edec> in f()\r\n      1 def f():\r\n----> 2     f()\r\n      3 \r\n\r\nRuntimeError: maximum recursion depth exceeded\r\n```\r\n\r\nShowing the repeated frame looks superfluous when the function calls itself directly, but if the loop is 10 functions long I think it will be pretty useful."},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/175180558","html_url":"https://github.com/ipython/ipython/pull/9167#issuecomment-175180558","issue_url":"https://api.github.com/repos/ipython/ipython/issues/9167","id":175180558,"user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=3","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T19:02:59Z","updated_at":"2016-01-26T19:02:59Z","body":"@Carreau this is the last thing milestoned for 4.1. But I don't mind if we want to bump this to 4.2 or 5.0, as there is some small risk of it causing problems.\r\n\r\n:shipit: "}}