Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Nov 17, 2025

@pablogsal
Copy link
Member Author

CC @lkollar

@pablogsal pablogsal requested a review from AA-Turner November 17, 2025 01:10
@pablogsal
Copy link
Member Author

pablogsal commented Nov 17, 2025

@hugovk @AA-Turner @savannahostrowski any chance you could give this a go? Most of the diff is tests. You can focus on the main TUI code if you prefer. Even if you just test it locally it will help a lot!

@pablogsal pablogsal force-pushed the live-tui branch 3 times, most recently from 3922fb1 to ab80fbf Compare November 17, 2025 15:42
Copy link
Contributor

@lkollar lkollar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super cool! I've not reviewed the implementation thoroughly but I played around with the TUI and everything is working really well. Left a bunch of suggestions.

pablogsal and others added 9 commits November 17, 2025 22:04
Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
@pablogsal pablogsal requested a review from lkollar November 18, 2025 15:57
@pablogsal
Copy link
Member Author

@lkollar i fix all your comments and clean the code a bit and added even more tests. I also added some color diffing to make it easier to spot changes. Can you give it another go?

Copy link
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so slick 🔥 ! I played with this a bunch and the UX is very solid. I have one comment about an edge case I ran into and one suggestion (but it looks like you're already thinking about export so that's great)!

@bedevere-app
Copy link

bedevere-app bot commented Nov 20, 2025

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@pablogsal
Copy link
Member Author

@savannahostrowski I have addressed your comments and I pushed a new one ensuring the TUI (most of it) still works at the end in a way that makes sense. I left some comments regarding the exporting situation but we can surely explore that on a different PR :)

Thanks a lot for the review ❤️

Copy link
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out the fix for toggling help when profiling ends and it looks good!

Nice work on this one! Very, very cool! 🚀

@pablogsal pablogsal merged commit b338308 into python:main Nov 20, 2025
49 of 50 checks passed
@pablogsal pablogsal deleted the live-tui branch November 20, 2025 18:27
@bedevere-bot

This comment was marked as off-topic.

@vstinner
Copy link
Member

vstinner commented Nov 21, 2025

test_profiling tests fail on buildbots installing Python.

Example: https://buildbot.python.org/#/builders/207/builds/6809

Failed to import test module: test.test_profiling.test_sampling_profiler.test_live_collector_core
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-s390x.clang-installed/build/target/lib/python3.15/unittest/loader.py", line 426, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-s390x.clang-installed/build/target/lib/python3.15/unittest/loader.py", line 367, in _get_module_from_name
    __import__(name)
    ~~~~~~~~~~^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-s390x.clang-installed/build/target/lib/python3.15/test/test_profiling/test_sampling_profiler/test_live_collector_core.py", line 16, in <module>
    from profiling.sampling.live_collector import LiveStatsCollector, MockDisplay
ModuleNotFoundError: No module named 'profiling.sampling.live_collector'

cc @encukou

@pablogsal
Copy link
Member Author

test_profiling tests fail on buildbots installing Python.

I think we are missing something in the makefile will take a look

@pablogsal
Copy link
Member Author

test_profiling tests fail on buildbots installing Python.

Example: buildbot.python.org#/builders/207/builds/6809

Failed to import test module: test.test_profiling.test_sampling_profiler.test_live_collector_core
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-s390x.clang-installed/build/target/lib/python3.15/unittest/loader.py", line 426, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-s390x.clang-installed/build/target/lib/python3.15/unittest/loader.py", line 367, in _get_module_from_name
    __import__(name)
    ~~~~~~~~~~^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-s390x.clang-installed/build/target/lib/python3.15/test/test_profiling/test_sampling_profiler/test_live_collector_core.py", line 16, in <module>
    from profiling.sampling.live_collector import LiveStatsCollector, MockDisplay
ModuleNotFoundError: No module named 'profiling.sampling.live_collector'

cc @encukou

Fixed in #141820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants