| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
… module The __main__ module executed as a script or a command has __spec__ set to None, so warn_explicit(module_globals=globals()) emitted a spurious DeprecationWarning. It also raised ImportError when the loader was unable to provide the source of the module: when the module was executed with -m (the loader can only handle its own module name) or as a command (the built-in importer has no source).
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
Sorry, something went wrong.
|
GH-155989 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-155990 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-155991 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…_ module (GH-155318) (GH-155991) The __main__ module executed as a script or a command has __spec__ set to None, so warn_explicit(module_globals=globals()) emitted a spurious DeprecationWarning. It also raised ImportError when the loader was unable to provide the source of the module: when the module was executed with -m (the loader can only handle its own module name) or as a command (the built-in importer has no source). (cherry picked from commit f2eaf17) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…_ module (GH-155318) (GH-155990) The __main__ module executed as a script or a command has __spec__ set to None, so warn_explicit(module_globals=globals()) emitted a spurious DeprecationWarning. It also raised ImportError when the loader was unable to provide the source of the module: when the module was executed with -m (the loader can only handle its own module name) or as a command (the built-in importer has no source). (cherry picked from commit f2eaf17) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x Fedora Stable Clang Installed 3.x (tier-3) has failed when building commit f2eaf17. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1645/builds/3237 Summary of the results of the build (if available): Click to see traceback logsNote: switching to 'f2eaf174b2505be1b3dfbe817db243adf7fd5d6b'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f2eaf174b2505b gh-123011: Fix warn_explicit() with the globals of the __main__ module (GH-155318)
Switched to and reset branch 'main'
configure: WARNING: s390x-ibm-linux-gnu/clang is not supported
configure: WARNING:
Platform "s390x-ibm-linux-gnu" with compiler "clang" is not supported by the
CPython core team, see https://peps.python.org/pep-0011/ for more information.
Objects/unicodeobject.c:4906:1: warning: unused function 'ctz' [-Wunused-function]
4906 | ctz(size_t v)
| ^~~
1 warning generated.
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:285:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
285 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:292:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
292 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:438:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
438 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:445:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
445 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:551:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
551 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:560:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
560 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:582:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
582 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:593:9: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
593 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:690:11: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
690 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:735:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
735 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:761:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
761 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:772:9: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
772 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:785:11: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
785 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:930:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
930 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:943:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
943 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:960:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
960 | CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
118 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:967:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
967 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:1202:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
1202 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:1222:11: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
1222 | CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
| ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
89 | EXPAT_FALLTHROUGH; \
| ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
47 | # define EXPAT_FALLTHROUGH __attribute__((fallthrough))
| ^
19 warnings generated.
ar: unable to copy file 'libpython3.16.a'; reason: No space left on device
make: *** [Makefile:1164: libpython3.16.a] Error 1
chmod: cannot access 'target/': No such file or directory |
Sorry, something went wrong.
…_ module (GH-155318) (GH-155989) The __main__ module executed as a script or a command has __spec__ set to None, so warn_explicit(module_globals=globals()) emitted a spurious DeprecationWarning. It also raised ImportError when the loader was unable to provide the source of the module: when the module was executed with -m (the loader can only handle its own module name) or as a command (the built-in importer has no source). (cherry picked from commit f2eaf17) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| Back | FazBrowse Home | New Git URL |
warnings.warn_explicit(module_globals=globals()) failed in the __main__ module:
The source line is now optional: an ImportError from the loader is no longer propagated.
The pure Python implementation, which uses linecache, was not affected.