Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-102567: Add -X importtime=2 for logging an importtime message for already-loaded modules#118655
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
Eclips4 commentedMay 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hello!
|
noahbkim commentedMay 6, 2024
Thanks for the quick feedback. I've committed a first pass of 1-3. As for tests: there appear to be no Thanks again! |
Eclips4 commentedMay 6, 2024
Yes, it would be sufficient :) |
Eclips4 commentedMay 6, 2024
Also, there's a merge conflict. Can you resolve it? (I can do it myself, but it seems like you have turned off this option) |
noahbkim commentedMay 7, 2024
Done, just added tests as well |
noahbkim commentedMay 28, 2024
@Eclips4 who should I ping to get final review? Is it alright if I @ the blamed reviewers? |
Eclips4 commentedMay 28, 2024
I guess@vstinner is the right person to review this 😄 |
Eclips4 commentedMay 28, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The same applies for the |
noahbkim commentedMay 1, 2025
I think I've messed up my branch, I'm going to attempt to squash everything so I can overwrite my commit email correctly. |
AA-Turner commentedMay 1, 2025
Ok, please ping for a review when you've sorted the branch out! If it's easier, feel free to just open a new PR, but a force push here should also work. A |
noahbkim commentedMay 1, 2025
@AA-Turner I've squashed my changes and given everything a second pass. It looks like I caused some kind of regression in Zeroing I have about 6 tests failing locally, one of which prevents me from compiling with |
Uh oh!
There was an error while loading.Please reload this page.
Lib/_pyrepl/windows_console.py Outdated
| importnt | ||
| returnnt._supports_virtual_terminal() | ||
| except (ImportError,AttributeError): | ||
| nt._supports_virtual_terminal() |
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.
| nt._supports_virtual_terminal() | |
| returnnt._supports_virtual_terminal() |
This is missing a return and would never enable virtual terminal anymore.
AA-Turner commentedMay 3, 2025
@noahbkim I've pushed a series of commits to the
When these changes are addressed, we can run the buildbots on this PR and check that everything looks alright. Thanks! A |
AA-Turner commentedMay 5, 2025
ping@noahbkim (feature freeze is tomorrow) |
`-X importtime=2` feedback(Thanks so much,@AA-Turner)
noahbkim commentedMay 5, 2025
@AA-Turner I am incredibly grateful for the work you've done to get this over the finish line. Thanks again, I'll have an eye on Github/my email all day in case you need anything else. |
bedevere-bot commentedMay 5, 2025
🤖 New build scheduled with the buildbot fleet by@AA-Turner for commit6d50b0c 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F118655%2Fmerge If you want to schedule another build, you need to add the🔨 test-with-buildbots label again. |
AA-Turner commentedMay 6, 2025
Buildbots show leaks in |
AA-Turner left a comment
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.
Thanks!
A
c4bcc6a intopython:mainUh oh!
There was an error while loading.Please reload this page.
| -Ximporttime[=2]:showhow longeachimporttakes;use-Ximporttime=2to\ | ||
| logimportsofalready-loadedmodules;alsoPYTHONPROFILEIMPORTTIME\n\ |
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.
This is missing a newline:
| -Ximporttime[=2]:showhow longeachimporttakes;use-Ximporttime=2to\ | |
| logimportsofalready-loadedmodules;alsoPYTHONPROFILEIMPORTTIME\n\ | |
| -Ximporttime[=2]:showhow longeachimporttakes;use-Ximporttime=2to\n\ | |
| logimportsofalready-loadedmodules;alsoPYTHONPROFILEIMPORTTIME\n\ |
$python3.14 --help-all...-X frozen_modules=[on|off]: whether to use frozen modules; the default is "on" for installed Python and "off" for a local build; also PYTHON_FROZEN_MODULES-X importtime[=2]: show how long each import takes; use -X importtime=2 to log imports of already-loaded modules; also PYTHONPROFILEIMPORTTIME-X int_max_str_digits=N: limit the size of int<->str conversions; 0 disables the limit; also PYTHONINTMAXSTRDIGITS-X no_debug_ranges: don't include extra location information in code objects; also PYTHONNODEBUGRANGES-X perf: support the Linux "perf" profiler; also PYTHONPERFSUPPORT=1...
Please see PR#136391 for a fix.
…e for already-loaded modules (python#118655)Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
As mentioned in the issue:
The updated example (
-Ximporttime=2):With
-Ximporttime:Discussion:https://discuss.python.org/t/x-importtrace-to-supplement-x-importtime-for-loaded-modules/23882/5
Prior email chain:https://mail.python.org/archives/list/python-ideas@python.org/thread/GEISYQ5BXWGKT33RWF77EOSOMMMFUBUS/
-X importtime=2for additional logging when an imported module is already loaded #102567