NVDA source code and user guide: remove Windows 8 constant mentions#15666
Conversation
…ch' and mark it as deprecated. Re nvaccess#15662. Windows 8.1 is the mimimum OS, therefore config can termiante on desktop switch.
…eOnDesktopSwitch'. Re nvaccess#15662
…te enumerations. Re nvaccess#15663. Return Windows 8.1 or later lock session state enumeration as Windows 7 is no longer supported by NVDA.
…15664. Mostly for screen curtain: as NVDA requires Windows 8.1 or later, there is no need to actualy provide a flag that says full screen magnification API is present. However the API is not supported for 32-bit apps (WWoW64), so keep the flag around in case Microsoft removes in a future Windows release.
…uirement (Windows 8.1 is the minimum OS)
…nDesktopSwitch with no replacement. Re nvaccess#15662
|
Should you remove "Closes #15662" from the PR description? |
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
|
Initial comment edited, thanks for the reminder. |
| testing our specific usage of the API with each Windows version since Windows 8 | ||
| """ | ||
| return getWinVer() >= WIN8 | ||
| return True |
There was a problem hiding this comment.
i think it makes sense to deprecate this function to match the strategy used in #15644.
That way usage in NVDA core is discouraged and removed in favour of simpler code.
There was a problem hiding this comment.
i.e ScreenCurtainProvider.canStart can also be simplified to return True
…call, returning True when asked to start. Re nvaccess#15664
|
|
||
| - Using ``watchdog.getFormattedStacksForAllThreads`` is deprecated - please use ``logHandler.getFormattedStacksForAllThreads`` instead. (#15616, @lukaszgo1) | ||
| - ``easeOfAccess.canConfigTerminateOnDesktopSwitch`` has been deprecated, as it became obsolete since Windows 7 is no longer supported. (#15644, @LeonarddeR) | ||
| - ``winVersion.isFullScreenMagnificationAvailable`` has been deprecated, as it became obsolete since Windows 7 is no longer supported. (#15664, @josephsl) |
There was a problem hiding this comment.
this deprecation could also suggest ScreenCurtainProvider.canStart as an alternative.
…ancementProviders.screenCurtain.ScreenCurtainProvider.canStart. Re nvaccess#15664
|
Hi, done. Thanks.
From: Sean Budd ***@***.***>
Sent: Sunday, October 22, 2023 7:28 PM
To: nvaccess/nvda ***@***.***>
Cc: Joseph Lee ***@***.***>; Author ***@***.***>
Subject: Re: [nvaccess/nvda] NVDA source code and user guide: remove Windows 8 constant mentions (PR #15666)
@seanbudd commented on this pull request.
_____
In user_docs/en/changes.t2t <#15666 (comment)> :
@@ -117,6 +117,7 @@ Code which imports from one of them, should instead import from the replacement
- Using ``watchdog.getFormattedStacksForAllThreads`` is deprecated - please use ``logHandler.getFormattedStacksForAllThreads`` instead. (#15616, @lukaszgo1)
- ``easeOfAccess.canConfigTerminateOnDesktopSwitch`` has been deprecated, as it became obsolete since Windows 7 is no longer supported. (#15644, @LeonarddeR)
+- ``winVersion.isFullScreenMagnificationAvailable`` has been deprecated, as it became obsolete since Windows 7 is no longer supported. (#15664, @josephsl)
this deprecation could also suggest ScreenCurtainProvider.canStart as an alternative.
—
Reply to this email directly, view it on GitHub <#15666 (review)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4AXECIROI7CAR2REQWE4TYAXBZ5AVCNFSM6AAAAAA6LGHBQ2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMOJRGU3TANBRGA> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
| testing our specific usage of the API with each Windows version since Windows 8 | ||
| """ | ||
| return getWinVer() >= WIN8 | ||
| if NVDAState._allowDeprecatedAPI(): |
There was a problem hiding this comment.
can this please use the standard __getattr__ methoud outlined in deprecations.md?
There was a problem hiding this comment.
I did it like this initially as the deprecated symbol is a function, not a constant or a variable, using gui.quit as precedence. If an add-on or other part of NVDA calls winVersion.isFullScreenMagnificationAvailable using the proposed deprecation method, Python will raise attribute error, which amounts to removing the function altogether from the module.
There was a problem hiding this comment.
I think the gui.quit example did come before this was standardised though, so I wouldn't use it as precedent
There was a problem hiding this comment.
I think this should give us a motivation to refine the getattr method when dealing with deprecated functions and class methods. I'll follow the suggested process, and then will create a new GitHub issue.
| testing our specific usage of the API with each Windows version since Windows 8 | ||
| """ | ||
| log.debugWarning( | ||
| "Deprecated function called: winVersion.isFullScreenMagnificationAvailable", stack_info=True |
There was a problem hiding this comment.
this should suggest the alternative as well
Link to issue number:
Closes #15663
Closes #15664
Summary of the issue:
Remove mention of Windows 8 (winVersion.WIN8) constant from source code, and for the user guide, remove Windows 8 mention from audio ducking setting.
Description of user facing changes
None
Description of development approach
Testing strategy:
Manual testing with code coverage - making sure NVDA runs on Windows 8.1 and later with screen curtain, Ease of Access, and session lock functionality tested.
Known issues with pull request:
None
Code Review Checklist:
Deprecation notice:
easeOfAccess.canConfigTerminateOnDesktopSwitch is deprecated with no replacement - this wil always return True as NVDA now requires Windows 8.1 or later.
Thanks.