Skip to content

A few good ... changes#210

Merged
TB-1993 merged 8 commits into
rdkcentral:developfrom
FitzerIRL:develop
May 15, 2026
Merged

A few good ... changes#210
TB-1993 merged 8 commits into
rdkcentral:developfrom
FitzerIRL:develop

Conversation

@FitzerIRL
Copy link
Copy Markdown
Contributor

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

- 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()

============================================================

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

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
Copilot AI review requested due to automatic review settings March 24, 2026 23:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread framework/core/logModule.py Outdated
Comment thread framework/core/commandModules/telnetClass.py
Comment thread framework/core/commandModules/telnetClass.py Outdated
Comment thread framework/core/commandModules/serialClass.py Outdated
Comment thread framework/core/testControl.py Outdated
Comment thread framework/core/testControl.py Outdated
Comment thread framework/core/testControl.py
Comment thread framework/core/__init__.py Outdated
Comment thread framework/core/commandModules/telnetClass.py Outdated
Comment thread framework/core/__init__.py
Comment thread framework/core/testControl.py
Comment thread framework/core/testControl.py
@TB-1993 TB-1993 requested a review from zghp March 27, 2026 10:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 14:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
FitzerIRL and others added 5 commits April 8, 2026 10:04
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread framework/core/testControl.py
Comment thread framework/core/testControl.py
Comment thread framework/core/testControl.py
Comment thread framework/core/commandModules/telnetClass.py
Comment thread framework/core/commandModules/telnetClass.py
Comment thread framework/core/__init__.py
Copy link
Copy Markdown
Contributor Author

@FitzerIRL FitzerIRL left a comment

Choose a reason for hiding this comment

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

Updates based on feedback.

@TB-1993 TB-1993 merged commit 0006540 into rdkcentral:develop May 15, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants