-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Regression of 3.13.1 for module paths in from import #127651
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We don't add features in minor versions. So it's either an undesired bug or something else. Can you try with the latest main (not the released 3.13.1) and compile it from sources? |
Sorry, I didn't mean to offend you, I looked at the sources. I saw a bigger diff that is largely concerned with adding I compiled 3.13.1 from sources when this happened, I saw it on the official 3.13.1 Windows download as well, and I first noticed it when GitHub Actions recompiled their Python3.13 to be 3.13.1 on Windows and Linux. I hope you don't mind if I share these link: https://github.com/Nuitka/Nuitka/actions/runs/12180424101/job/33974735672#step:7:372 and https://github.com/Nuitka/Nuitka/actions/runs/12180424101/job/33974734101#step:7:243 and I believe macOS was still using 3.13.0 on GitHubAction at the time. I didn't use the |
I wasn't offended, sorry if it this is what you thought!
Actually I also didn't have a lot of time hence my questions! I just wanted to know whether you've already bisected or not.
Yup. By searching "unknown location", I found the commit: 500f533 (thanks, didn't occur to me to do it...). |
See the left hand side in https://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
Thanks for the issue and tagging me! Note for most users this will only affect frozen modules. Opened #127660 |
See the left hand side in https://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849 --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…thon#127660) See the left hand side in https://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849 --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 3983527)
…127660) (#127775) gh-127651: Use __file__ in diagnostics if origin is missing (#127660) See the left hand side in https://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849 --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 3983527)
…thon#127660) See the left hand side in https://github.com/python/cpython/pull/123929/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deL2840-L2849 --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
This code outputs with 3.13.1 the following:
As you can see, the
__file__
and__spec__
values are fine. I found this in a regression test of Nuitka which worked with 3.13.1 and all Python versions before, giving the proper path from Python (which I use as a test oracle to know what the behavior to compare against is).From my look at the code, this "unknown location" is coming from a code path, that tries to recognize shadowed stdlib modules, a new feature added in 3.13.1, can you please consider repairing it for 3.13.2, as I think file paths are very important part of exceptions for developers.
The issue is not OS specific. It only occurs with 3.13.1, not with 3.13.0.
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: