Remove support for Python 3.7 - #69
Draft
Nael-Sayegh wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull Request Overview
Removes Python 3.7 support from the scanvox plugin, locking compatibility to Python 3.11 only.
- Deleted the branch handling for Python 3.7
- Retained only the Python 3.11 library path
- Emits an error for any other Python version
Comments suppressed due to low confidence (2)
addon/globalPlugins/scanvox/init.py:24
- [nitpick] Enhance the error message by including the actual version numbers, e.g.,
log.error(f"Unsupported Python {sys.version_info.major}.{sys.version_info.minor}"), to aid debugging.
log.error("Unsupported python version")
addon/globalPlugins/scanvox/init.py:24
- Add a test case that runs under an unsupported Python version (e.g., 3.10) to verify that the error branch is triggered as expected.
log.error("Unsupported python version")
| if sys.version_info.major == 3 and sys.version_info.minor == 7: | ||
| lib = os.path.join(os.path.dirname(__file__), "lib", "3.7") | ||
| elif sys.version_info.major == 3 and sys.version_info.minor == 11: | ||
| if sys.version_info.major == 3 and sys.version_info.minor == 11: |
There was a problem hiding this comment.
[nitpick] Consider simplifying the version check by comparing sys.version_info[:2] directly, e.g., if sys.version_info[:2] == (3, 11):, for improved readability.
Suggested change
| if sys.version_info.major == 3 and sys.version_info.minor == 11: | |
| if sys.version_info[:2] == (3, 11): |
Owner
Author
|
@copilote For ease of management and modification, I prefer to keep the Python version check in the form of if ... and .... |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove support for Python 3.7, which means that the minimum version of NVDA is now 2024.1.