GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — gh-73055: Skip one additional frame when type.__new__ is called not directly from type.__call__. by serhiy-storchaka · Pull Request #14166 · python/cpython Conversation
|
|
@serhiy-storchaka I like this approach, please let me know when this is ready for review (I assume tests are needed and some comments explaining this behavior). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, it needs tests and documenting. Also this PR contains actually two changes. I am not sure that both of them should be backported, but it is difficult to make one without making other. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I just have tested, and seems there is no undesired behavior change. So I just need to write tests and a NEWS entry. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Unfortunately it does not work. Not setting |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I have one question/comment. Also if we are going this way, I think this deserves a comment in the code explaining the motivation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| while (depth-- > 0 && f->f_back) { | ||
| f = f->f_back; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Unless I am missing something, depth can be only either 0 or 1, maybe it is better to use a name like skip or nested and write this as:
if (skip_frame && f->f_back) { f = f->f_back; }
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It looks like this may also fix https://bugs.python.org/issue37948 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am not sure it is a good solution. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR has not been touched by a human in more than 5 years. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer on the related issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.