Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-127651: Use __file__ in diagnostics if origin is missing#127660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
See the left hand side inhttps://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849I missed this in part because I use debug builds for dev which I thinkdon't freeze modules
Misc/NEWS.d/next/Core_and_Builtins/2024-12-06-01-09-40.gh-issue-127651.80cm6j.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bedevere-bot commentedDec 9, 2024
🤖 New build scheduled with the buildbot fleet by@hauntsaninja for commit9a3dbbf 🤖 If you want to schedule another build, you need to add the🔨 test-with-buildbots label again. |
(testing with buildbots because last time I made a similar change we needed a fix for iOS) |
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.
There is yet one bug in this code. Iferrmsg is NULL,Py_DECREF(errmsg) (or even_PyErr_SetImportErrorWithNameFrom) can crash.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.
LGTM.
The code is so complicated that I am not sure that all cases are covered. But in any case this is an improvement.
Thank you for the review! |
3983527 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@hauntsaninja for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry,@hauntsaninja, I could not cleanly backport this to |
…thon#127660)See the left hand side inhttps://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849---------Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit3983527)
GH-127775 is a backport of this pull request to the3.13 branch. |
…127660) (#127775)gh-127651: Use __file__ in diagnostics if origin is missing (#127660)See the left hand side inhttps://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849---------Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit3983527)
bedevere-bot commentedDec 10, 2024
|
…moduleI missed the extra `PyModule_Check` inpython#127660 because I was looking at3.12 as the base implementation for import from. This meant that Imissed the `PyModuleCheck` introduced inpython#112661.
…module (pythonGH-128047)I missed the extra `PyModule_Check` inpythonGH-127660 because I was looking at3.12 as the base implementation for import from. This meant that Imissed the `PyModuleCheck` introduced inpythonGH-112661.(cherry picked from commit45e6dd6)Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
…-module (GH-128047) (#128114)gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047)I missed the extra `PyModule_Check` inGH-127660 because I was looking at3.12 as the base implementation for import from. This meant that Imissed the `PyModuleCheck` introduced inGH-112661.(cherry picked from commit45e6dd6)Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
…module (python#128047)I missed the extra `PyModule_Check` inpython#127660 because I was looking at3.12 as the base implementation for import from. This meant that Imissed the `PyModuleCheck` introduced inpython#112661.
…thon#127660)See the left hand side inhttps://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849---------Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…module (python#128047)I missed the extra `PyModule_Check` inpython#127660 because I was looking at3.12 as the base implementation for import from. This meant that Imissed the `PyModuleCheck` introduced inpython#112661.
Uh oh!
There was an error while loading.Please reload this page.
See the left hand side inhttps://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849
I missed this in part because I use debug builds for dev which I think don't freeze modules