Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old winTerminalUIA module attribute #16820

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import controlTypes
import ctypes
import NVDAHelper
import NVDAState
import speech
import textInfos
import textUtils
Expand All @@ -19,10 +18,9 @@
from diffHandler import prefer_difflib
from logHandler import log
from typing import (
Any,
Optional,
)
from UIAHandler.utils import _getConhostAPILevel, _shouldUseWindowsTerminalNotifications
from UIAHandler.utils import _getConhostAPILevel
from UIAHandler.constants import WinConsoleAPILevel
from . import UIA, UIATextInfo
from ..behaviors import EnhancedTermTypedCharSupport, KeyboardHandlerBasedTypedCharSupport
Expand Down Expand Up @@ -481,18 +479,3 @@ def event_UIA_notification(
for line in displayString.splitlines():
if line and not line.isspace(): # Don't say "blank" during autoread
speech.speakText(line)


def __getattr__(attrName: str) -> Any:
"""Module level `__getattr__` used to preserve backward compatibility."""
if attrName == "WinTerminalUIA" and NVDAState._allowDeprecatedAPI():
log.warning(
"WinTerminalUIA is deprecated. "
"Instead use _DiffBasedWinTerminalUIA or _NotificationsBasedWinTerminalUIA",
)
return (
_NotificationsBasedWinTerminalUIA
if _shouldUseWindowsTerminalNotifications()
else _DiffBasedWinTerminalUIA
)
raise AttributeError(f"module {repr(__name__)} has no attribute {repr(attrName)}")
2 changes: 2 additions & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Add-ons will need to be re-tested and have their manifest updated.
These are breaking API changes.
Please open a GitHub issue if your add-on has an issue with updating to the new API.

* `NVDAObjects.UIA.winConsoleUIA.WinTerminalUIA` has been removed with no public replacement. (#14047, #16820, @codeofdusk)

#### Deprecations

* The `braille.filter_displaySize` extension point is deprecated.
Expand Down