A few good ... changes#210
Merged
Merged
Conversation
Optionality for Docker Potential fix for pull request finding Agreed Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Improve compatibility and add console enable/disable support - Add Python 3.13+ compatibility shim for removed telnetlib module - Use flushInput() instead of reset_input_buffer() in serialClass for broader pyserial compatibility - Support 'enabled: false' in console config to skip disabled consoles, with automatic fallback to the first enabled console - Make capture (cv2/pytesseract) and webpageController (selenium) imports optional to support minimal environments (e.g. Docker) - Add UTF-8 encoding to log file handlers - Fix logger cleanup to use self.log.handlers instead of hasHandlers() ModuleNotFoundError is finer grain
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves framework compatibility in minimal environments (e.g., Docker) and newer Python versions, while adding configuration support for disabling consoles and improving logging robustness.
Changes:
- Add optional-import handling for heavy/optional modules (capture/web UI control) and Python 3.13+ telnetlib removal.
- Add console selection behavior to support
enabled: false(skip disabled consoles + fallback to first enabled). - Improve logging reliability (UTF-8 file handlers; safer handler cleanup) and broaden serial buffer-clear compatibility.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/core/testControl.py | Makes telnetlib/capture/webpageController imports optional; adds “enabled console” selection logic for DUT session. |
| framework/core/logModule.py | Uses UTF-8 encoding for file handlers and adjusts logger handler cleanup logic. |
| framework/core/deviceManager.py | Skips disabled consoles and falls back to first available console session when requested console is missing. |
| framework/core/commandModules/telnetClass.py | Adds a Python 3.13+ telnetlib compatibility shim when telnetlib is missing. |
| framework/core/commandModules/serialClass.py | Switches serial input buffer clearing API to flushInput(). |
| framework/core/init.py | Makes capture and webpageController imports optional for minimal installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TB-1993
requested changes
Mar 27, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
FitzerIRL
commented
Apr 8, 2026
Contributor
Author
FitzerIRL
left a comment
There was a problem hiding this comment.
Updates based on feedback.
TB-1993
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Making big modules 'optional' for Docker
============================================================
Optionality for Docker
Potential fix for pull request finding
Agreed
Co-authored-by: Copilot Autofix powered by AI 175728472+Copilot@users.noreply.github.com
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI 175728472+Copilot@users.noreply.github.com
Improve compatibility and add console enable/disable support
ModuleNotFoundError is finer grain