-
Notifications
You must be signed in to change notification settings - Fork 568
refactor: drop Python 3.8 related code #5378
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
base: main
Are you sure you want to change the base?
Conversation
so we don't have to update it every year
There was a problem hiding this 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 removes Python 3.8 related code from the codebase after Python 3.8 support was officially dropped. The changes update version checks, modernize type annotations to use built-in collection types, and clean up version-specific conditional imports.
- Updated Python version checks from 3.8+ to 3.9+
- Replaced typing module imports with built-in collection types (dict, list, set)
- Removed conditional imports for older Python versions
Reviewed Changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/test_extractor.py | Updated test skip condition to remove Python 3.7 reference |
test/language_data/requirements.txt | Removed Python 3.8 specific dependency and fixed typo |
test/README.md | Updated documentation examples from Python 3.8/3.9 to 3.11/3.12 |
doc/MANUAL.md | Updated documentation to remove Python 3.8 reference |
dev-requirements.txt | Consolidated development dependencies by removing Python version conditions |
cve_bin_tool/vex_manager/parse.py | Modernized type annotations to use built-in types |
cve_bin_tool/vex_manager/generate.py | Modernized type annotations to use built-in types |
cve_bin_tool/version_scanner.py | Moved Iterator import from typing to collections.abc |
cve_bin_tool/util.py | Modernized type annotations and moved imports |
cve_bin_tool/strings.py | Modernized type annotations to use built-in types |
cve_bin_tool/parsers/parse.py | Removed conditional import for importlib_resources |
cve_bin_tool/package_list_parser.py | Modernized type annotations to use built-in types |
cve_bin_tool/input_engine.py | Modernized type annotations and moved Iterable import |
cve_bin_tool/helper_script.py | Moved MutableMapping import from typing to collections.abc |
cve_bin_tool/data_sources/init.py | Removed conditional import for importlib_resources |
cve_bin_tool/cve_scanner.py | Modernized type annotations to use built-in types |
cve_bin_tool/csv2cve.py | Replaced inline version check with shared function |
cve_bin_tool/config.py | Moved Mapping import from typing to collections.abc |
cve_bin_tool/cli.py | Updated version check logic and extracted to reusable function |
cve_bin_tool/checkers/init.py | Removed conditional import for importlib_resources |
.pre-commit-config.yaml | Updated pyupgrade configuration from py38-plus to py39-plus |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fixes #4579
tests and SBOM generation were already disabled in #4647
python_requires
was already bumped in #5135